-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
10489: Status Order Report Enhancements #5600
Open
nechama-krigsman
wants to merge
16
commits into
ustaxcourt:staging
Choose a base branch
from
flexion:10489-story-staging
base: staging
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 12 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
1443faa
10489: generate freeText for default docket entry descriptions; set e…
nechama-krigsman 47ed280
10489: fix extra space showing before the period on docket entry desc…
nechama-krigsman f766dcb
10489: set default judge when eventCode is OJR;
nechama-krigsman 478463a
10489: add cypress tests;
nechama-krigsman e1ee1f4
10489: display judge name and title on docket description;
nechama-krigsman 47ab4f0
Merge branch 'staging' into 10489-story-staging
nechama-krigsman 0dc376b
Merge branch 'staging' into 10489-story-staging
nechama-krigsman 44a4752
Merge branch 'staging' into 10489-story-staging
TomElliottFlexion 2c50552
10489: update court issued document action to use judge full name rat…
TomElliottFlexion 1270678
10489: update cypress test description
TomElliottFlexion 3575511
Merge branch 'staging' into 10489-story-staging
jimlerza f2b1f89
Merge branch 'staging' into 10489-story-staging
jimlerza 677b95f
10489: Feedback changes updated
btejha ed52783
Merge branch '10489-story-staging' of github.com:flexion/ef-cms into …
btejha ef74cc9
10489: formatting
TomElliottFlexion e98729c
10489: use data-testid selectors consistently
TomElliottFlexion File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
109 changes: 109 additions & 0 deletions
109
...cal-only/tests/integration/statusReportOrder/status-report-order-description-fields.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
import { | ||
FORMATS, | ||
formatNow, | ||
} from '../../../../../shared/src/business/utilities/DateHandler'; | ||
import { | ||
docketNumber, | ||
getLastDraftOrderElementFromDrafts, | ||
} from '../../../support/statusReportOrder'; | ||
import { | ||
loginAsColvin, | ||
loginAsColvinChambers, | ||
loginAsDocketClerk, | ||
} from '../../../../helpers/authentication/login-as-helpers'; | ||
import { logout } from '../../../../helpers/authentication/logout'; | ||
|
||
describe('should default status report order descriptions', () => { | ||
const today = formatNow(FORMATS.MMDDYYYY); | ||
it('should display default description when document type is an Order', () => { | ||
judgeOrChambersCreatesStatusReportOrder(today); | ||
loginAsDocketClerk(); | ||
cy.visit(`/case-detail/${docketNumber}`); | ||
cy.get('#tab-drafts').click(); | ||
getLastDraftOrderElementFromDrafts().click(); | ||
cy.get('[data-testid="add-court-issued-docket-entry-button"]').click(); | ||
cy.get('.select-react-element__control').should('have.text', 'Order'); | ||
cy.get('[data-testid="document-description-input"]').should( | ||
'have.value', | ||
`Order parties by ${today} shall file a status report.`, | ||
); | ||
cy.get('[data-testid="docket-entry-preview-text"]').should( | ||
'have.text', | ||
`Docket entry preview: Order parties by ${today} shall file a status report.`, | ||
); | ||
}); | ||
|
||
it('should set event code to OJR when case is stricken from trial session and jurisdiction is retained and display default description', () => { | ||
judgeOrChambersCreatesStatusReportOrder(today, true); | ||
loginAsDocketClerk(); | ||
cy.visit(`/case-detail/${docketNumber}`); | ||
cy.get('#tab-drafts').click(); | ||
getLastDraftOrderElementFromDrafts().click(); | ||
cy.get('[data-testid="add-court-issued-docket-entry-button"]').click(); | ||
cy.get('.select-react-element__control').should( | ||
'have.text', | ||
'Order that jurisdiction is retained', | ||
); | ||
cy.get('[data-testid="document-description-input"]').should( | ||
'have.value', | ||
`. Parties by ${today} shall file a status report. Case is stricken from the current trial session.`, | ||
); | ||
cy.get('[data-testid="judge-select"]').should('have.value', 'Colvin'); | ||
cy.get('[data-testid="docket-entry-preview-text"]').should( | ||
'have.text', | ||
`Docket entry preview: Order that jurisdiction is retained by Judge Colvin. Parties by ${today} shall file a status report. Case is stricken from the current trial session.`, | ||
); | ||
}); | ||
|
||
it('should continue to handle OJR and set correct signing judge when status order report is signed by chambers user', () => { | ||
judgeOrChambersCreatesStatusReportOrder(today, true, true); | ||
loginAsDocketClerk(); | ||
cy.visit(`/case-detail/${docketNumber}`); | ||
cy.get('#tab-drafts').click(); | ||
getLastDraftOrderElementFromDrafts().click(); | ||
cy.get('[data-testid="add-court-issued-docket-entry-button"]').click(); | ||
cy.get('.select-react-element__control').should( | ||
'have.text', | ||
'Order that jurisdiction is retained', | ||
); | ||
cy.get('[data-testid="document-description-input"]').should( | ||
'have.value', | ||
`. Parties by ${today} shall file a status report. Case is stricken from the current trial session.`, | ||
); | ||
cy.get('[data-testid="judge-select"]').should('have.value', 'Colvin'); | ||
cy.get('[data-testid="docket-entry-preview-text"]').should( | ||
'have.text', | ||
`Docket entry preview: Order that jurisdiction is retained by Judge Colvin. Parties by ${today} shall file a status report. Case is stricken from the current trial session.`, | ||
); | ||
}); | ||
}); | ||
|
||
function judgeOrChambersCreatesStatusReportOrder( | ||
today: string, | ||
jurisdictionRetained: boolean = false, | ||
chambersUser: boolean = false, | ||
) { | ||
if (chambersUser) { | ||
loginAsColvinChambers(); | ||
} else { | ||
loginAsColvin(); | ||
} | ||
cy.visit(`/case-detail/${docketNumber}`); | ||
cy.get('#tab-document-view').click(); | ||
cy.contains('Status Report').click(); | ||
cy.get('[data-testid="status-report-order-button"]').click(); | ||
cy.get('[data-testid="order-type-status-report"]').check({ force: true }); | ||
cy.get('#status-report-due-date-picker').type(today); | ||
|
||
if (jurisdictionRetained) { | ||
cy.get('#stricken-from-trial-sessions-label').click(); | ||
cy.get( | ||
'#jurisdiction-form-group > :nth-child(2) > .usa-radio__label', | ||
).click(); | ||
cy.get('#jurisdiction-retained').check(); | ||
} | ||
cy.get('[data-testid="save-draft-button"]').click(); | ||
cy.get('[data-testid="sign-pdf-canvas"]').click(); | ||
cy.get('[data-testid="save-signature-button"]').click(); | ||
logout(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try avoiding third-party library selectors. I think we can just do
#document-type
here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing anyplace we use this selector below.