-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'staging' into 10282-design-debt
- Loading branch information
Showing
92 changed files
with
2,195 additions
and
3,175 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ version: 2.1 | |
orbs: | ||
git-shallow-clone: guitarrapc/[email protected] | ||
|
||
efcms-docker-image: &efcms-docker-image $AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/ef-cms-us-east-1:4.3.8 | ||
efcms-docker-image: &efcms-docker-image $AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/ef-cms-us-east-1:4.3.9 | ||
|
||
parameters: | ||
run_build_and_deploy: | ||
|
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
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
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
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
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
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
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
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
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
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
71 changes: 71 additions & 0 deletions
71
cypress/local-only/tests/integration/blockedCasesReport/blocked-cases-report.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,71 @@ | ||
import { | ||
CASE_STATUS_TYPES, | ||
PROCEDURE_TYPES_MAP, | ||
} from '../../../../../shared/src/business/entities/EntityConstants'; | ||
import { | ||
FORMATS, | ||
formatNow, | ||
} from '../../../../../shared/src/business/utilities/DateHandler'; | ||
import { createAndServePaperPetition } from '../../../../helpers/fileAPetition/create-and-serve-paper-petition'; | ||
import { goToCase } from '../../../../helpers/caseDetail/go-to-case'; | ||
import { loginAsColvin } from '../../../../helpers/authentication/login-as-helpers'; | ||
import { retry } from '../../../../helpers/retry'; | ||
|
||
describe('Blocked Cases Report', () => { | ||
beforeEach(() => { | ||
cy.task('deleteAllFilesInFolder', 'cypress/downloads'); | ||
}); | ||
|
||
it('should show a blocked case in the blocked cases report and the downloaded csv report', () => { | ||
const trialLocation = 'Portland, Maine'; | ||
const [trialCity, trialState] = trialLocation.split(', '); | ||
const procedureType = PROCEDURE_TYPES_MAP.small; | ||
createAndServePaperPetition({ | ||
procedureType, | ||
trialLocation, | ||
}).then(({ docketNumber }) => { | ||
//block case | ||
loginAsColvin(); | ||
goToCase(docketNumber); | ||
cy.get('[data-testid="tab-case-information"]').click(); | ||
cy.get('[data-testid="add-manual-block-button"]').click(); | ||
cy.get('[data-testid="blocked-from-trial-reason-textarea"]').type( | ||
'This case cannot go to trial.', | ||
); | ||
cy.get('[data-testid="modal-button-confirm"]').click(); | ||
cy.get('[data-testid="success-alert"]').contains( | ||
'Case blocked from being set for trial.', | ||
); | ||
|
||
//View report | ||
cy.get('[data-testid="dropdown-select-report"]').click(); | ||
cy.get('[data-testid="blocked-cases-report"]').click(); | ||
|
||
function checkIfOpensearchHasIndexedBlockedCase() { | ||
cy.reload(); | ||
cy.get('[data-testid="trial-location-filter"]').select(trialLocation); | ||
cy.get('[data-testid="procedure-type-filter"]').select(procedureType); | ||
cy.get('[data-testid="case-status-filter"]').select( | ||
CASE_STATUS_TYPES.generalDocket, | ||
); | ||
cy.get('[data-testid="blocked-reason-filter"]').select('Manual Block'); | ||
const selector = `[data-testid="blocked-case-${docketNumber}-row"]`; | ||
return cy.get(selector).then(elements => elements.length > 0); | ||
} | ||
|
||
retry(checkIfOpensearchHasIndexedBlockedCase); | ||
|
||
cy.get('[data-testid="blocked-cases-count"]').should('exist'); | ||
|
||
//download csv | ||
cy.get('[data-testid="export-blocked-case-report"]').click(); | ||
const today = formatNow(FORMATS.MMDDYYYY_UNDERSCORED); | ||
const fileName = `Blocked Cases Report - ${trialCity}_${trialState} ${today}.csv`; | ||
cy.readFile(`cypress/downloads/${fileName}`, 'utf-8').should( | ||
fileContent => { | ||
expect(fileContent).to.include(docketNumber); | ||
}, | ||
); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.