Skip to content
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

staging into exp1 #5402

Merged
merged 78 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
c3a5f52
10001-bug: first draft, which gets things 'working' for primaryDocume…
Mwindo Sep 2, 2024
484111c
10001-design-debt: 'working' sample, but want to get other opinions. …
Mwindo Sep 3, 2024
4193571
10001-design-debt: going with the modal solution, and adding an error…
Mwindo Sep 3, 2024
d5f060c
10001-design-debt: remove console.log and add ts-ignore to a file
Mwindo Sep 3, 2024
a1b1635
10001-design-debt: undo unintentional changes and redundant code
Mwindo Sep 3, 2024
5390175
10001-design-debt: including validation for 10001, 10002, and 10003, …
Mwindo Sep 4, 2024
d39710e
10001-design-debt: first pass at fixing tests, but will probably need…
Mwindo Sep 5, 2024
44231af
10001-design-debt: fix corrupted files tests, and use ^= for selector…
Mwindo Sep 5, 2024
d264534
10001-design-debt: fix uploadFile
Mwindo Sep 5, 2024
f268df6
10455-story: adding validation to ScanBatchPreview uploader and updat…
Mwindo Sep 5, 2024
38a4791
10001-design-debt: remove unintentional default argument
Mwindo Sep 5, 2024
5c57536
10001-design-debt: more test fixes
Mwindo Sep 5, 2024
217f957
10001-design-debt: more test fixes, again
Mwindo Sep 5, 2024
0fff8ca
10001-design-debt: more error fixes
Mwindo Sep 5, 2024
aaa1a1a
10001-design-debt: fixing another test
Mwindo Sep 6, 2024
5a7c976
10001-design-debt: refactoring onSuccess and onError slightly, adding…
Mwindo Sep 6, 2024
7a314ab
10001-design-debt: add unit tests to validation
Mwindo Sep 6, 2024
661f4c1
10001-design-debt: remove console log
Mwindo Sep 6, 2024
d4c13a3
10001-design-debt: add cypress tests specific to the file upload for …
Mwindo Sep 6, 2024
b261cde
10001-story: update error messages
Mwindo Sep 6, 2024
1fe293e
10001-design-debt: pass file to sequence properly
Mwindo Sep 6, 2024
fc12dd2
10001-design-debt: show loading modal when validating file selection
Mwindo Sep 9, 2024
2d431fe
10001-story: fix tests by updating data-testid
Mwindo Sep 9, 2024
b07440c
10001-design-debt: rename uploadFile helper, and remove test comment
Mwindo Sep 9, 2024
f00c25a
10001-design-debt: fix final(?) failing tests
Mwindo Sep 9, 2024
beb9c48
10001-design-debt: getting the messaging to work, but still need to r…
Mwindo Sep 10, 2024
bd8f5f0
Merge remote-tracking branch 'ustc/staging' into 10001-design-debt
Mwindo Sep 10, 2024
7f0dbe9
10001-design-debt: fix failing test after merge from staging
Mwindo Sep 10, 2024
c889e7f
10001-design-debt: fix failing unit tests
Mwindo Sep 10, 2024
8c8cf66
10001-design-debt: update data-testid for file upload error modal
Mwindo Sep 10, 2024
c9d33b5
10001-design-debt: changes to messaging (your file to this file); mod…
Mwindo Sep 10, 2024
c084911
10001-design-debt: add troubleshooting constants
Mwindo Sep 10, 2024
c774ca1
10001-design-debt: fix import issue
Mwindo Sep 10, 2024
b86f86a
10001-design-debt: update comment before push
Mwindo Sep 10, 2024
0551f10
10001-design-debt: decouple error we log from error we display
Mwindo Sep 10, 2024
c21cc90
10001-design-debt: add tests for actions, and remove limitFileSize
Mwindo Sep 11, 2024
fe89285
10001-design-debt: move FileUploadStatusModal to one spot to avoid co…
Mwindo Sep 11, 2024
3798525
10001-design-debt: update errorMessageToLog for generic errors after …
Mwindo Sep 11, 2024
aa2ae86
Merge remote-tracking branch 'ustc/staging' into 10001-design-debt
Mwindo Sep 11, 2024
d5bf96a
10001-design-debt: fix failing unit tests after latest refactor
Mwindo Sep 11, 2024
f98d56e
10001-design-debt: add test
Mwindo Sep 12, 2024
11bbb92
10001-design-debt: fix attachFile in new test
Mwindo Sep 12, 2024
75c0d23
10001-design-debt: use correct selector in light of PR feedback
Mwindo Sep 13, 2024
0c3af28
10001-design-debt: catch corrupt pdf warnings and ensure cypress mimi…
Mwindo Sep 16, 2024
d5341c3
10001-design-debt: fix header validation
Mwindo Sep 17, 2024
5ea72c3
10001-design-debt: update branch to mimic test changes
Mwindo Sep 17, 2024
335130a
10001-design-debt: update troubleshooting link
Mwindo Sep 19, 2024
900678f
10001-design-debt: merge in staging
Mwindo Sep 19, 2024
7942912
Merge branch 'staging' into 10001-design-debt
jimlerza Sep 19, 2024
1d97e63
opex: added a script to quickly revoke a petitioner's e-access to a s…
jimlerza Sep 20, 2024
cf8d1db
opex: check for env vars before executing the AWS calls in the revoke…
jimlerza Sep 20, 2024
27c260d
opex: when revoking a petitioner's e-access, overwrite their contactI…
jimlerza Sep 20, 2024
e43eacc
Merge pull request #5384 from ustaxcourt/opex-revoke-e-access
jimlerza Sep 20, 2024
0b7a44d
updated QC process flow chart pdf
mwestereng1 Sep 20, 2024
476a390
dep-updates-09-23-2024: update package.json via outdated.
pixiwyn Sep 23, 2024
ee7ca6f
dep-updates-09-23-2024: audit fix
pixiwyn Sep 23, 2024
e5ea0a7
dep-updates-09-23-2024: update sass version
pixiwyn Sep 23, 2024
0e32d73
dep-updates-09-23-2024: update dockerfile and aws provider
pixiwyn Sep 23, 2024
1b04808
dep-updates-09-23-2024: add new ecr
pixiwyn Sep 23, 2024
7f61fea
update tf version
pixiwyn Sep 23, 2024
e6a31a4
10501-bug: sync branch with test
Mwindo Sep 23, 2024
152726d
10501-bug: undo unnecessary change to document-qc.ts
Mwindo Sep 23, 2024
b713a34
Merge pull request #5395 from flexion/10501-bug
jimlerza Sep 23, 2024
c9f5f74
Merge branch 'staging' into dep-updates-09-23-2024
pixiwyn Sep 23, 2024
46fed0c
Merge branch 'staging' into ux-update
TomElliottFlexion Sep 24, 2024
fadb459
Merge pull request #5394 from flexion/dep-updates-09-23-2024
jimlerza Sep 24, 2024
8cd2105
Merge branch 'staging' into ux-update
jimlerza Sep 24, 2024
f2929e1
Merge pull request #5388 from flexion/ux-update
jimlerza Sep 24, 2024
6133555
10001-design-debt: disallow any pdfs that block user edits
Mwindo Sep 20, 2024
464d9b8
10001-design-debt: rename file
Mwindo Sep 20, 2024
8276d0a
10001-design-debt: fix default attachFile behavior
Mwindo Sep 20, 2024
d9b3f55
10001-design-debt: only use binary encoding as needed
Mwindo Sep 20, 2024
de7dc9f
10001-design-debt: set file encoding to binary in upload-court-issued…
Mwindo Sep 20, 2024
b72b999
10001-design-debt: add skipFileTypeValidation :/
Mwindo Sep 20, 2024
d58ab7e
10001-design-debt: actually use skipFileTypeValidation
Mwindo Sep 20, 2024
6c8b973
10001-design-debt: remove what looks like a spurious autocorrect change
Mwindo Sep 25, 2024
83611ab
Merge branch 'staging' into 10001-design-debt
Mwindo Sep 25, 2024
d785673
Merge pull request #5312 from flexion/10001-design-debt
jimlerza Sep 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.10
efcms-docker-image: &efcms-docker-image $AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/ef-cms-us-east-1:4.3.11

parameters:
run_build_and_deploy:
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Note: node-20.14.0-chrome-125.0.* is debian 12.5 (bookworm)

FROM cypress/browsers:node-20.17.0-chrome-128.0.6613.119-1-ff-130.0-edge-128.0.2739.63-1
FROM cypress/browsers:node-20.17.0-chrome-128.0.6613.137-1-ff-130.0.1-edge-128.0.2739.67-1

WORKDIR /home/app

Expand Down Expand Up @@ -37,12 +37,12 @@ RUN apt-get install -y build-essential
RUN apt-get install -y libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev

ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.17.49.zip" -o "awscliv2.zip" && \
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.17.56.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
rm -rf awscliv2.zip

RUN wget -q -O terraform.zip https://releases.hashicorp.com/terraform/1.9.5/terraform_1.9.5_linux_amd64.zip && \
RUN wget -q -O terraform.zip https://releases.hashicorp.com/terraform/1.9.6/terraform_1.9.6_linux_amd64.zip && \
unzip -o terraform.zip terraform && \
rm terraform.zip && \
cp terraform /usr/local/bin/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { assertExists, retry } from '../../../helpers/retry';
import { attachFile } from '../../../helpers/file/upload-file';
import { createAPractitioner } from '../../../helpers/accountCreation/create-a-practitioner';
import { createAndServePaperPetition } from '../../../helpers/fileAPetition/create-and-serve-paper-petition';
import { faker } from '@faker-js/faker';
Expand Down Expand Up @@ -104,10 +105,11 @@ describe('Advanced Search', () => {
cy.get('[data-testid="case-detail-menu-button"]').click();
cy.get('[data-testid="menu-button-upload-pdf"]').click();
cy.get('[data-testid="upload-description"]').type(opinionTitle);
cy.get('[data-testid="primary-document-file"]').attachFile(
'../../helpers/file/sample.pdf',
);
cy.get('[data-testid="upload-file-success"]').should('exist');
attachFile({
filePath: '../../helpers/file/sample.pdf',
selector: '[data-testid="primary-document-file"]',
selectorToAwaitOnSuccess: '[data-testid^="upload-file-success"]',
});
cy.get('[data-testid="save-uploaded-pdf-button"]').click();
cy.get('[data-testid="add-court-issued-docket-entry-button"]').click();
cy.get(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* eslint-disable promise/no-nesting */
import { assertExists, retry } from '../../../helpers/retry';
import { attachSamplePdfFile } from '../../../helpers/file/upload-file';
import { goToCase } from '../../../helpers/caseDetail/go-to-case';
import {
loginAsAdmissionsClerk,
loginAsPetitioner,
} from '../../../helpers/authentication/login-as-helpers';
import { petitionerCreatesElectronicCase } from '../../../helpers/fileAPetition/petitioner-creates-electronic-case';
import { petitionsClerkServesPetition } from '../../../helpers/documentQC/petitionsclerk-serves-petition';
import { uploadFile } from '../../../helpers/file/upload-file';

describe('Document QC Complete', () => {
const docketSectionMessage = 'To CSS under Docket Section';
Expand Down Expand Up @@ -202,7 +202,7 @@ function petitionerFilesADocument(docketNumber: string) {
cy.get('[data-testid="document-type"]').type('Exhibit(s)');
cy.get('#react-select-2-option-0').click();
cy.get('[data-testid="submit-document"]').click();
uploadFile('primary-document');
attachSamplePdfFile('primary-document');
cy.get('#submit-document').click();
cy.get('[data-testid="redaction-acknowledgement-label"]').click();
cy.get('[data-testid="file-document-review-submit-document"]').click();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { attachFile } from '../../../file/upload-file';
import { selectTypeaheadInput } from '../../../components/typeAhead/select-typeahead-input';

export function createAndServePaperFiling(
Expand All @@ -14,9 +15,11 @@ export function createAndServePaperFiling(
cy.get('[data-testid="objections-No"]').click();
cy.get('[data-testid="upload-pdf-button"]').click();

cy.get('input#primaryDocumentFile-file').attachFile(
'../../helpers/file/sample.pdf',
);
attachFile({
filePath: '../../helpers/file/sample.pdf',
selector: 'input#primaryDocumentFile-file',
selectorToAwaitOnSuccess: '[data-testid="remove-pdf"]',
});

cy.get('[data-testid="save-and-serve"]').click();
cy.get('[data-testid="modal-button-confirm"]').click();
Expand Down
1 change: 1 addition & 0 deletions cypress/helpers/file/non-pdf.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is a non-pdf file used for tests that expect a pdf but don't get one.
Binary file added cypress/helpers/file/password-protected-pdf.pdf
Binary file not shown.
Binary file added cypress/helpers/file/readonly-pdf.pdf
Binary file not shown.
22 changes: 20 additions & 2 deletions cypress/helpers/file/upload-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,31 @@
* This function assumes the label associated with the file input has a similar test id:
* data-testid="{YOUR_ID}-label"
*/
export function uploadFile(testId: string) {
export function attachSamplePdfFile(testId: string) {
cy.get(`[data-testid="${testId}-label"]`).should(
'not.have.class',
'validated',
);
cy.get(`[data-testid="${testId}"]`).attachFile(
'../../helpers/file/sample.pdf',
);
cy.get('[data-testid="upload-file-success"]').should('exist');
cy.get('[data-testid^="upload-file-success"]').should('exist');
}

export function attachFile({
encoding,
filePath,
selector,
selectorToAwaitOnSuccess,
}: {
selector: string;
filePath: string;
selectorToAwaitOnSuccess?: string;
encoding?: 'binary' | 'utf8' | 'latin1'; // Expand as needed
}) {
cy.get(selector).attachFile({ encoding, filePath });
if (selectorToAwaitOnSuccess) {
cy.get('[data-testid="loading-overlay"]').should('not.exist');
cy.get(selectorToAwaitOnSuccess).should('exist');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
CASE_TYPES_MAP,
PARTY_TYPES,
} from '../../../shared/src/business/entities/EntityConstants';
import { attachFile } from '../file/upload-file';
import { faker } from '@faker-js/faker';

export function createAndServePaperPetitionMultipleParties(
Expand Down Expand Up @@ -58,14 +59,20 @@ export function createAndServePaperPetitionMultipleParties(
cy.get('[data-testid="case-type-select"]').select(CASE_TYPES_MAP.passport);
cy.get('#upload-mode-upload').click();
cy.get('#uploadMode').check();
cy.get('#petitionFile-file').attachFile('../../helpers/file/sample.pdf');
attachFile({
filePath: '../../helpers/file/sample.pdf',
selector: '#petitionFile-file',
selectorToAwaitOnSuccess: '[data-testid="remove-pdf"]',
});
cy.get('#tabButton-requestForPlaceOfTrialFile > .button-text').click();
cy.get('#scan-mode-radios').click();
cy.get('#upload-mode-upload').click();
cy.get('#uploadMode').check();
cy.get('#requestForPlaceOfTrialFile-file').attachFile(
'../../helpers/file/sample.pdf',
);
attachFile({
filePath: '../../helpers/file/sample.pdf',
selector: '#requestForPlaceOfTrialFile-file',
selectorToAwaitOnSuccess: '[data-testid="remove-pdf"]',
});
cy.get('[data-testid="submit-paper-petition"]').click();
return cy
.get('.docket-number-header a')
Expand Down
66 changes: 47 additions & 19 deletions cypress/helpers/fileAPetition/create-and-serve-paper-petition.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ProcedureType } from '../../../shared/src/business/entities/EntityConstants';
import { attachFile } from '../file/upload-file';
import { loginAsPetitionsClerk1 } from '../authentication/login-as-helpers';

export function createAndServePaperPetition(
Expand Down Expand Up @@ -65,38 +66,55 @@ export function createAndServePaperPetition(
cy.get('[data-testid="case-type-select"]').select('CDP (Lien/Levy)');
cy.get('#upload-mode-upload').click();
cy.get('#uploadMode').check();
cy.get('#petitionFile-file').attachFile('../../helpers/file/sample.pdf');
attachFile({
filePath: '../../helpers/file/sample.pdf',
selector: '#petitionFile-file',
selectorToAwaitOnSuccess: '[data-testid="remove-pdf"]',
});
cy.get('#tabButton-requestForPlaceOfTrialFile > .button-text').click();
cy.get('#scan-mode-radios').click();
cy.get('#upload-mode-upload').click();
cy.get('#uploadMode').check();
cy.get('#requestForPlaceOfTrialFile-file').attachFile(
'../../helpers/file/sample.pdf',
);
attachFile({
filePath: '../../helpers/file/sample.pdf',
selector: '#requestForPlaceOfTrialFile-file',
selectorToAwaitOnSuccess: '[data-testid="remove-pdf"]',
});

cy.get('[data-testid="tabButton-stinFile"]').click();
cy.get('[data-testid="upload-pdf-button"]').click();
cy.get('input#stinFile-file').attachFile('../../helpers/file/sample.pdf');
attachFile({
filePath: '../../helpers/file/sample.pdf',
selector: 'input#stinFile-file',
selectorToAwaitOnSuccess: '[data-testid="remove-pdf"]',
});

cy.get('[data-testid="tabButton-attachmentToPetitionFile"]').click();
cy.get('[data-testid="upload-pdf-button"]').click();
cy.get('input#attachmentToPetitionFile-file').attachFile(
'../../helpers/file/sample.pdf',
);
attachFile({
filePath: '../../helpers/file/sample.pdf',
selector: 'input#attachmentToPetitionFile-file',
selectorToAwaitOnSuccess: '[data-testid="remove-pdf"]',
});
cy.get('[data-testid="remove-pdf"]');

cy.get('[data-testid="tabButton-corporateDisclosureFile"]').click();
cy.get('[data-testid="upload-pdf-button"]').click();
cy.get('input#corporateDisclosureFile-file').attachFile(
'../../helpers/file/sample.pdf',
);
attachFile({
filePath: '../../helpers/file/sample.pdf',
selector: 'input#corporateDisclosureFile-file',
selectorToAwaitOnSuccess: '[data-testid="remove-pdf"]',
});

cy.get(
'[data-testid="tabButton-applicationForWaiverOfFilingFeeFile"]',
).click();
cy.get('[data-testid="upload-pdf-button"]').click();
cy.get('input#applicationForWaiverOfFilingFeeFile-file').attachFile(
'../../helpers/file/sample.pdf',
);
attachFile({
filePath: '../../helpers/file/sample.pdf',
selector: 'input#applicationForWaiverOfFilingFeeFile-file',
selectorToAwaitOnSuccess: '[data-testid="remove-pdf"]',
});

cy.get('[data-testid="submit-paper-petition"]').click();
return cy
Expand Down Expand Up @@ -198,17 +216,27 @@ export function createAndServePaperPetitionMyselfAndSpouse() {
cy.get('[data-testid="case-type-select"]').select('Deficiency');

cy.get('#upload-mode-upload').click();
cy.get('#petitionFile-file').attachFile('../../helpers/file/sample.pdf');
attachFile({
filePath: '../../helpers/file/sample.pdf',
selector: '#petitionFile-file',
selectorToAwaitOnSuccess: '[data-testid="remove-pdf"]',
});

cy.get('#tabButton-requestForPlaceOfTrialFile > .button-text').click();
cy.get('#upload-mode-upload').click();
cy.get('#requestForPlaceOfTrialFile-file').attachFile(
'../../helpers/file/sample.pdf',
);
attachFile({
filePath: '../../helpers/file/sample.pdf',
selector: '#requestForPlaceOfTrialFile-file',
selectorToAwaitOnSuccess: '[data-testid="remove-pdf"]',
});

cy.get('[data-testid="tabButton-stinFile"]').click();
cy.get('[data-testid="upload-pdf-button"]').click();
cy.get('input#stinFile-file').attachFile('../../helpers/file/sample.pdf');
attachFile({
filePath: '../../helpers/file/sample.pdf',
selector: 'input#stinFile-file',
selectorToAwaitOnSuccess: '[data-testid="remove-pdf"]',
});

cy.get('[data-testid="submit-paper-petition"]').click();

Expand Down
Loading
Loading