Skip to content

Commit

Permalink
Merge branch 'staging' into 10549-design-debt
Browse files Browse the repository at this point in the history
  • Loading branch information
btejha authored Dec 13, 2024
2 parents ce2f89d + af8e9ca commit bbb02b3
Show file tree
Hide file tree
Showing 306 changed files with 541,475 additions and 5,631 deletions.
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/git-shallow-clone@2.8.0

efcms-docker-image: &efcms-docker-image $AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/ef-cms-us-east-1:4.3.19
efcms-docker-image: &efcms-docker-image $AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/ef-cms-us-east-1:4.3.21.1

parameters:
run_build_and_deploy:
Expand Down
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ module.exports = {
'rect',
'reindex',
'renderer',
'repo',
'rescan',
'restapi',
'riker',
Expand Down Expand Up @@ -440,6 +441,7 @@ module.exports = {
'wicg',
'workitem',
'workitems',
'xlsx',
'xpos',
'zendesk',
],
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ RUN apt-get install -y \
jq \
graphicsmagick \
ghostscript \
chromium \
openssh-client \
postgresql-client \
sudo
Expand All @@ -38,7 +37,7 @@ 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.22.4.zip" -o "awscliv2.zip" && \
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.22.6.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
rm -rf awscliv2.zip
Expand Down
7 changes: 6 additions & 1 deletion cypress/helpers/authentication/login-as-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ export function loginAsDocketClerk() {
}

export function loginAsDocketClerk1() {
cy.login('docketclerk1');
login({ email: 'docketclerk1@example.com' });
cy.get('[data-testid="inbox-tab-content"]').should('exist');
}

export function loginAsClerkOfCourt() {
login({ email: 'clerkofcourt@example.com' });
cy.get('[data-testid="inbox-tab-content"]').should('exist');
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { fillPaperFilingForm } from './fill-paper-filing-form';

export function createAndSaveForLaterPaperFiling({
dateReceived,
documentType,
}: {
documentType: string;
dateReceived: string;
}) {
fillPaperFilingForm({ dateReceived, documentType });

cy.get('[data-testid="save-for-later"]').click();
}
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
import { attachFile } from '../../../file/upload-file';
import { selectTypeaheadInput } from '../../../components/typeAhead/select-typeahead-input';
import { fillPaperFilingForm } from './fill-paper-filing-form';

export function createAndServePaperFiling(
documentType: string,
dateReceived: string,
) {
cy.get('[data-testid="case-detail-menu-button"]').click();
cy.get('[data-testid="menu-button-add-paper-filing"]').click();
cy.get(
'.usa-date-picker__wrapper > [data-testid="date-received-picker"]',
).type(dateReceived);
selectTypeaheadInput('primary-document-type-search', documentType);
cy.get('[data-testid="filed-by-option"]').click();
cy.get('[data-testid="objections-No"]').click();
cy.get('[data-testid="upload-pdf-button"]').click();

attachFile({
filePath: '../../helpers/file/sample.pdf',
selector: 'input#primaryDocumentFile-file',
selectorToAwaitOnSuccess: '[data-testid="remove-pdf"]',
});
export function createAndServePaperFiling({
dateReceived,
documentType,
isPaperCase = true,
}: {
documentType: string;
dateReceived: string;
isPaperCase?: boolean;
}) {
fillPaperFilingForm({ dateReceived, documentType });

cy.get('[data-testid="save-and-serve"]').click();
cy.get('[data-testid="modal-button-confirm"]').click();
cy.get('[data-testid="print-paper-service-done-button"]').click();
if (isPaperCase)
cy.get('[data-testid="print-paper-service-done-button"]').click();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { attachFile } from '../../../file/upload-file';
import { selectTypeaheadInput } from '../../../components/typeAhead/select-typeahead-input';

export function fillPaperFilingForm({
dateReceived,
documentType,
}: {
documentType: string;
dateReceived: string;
}) {
cy.get('[data-testid="case-detail-menu-button"]').click();
cy.get('[data-testid="menu-button-add-paper-filing"]').click();
cy.get(
'.usa-date-picker__wrapper > [data-testid="date-received-picker"]',
).type(dateReceived);
selectTypeaheadInput('primary-document-type-search', documentType);
cy.get('[data-testid="filed-by-option"]').click();
cy.get('[data-testid="objections-No"]').click();
cy.get('[data-testid="upload-pdf-button"]').click();

attachFile({
filePath: '../../helpers/file/sample.pdf',
selector: 'input#primaryDocumentFile-file',
selectorToAwaitOnSuccess: '[data-testid="remove-pdf"]',
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ export function createAndServePaperPetition(
];

expectedDocuments.forEach(({ eventCode, index, servedTo }) => {
cy.get(`[data-testid="docket-entry-index-${index}-eventCode"]`).should(
cy.get(`[data-testid="docket-entry-eventCode-${index}"]`).should(
'have.text',
eventCode,
);
cy.get(
`[data-testid="docket-entry-index-${index}-servedPartiesCode"]`,
`[data-testid="docket-entry-servedPartiesCode-${index}"]`,
).should('have.text', servedTo);
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/helpers/retry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function retry(cb: () => Cypress.Chainable<boolean>, maxAttempts = 5) {
}
});
} else {
throw new Error('cypress failed to run a successful retry block');
throw new Error('cypress failed to successfully run a retry block');
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { checkA11y } from '../../../../support/generalCommands/checkA11y';

describe('Trial Sessions - Public Accessibility', () => {
beforeEach(() => {
Cypress.session.clearCurrentSessionData();
});

it('should be free of a11y issues', () => {
cy.visit('/trial-sessions');
checkA11y();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,25 @@ describe('Docket clerk views consolidated case', function () {
});

it('should persist the selected sort filter by navigating away from the tab', () => {
cy.get('select[name="docketRecordSort.111-19"]').should(
'have.value',
'byDate',
);
cy.get('select[name="docketRecordSort.111-19"]').select('Newest');
cy.get('[data-testid="descriptionDisplay-sortable-button"]')
.find('svg')
.invoke('attr', 'data-icon')
.should('equal', 'exchange-alt');

cy.get('[data-testid="descriptionDisplay-sortable-button"]').click();

cy.get('[data-testid="descriptionDisplay-sortable-button"]')
.find('svg')
.invoke('attr', 'data-icon')
.should('equal', 'long-arrow-alt-up');

cy.get('#tab-document-view').click();
cy.get('#tab-docket-sub-record').click();
cy.get('select[name="docketRecordSort.111-19"]').should(
'have.value',
'byDateDesc',
);

cy.get('[data-testid="descriptionDisplay-sortable-button"]')
.find('svg')
.invoke('attr', 'data-icon')
.should('equal', 'long-arrow-alt-up');
});

it('should persist the populated consolidated cases in the overview tab when petitioner counsel is added to parties', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
import { attachFile } from '../../../../../../helpers/file/upload-file';
import { loginAsPetitioner } from '../../../../../../helpers/authentication/login-as-helpers';
import { createAndServePaperFiling } from '../../../../../../helpers/caseDetail/docketRecord/paperFiling/create-and-serve-paper-filing';
import { createAndServePaperPetition } from '../../../../../../helpers/fileAPetition/create-and-serve-paper-petition';
import {
createMessage,
enterSubject,
fillOutMessageField,
selectRecipient,
selectSection,
sendMessage,
} from '../../../../../support/pages/document-qc';
import { goToCase } from '../../../../../../helpers/caseDetail/go-to-case';
import {
loginAsClerkOfCourt,
loginAsDocketClerk1,
loginAsPetitioner,
} from '../../../../../../helpers/authentication/login-as-helpers';
import { petitionerCreatesElectronicCaseWithSpouse } from '../../../../../../helpers/fileAPetition/petitioner-creates-electronic-case';
import { petitionsClerkServesPetition } from '../../../../../../helpers/documentQC/petitionsclerk-serves-petition';
import { selectTypeaheadInput } from '../../../../../../helpers/components/typeAhead/select-typeahead-input';

describe('Judge`s chambers stamps an order', () => {
it('should create an order, serve it, and apply a stamp to it', () => {
it('should create an order, serve it, apply a stamp to it, then redirect to Drafts of case detail', () => {
loginAsPetitioner();
petitionerCreatesElectronicCaseWithSpouse().then(docketNumber => {
petitionsClerkServesPetition(docketNumber);
Expand Down Expand Up @@ -35,7 +50,8 @@ describe('Judge`s chambers stamps an order', () => {
);

// Apply a stamp
cy.login('colvinschambers', `case-detail/${docketNumber}`);
loginAsClerkOfCourt();
goToCase(docketNumber);
cy.get('[data-testid="document-viewer-link-M006"]').last().click();
cy.get('[data-testid="apply-stamp"]').click();
cy.get('[data-testid="status-report-or-stip-decision-due-date"]').click();
Expand Down Expand Up @@ -67,4 +83,47 @@ describe('Judge`s chambers stamps an order', () => {
);
});
});

it('should allow judge to stamp motion from Message View and redirect to MessageDetail', () => {
createAndServePaperPetition().then(({ docketNumber }) => {
loginAsDocketClerk1();
goToCase(docketNumber);
createAndServePaperFiling({
dateReceived: '01/01/2022',
documentType: 'Motion to Proceed Remotely',
});
cy.get(
'[data-testid="docket-record-table"] td:contains("Motion to Proceed Remotely")',
)
.parent()
.invoke('attr', 'data-testid')
.then(docketEntryId => {
createMessage();
selectSection('Clerk of the Court');
selectRecipient('Test Clerk of Court');
enterSubject();
fillOutMessageField();
cy.get('[data-testid="select-document"]').select(docketEntryId!);
sendMessage();
loginAsClerkOfCourt();
cy.get(
'.message-subject > .message-document-title > [data-testid="messages-individual-inbox-subject-cell"]',
)
.first()
.click();
cy.get('[data-testid="apply-stamp"]').click();
cy.get('[data-testid="motion-disposition-Granted"]').click();
cy.get('[data-testid="save-signature-button"]').click();
cy.get('[data-testid="success-alert"]').contains(
'Motion to Proceed Remotely stamped successfully.',
);
cy.get('.attachment-viewer-button')
.contains('Motion to Proceed Remotely')
.should('be.visible');
cy.get('.attachment-viewer-button')
.contains('Motion to Proceed Remotely GRANTED')
.should('be.visible');
});
});
});
});
Loading

0 comments on commit bbb02b3

Please sign in to comment.