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

10102-Story: Judge/CA/ADC: Generate Response To Status Report #5108

Merged
merged 133 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
af58778
Start building out the status report order response form
akuny Jun 19, 2024
eb243ad
Add class to FormGroup to add padding
akuny Jun 20, 2024
b9fe719
Clean up html attributes, aria attributes, in OrderResponse component
akuny Jun 20, 2024
8360bd2
Continue tidying OrderResponse component and associated logic
akuny Jun 20, 2024
29690e1
Update notes after rereading spec
akuny Jun 20, 2024
ceebd14
More cleanup
akuny Jun 20, 2024
57909b1
Add validation action for StatusReportOrderResponseForm
akuny Jun 20, 2024
9fd43dd
10102: update notes
pixiwyn Jun 20, 2024
6309d0d
10102: Conditional show issueOrder if isLeadCase
akuny Jun 20, 2024
edf8f5c
Merge branch '10102-story' of https://github.com/flexion/ef-cms into …
akuny Jun 20, 2024
24d2db2
10102: Start wiring up sequence to handle validation and submission o…
akuny Jun 20, 2024
50e90e2
Refine validation logic and error messages
akuny Jun 25, 2024
1a6c173
Slight update to docket entry description field
akuny Jun 25, 2024
29b4d16
10102: Update notes + add validation if user blanks out docket entry …
pixiwyn Jun 25, 2024
86c7cfa
10102: update notes
pixiwyn Jun 25, 2024
1dc3ee2
10102: begin submitting order
pixiwyn Jun 25, 2024
c14b5f1
10102: Update notes
pixiwyn Jun 25, 2024
fc33990
10102: Begin Adding in Text for PDF Generation
pixiwyn Jun 26, 2024
09856b3
10102-story: Updated conditional text for order
akuny Jun 27, 2024
924db7e
10102-story: added filing date and status report index to prepare order
akuny Jun 27, 2024
41d9a52
10102-story: add in richtext formatting
pixiwyn Jun 27, 2024
93664d9
Set up PDF preview
akuny Jun 28, 2024
ab3d112
10102-story: continue refining pdf preview
pixiwyn Jun 28, 2024
2401586
Merge branch 'staging' of github.com:ustaxcourt/ef-cms into 10102-story
pixiwyn Jun 28, 2024
5ab567b
10102-story: update local seed data to include status reports + write…
pixiwyn Jun 28, 2024
66068a8
10102-story: update date formatting and notes post convo with pm
pixiwyn Jun 28, 2024
f4e8e37
10102-story: match form with mocks
pixiwyn Jun 28, 2024
7bdc270
Conditionally append "It is further" to status report order response …
akuny Jul 1, 2024
7a70642
Work on formatting of text in pdf
akuny Jul 1, 2024
d343a45
merge ustc staging into branch
Mwindo Jul 1, 2024
5023d6b
10102-story: unit tests for setStatusReportOrderResponseFormAction an…
Mwindo Jul 1, 2024
401d1b0
Merge branch 'staging' into 10102-story
pixiwyn Jul 2, 2024
811ce1a
10102-story: route to status report order response form on edit
pixiwyn Jul 2, 2024
9e5aebb
10102-story: fix date handling on setEditStatusReportOrderResponseForm
pixiwyn Jul 2, 2024
c6d8dac
10102-story: finish edit routing for status report order response
pixiwyn Jul 2, 2024
835d516
10102-story: update notes
pixiwyn Jul 2, 2024
d90badc
10102-story: default docket entry description to Order
Mwindo Jul 3, 2024
31b6c71
10102-story: fix accessibility test and finish units test prepareStat…
Mwindo Jul 3, 2024
a17eb81
10102-story: resolve clear form issue on edit
Mwindo Jul 3, 2024
b73a6cb
10102-story: wrap up date formatting on generated pdf, default docket…
Mwindo Jul 3, 2024
b7d7e57
10102-story: generate pdf preview automatically upon edit of order re…
Mwindo Jul 3, 2024
5c2e575
test Chris permissions
Mwindo Jul 3, 2024
0f18736
10102-story: start on integration tests
pixiwyn Jul 3, 2024
8d56afe
10102-story: Move StatusReportOrderResponse sequences and actions int…
akuny Jul 4, 2024
cc09bbb
10102-story: refine naming conventions
akuny Jul 4, 2024
fddea40
10102-story: create dummy pdf for status report
akuny Jul 4, 2024
7b25388
10102: added additional types
akuny Jul 4, 2024
0a571f8
10102-story: fix type errors
akuny Jul 4, 2024
abf1c85
10102-story: added local image file and fixed bugs
akuny Jul 4, 2024
17469fd
10102-story: expand integration test suite
akuny Jul 4, 2024
8e5b8ab
10102-story: wrap up unit tests on actions
pixiwyn Jul 4, 2024
ec83ee4
10102-story: move formatStatusReportFilingDateAction
pixiwyn Jul 4, 2024
769fd5e
10102-story: add unit test for status report order response helper
pixiwyn Jul 4, 2024
cd8174b
10102-story: met unit test code coverage thus updating notes to remov…
pixiwyn Jul 4, 2024
8f682d5
10102-story: update css form StatusReportOrderResponse component and …
akuny Jul 5, 2024
0923fcf
10102-story: fix StatusReportOrderResponseForm validation logic so th…
akuny Jul 5, 2024
a93c229
Update notes
akuny Jul 5, 2024
c26c0cf
10102-story: added a route for creating an order response and for edi…
akuny Jul 5, 2024
7b0f264
10102-story: refactor so that navigateToStatusReportOrderResponseActi…
akuny Jul 5, 2024
1767f2a
10102-story: write unit tests for two actions
akuny Jul 5, 2024
fb5efec
10102-story: update unit tests affected by changes made after they we…
akuny Jul 5, 2024
387f13d
10102-story: update notes doc
akuny Jul 5, 2024
1783540
10102-story: get response order working from messages tab with proper…
Mwindo Jul 8, 2024
c6b450d
10102-story: add unit tests for shouldUnsetParentMessageIdAction and …
pixiwyn Jul 8, 2024
d402a20
10102-story: update css on StatusReportOrderResponse.tsx to add margi…
Mwindo Jul 9, 2024
e5f1c7e
10102-story: removing the usa-radio__block class from my previous com…
Mwindo Jul 9, 2024
5c8c831
10102-story: save scraping pdf functionality in the integration tests
pixiwyn Jul 9, 2024
de75de0
10102-story: outline integration test
pixiwyn Jul 9, 2024
026bea3
10102-story: vertically align jurisdiction radio buttons
Mwindo Jul 9, 2024
b81359e
Fix syntax in cypress test suite
akuny Jul 9, 2024
11bdea6
10102-story: Factor navigation in to navigateToStatusReportOrderRespo…
akuny Jul 9, 2024
4260877
10102-story: wrapped up edit status report order response from messag…
Mwindo Jul 9, 2024
8dcf353
Merge branch 'staging' of github.com:ustaxcourt/ef-cms into 10102-story
Mwindo Jul 9, 2024
41d0474
10102-story: fix route in judge.cy.ts and add tests for creating/edit…
Mwindo Jul 10, 2024
dfbb4f2
10102-story: add two tests for creating/editing orders from messages,…
Mwindo Jul 10, 2024
cd6e8c5
10102-story: adding some test cypress helper functions and extending …
Mwindo Jul 10, 2024
871829b
10102-story: slight refactor to cypress tests
Mwindo Jul 10, 2024
c74c671
10102-story: reactor to resolve refresh issues
pixiwyn Jul 10, 2024
8985026
Merge branch '10102-story' of github.com:flexion/ef-cms into 10102-story
pixiwyn Jul 10, 2024
8211eb5
10102-story: add missing unit tests and fix naming
pixiwyn Jul 10, 2024
d539682
10102-story: add docket clerk tests
Mwindo Jul 10, 2024
477444c
Merge branch 'staging' of github.com:ustaxcourt/ef-cms into 10102-story
Mwindo Jul 10, 2024
2349ee6
10102-story: fix validation issue that occurred after merging in stag…
Mwindo Jul 11, 2024
a500435
Merge branch 'staging' of github.com:ustaxcourt/ef-cms into 10102-story
Mwindo Jul 11, 2024
9382953
10102-story: getting petitionerFilesADocument.test.ts to pass
Mwindo Jul 11, 2024
fff0590
Merge branch 'staging' into 10102-story
jimlerza Jul 11, 2024
fc80e01
10102-story: fixed failing unit test, and refactored/extended cypress…
Mwindo Jul 11, 2024
3185bb8
Merge branch '10102-story' of github.com:flexion/ef-cms into 10102-story
Mwindo Jul 11, 2024
3d250b5
10102-story: fix createOrderHelper unit test, and fix file-status-rep…
Mwindo Jul 11, 2024
090fb4e
10102-story: temporarily fix a flaky test
Mwindo Jul 11, 2024
8912b49
10102: checkDocumentTypeAction test
TomElliottFlexion Jul 11, 2024
597fc03
10102-story: update notes
pixiwyn Jul 11, 2024
7c75fd1
10102-story: update date handling in cypress test suite
Mwindo Jul 12, 2024
0a04f70
10102-story: update notes and remove inline style for lead case radio…
Mwindo Jul 12, 2024
5e4da26
Update notes
akuny Jul 12, 2024
76896d7
Add two pieces of missing functionality
akuny Jul 12, 2024
d5ee500
10102-story: fix issue with language of 'all cases in group' vs. 'jus…
Mwindo Jul 12, 2024
dd403c8
10102-story: fixing unit tests for prepareStatusReportOrder and addin…
Mwindo Jul 15, 2024
c9c3a00
10102: Add redirect url from messages
akuny Jul 15, 2024
df4eb06
10102: refactor docketEntryIdToEdit
akuny Jul 15, 2024
41b2db2
10102-story: prevent horizontal resize on textarea and remove notes
akuny Jul 15, 2024
5dd37a8
Merge branch 'staging' of https://github.com/ustaxcourt/ef-cms into 1…
akuny Jul 15, 2024
05c9b1e
10102-story: remove old TODO, and prevent edit-status-report-order-re…
Mwindo Jul 17, 2024
25d4f3d
10102-story: address feedback by adding constants for issueOrder, ord…
Mwindo Jul 17, 2024
fb121b6
Merge branch 'staging' into 10102-story
Mwindo Jul 17, 2024
ca6932a
10102-story: adding a slightly better selector in a couple of cypress…
Mwindo Jul 17, 2024
63c0044
Merge branch 'staging' into 10102-story
pixiwyn Jul 19, 2024
b299f13
10102-story: potential fix for flaky test
Mwindo Jul 19, 2024
b9b749a
10102-story: incorporate review feedback
Mwindo Jul 29, 2024
ebed810
Merge remote-tracking branch 'ustc/staging' into 10102-story
Mwindo Jul 29, 2024
432503e
10102-story: fix type
Mwindo Jul 29, 2024
ba1ad21
10102-story: feedback part 1, rename everything
Mwindo Jul 31, 2024
c5b792e
10102-story: restrict docket clerk access to editing status report or…
akuny Jul 31, 2024
cfe5b79
10102-story: restrict docket clerk (etc.) access to editing status re…
Mwindo Aug 1, 2024
8489b27
10102-story: remove docket-entry-description
Mwindo Aug 1, 2024
2829d6a
10102-story: a few fixes for the last commit
Mwindo Aug 1, 2024
5624c8e
10102-story: begin refactor of draftDocumentViewerHelper and messageD…
akuny Aug 2, 2024
56e7875
10102-story: reorder imports consistently in draftDocumentViewerHelpe…
akuny Aug 2, 2024
bd4e632
10102-story: finish first iteration of refactor
akuny Aug 2, 2024
f0e9cae
10102-story: rearrange and rename variables
akuny Aug 2, 2024
5435d4e
10102-story: reorder some boolean checks and modify unit tests
akuny Aug 2, 2024
a196871
10102-story: remove some logging for debugging
akuny Aug 2, 2024
fba2005
10102-story: reordering and renaming a few more variables, and remove…
akuny Aug 2, 2024
719866d
10102-story: undo experimental changes and add a few comments about d…
Mwindo Aug 5, 2024
cfb2268
10102-story: get rid of isEmpty check in clearStatusReportOrderFormAc…
Mwindo Aug 12, 2024
bbf0551
10102-story: change language involving lead cases based on feedback
Mwindo Aug 12, 2024
a83cb20
10102: ensure adding status report order response from message adds a…
Mwindo Aug 13, 2024
c3dc1a8
10102: add tests for checking status report order as attachment from …
Mwindo Aug 13, 2024
d70e32e
Merge remote-tracking branch 'ustc/staging' into 10102-story
Mwindo Aug 14, 2024
047c5d5
Merge branch 'staging' into 10102-story
jimlerza Aug 15, 2024
f5fc7b4
10102-story: fix some typing errors
Mwindo Aug 15, 2024
4f1be36
Merge branch '10102-story' of github.com:flexion/ef-cms into 10102-story
Mwindo Aug 15, 2024
175ddb1
10102-story: update filingDate to be string
Mwindo Aug 15, 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
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export function externalUserSearchesDocketNumber(docketNumber: string) {
cy.get('[data-testid="docket-search-field"]').should('exist');
cy.get('[data-testid="docket-search-field"]').type(docketNumber);
cy.get('[data-testid="search-by-docket-number"]').click();
}
46 changes: 46 additions & 0 deletions cypress/local-only/support/statusReportOrder.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import {
FORMATS,
formatNow,
} from '../../../shared/src/business/utilities/DateHandler';

export const docketNumber = '107-19';
export const leadCaseDocketNumber = '102-67';
export const statusReportDocketEntryId = '178af2d2-fab1-445a-a729-d3da63517a0a';
export const messages = {
statusReport: {
messageId: '73d4365b-8b3a-4b01-9ca3-7087f7a6d4b5',
name: 'Status Report',
},
testStatusReportOrderSigned: {
messageId: '32484c7f-4606-49fc-89f1-27ba1d5596be',
name: 'Test Status Report Order (Signed)',
},
testStatusReportOrderUnsigned: {
messageId: '34483b5b-29de-4ad4-8caa-59f71ad6d906',
name: 'Test Status Report Order (Unsigned)',
},
};
export const expectedPdfLines = [
'On June 28, 2024, a status report was filed (Index no. 5). For cause, it is',
`ORDERED that the parties shall file a further status report by ${formatNow(FORMATS.MONTH_DAY_YEAR)}. It is further`,
'ORDERED that this case is stricken from the trial session. It is further',
'ORDERED that jurisdiction is retained by the undersigned. It is further',
'ORDERED that Here is my additional order text.',
];
export const selectAllOptionsInForm = () => {
cy.get('#order-type-status-report').check({ force: true });
cy.get('#status-report-due-date-picker').type(formatNow(FORMATS.MMDDYYYY));
cy.get('#stricken-from-trial-sessions').check({ force: true });
cy.get('#jurisdiction-retained').check({ force: true });
cy.get('#additional-order-text').type('Here is my additional order text.');
};

export const getLastDraftOrderElementFromDrafts = () => {
return cy.get('button:contains(Order)').last();
};

export const getLastDraftOrderElementIndexFromDrafts = () => {
return getLastDraftOrderElementFromDrafts().then(lastOrderButton => {
return lastOrderButton.index();
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { checkA11y } from '../../../support/generalCommands/checkA11y';
import { loginAsColvin } from '../../../../helpers/authentication/login-as-helpers';

describe('Status Report Order - Judge Accessibility', () => {
beforeEach(() => {
Cypress.session.clearCurrentSessionData();
});

it('should be free of a11y issues', () => {
loginAsColvin();
cy.visit(
'/case-detail/102-67/documents/7be2dea1-4428-4917-a66d-0d474e57ee02/status-report-order-create?statusReportFilingDate=2024-06-28&statusReportIndex=1',
);
cy.get('[data-testid="save-draft-button"]').should('exist');

checkA11y();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import {
docketNumber,
messages,
statusReportDocketEntryId,
} from '../../../support/statusReportOrder';
import { loginAsDocketClerk } from '../../../../helpers/authentication/login-as-helpers';

describe('check permissions for status report order', () => {
beforeEach(() => {
loginAsDocketClerk();
});

it('docket clerk should not be able to create status report order', () => {
cy.visit(`/case-detail/${docketNumber}`);
cy.get('#tab-document-view').click();
cy.get(`[data-entry-id="${statusReportDocketEntryId}"]`).click();

cy.get('[data-testid="order-button"]').should('not.exist');
});

it('docket clerk should not be able to edit a status report order in the status report order form', () => {
cy.visit(`/case-detail/${docketNumber}`);
cy.get('#tab-drafts').click();
cy.contains('button', messages.testStatusReportOrderUnsigned.name).click();

cy.get('#draft-edit-button-not-signed').should('not.exist');
});

it('docket clerk should not be able to view status report order route', () => {
[
`/case-detail/${docketNumber}/documents/${statusReportDocketEntryId}/status-report-order-create?statusReportFilingDate=2024-06-28&statusReportIndex=5`,
`/case-detail/${docketNumber}/documents/${statusReportDocketEntryId}/status-report-order-edit`,
`/messages/${docketNumber}/message-detail/${messages.statusReport.messageId}/${statusReportDocketEntryId}/status-report-order-create?statusReportFilingDate=2024-06-28&statusReportIndex=5`,
`/messages/${docketNumber}/message-detail/${messages.statusReport.messageId}/${statusReportDocketEntryId}/status-report-order-create`,
].forEach((route: string) => {
cy.visit(route);
cy.contains('Error 404').should('exist');
});
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
import {
FORMATS,
formatNow,
} from '../../../../../shared/src/business/utilities/DateHandler';
import {
docketNumber,
expectedPdfLines,
getLastDraftOrderElementFromDrafts,
getLastDraftOrderElementIndexFromDrafts,
messages,
selectAllOptionsInForm,
statusReportDocketEntryId,
} from '../../../support/statusReportOrder';
import { loginAsColvin } from '../../../../helpers/authentication/login-as-helpers';

describe('edit status report order', () => {
beforeEach(() => {
loginAsColvin();
cy.visit(`/case-detail/${docketNumber}`);
});

describe('editing a status report order from drafts document view', () => {
it('should load existing unsigned order', () => {
cy.visit(`/case-detail/${docketNumber}`);
cy.get('#tab-drafts').click();
cy.contains(
'button',
messages.testStatusReportOrderUnsigned.name,
).click();
cy.get('[data-testid="draft-edit-button-not-signed"]').click();

cy.get('[data-testid="status-report-order-pdf-preview"]').should(
'not.be.empty',
);

cy.get('#order-type-status-report').should('be.checked');
// expect either the seeded data's date or else the updated date we set in these tests
cy.get('#status-report-due-date-picker').should($el => {
expect($el.val()).to.satisfy(
(t: string | string[]) =>
t.includes('07/11/2024') ||
t.includes(`${formatNow(FORMATS.MMDDYYYY)}`),
);
});
cy.get('#stricken-from-trial-sessions').should('be.checked');
cy.get('#jurisdiction-retained').should('be.checked');
cy.get('#additional-order-text').should('contain', 'Test');
});

it('should load existing signed order', () => {
cy.get('#tab-drafts').click();
cy.contains('button', messages.testStatusReportOrderSigned.name).click();
cy.get('[data-testid="edit-order-button"]').click();
cy.get('[data-testid="modal-button-confirm"]').click();

cy.get('[data-testid="status-report-order-pdf-preview"]').should(
'not.be.empty',
);

cy.get('#order-type-status-report').should('be.checked');
cy.get('#status-report-due-date-picker').invoke('val').should('exist');
cy.get('#stricken-from-trial-sessions').should('be.checked');
cy.get('#jurisdiction-retained').should('be.checked');
cy.get('#additional-order-text').should('contain', 'Test');

cy.get('#status-report-due-date-picker').clear();
cy.get('#status-report-due-date-picker').type(
formatNow(FORMATS.MMDDYYYY),
);
cy.get('[data-testid="save-draft-button"]').click();
cy.get('[data-testid="sign-pdf-canvas"]').click();
cy.get('[data-testid="save-signature-button"]').click();
});

it('should be able to save edited status report order without duplicates', () => {
cy.get('#tab-document-view').click();
cy.get(`[data-entry-id="${statusReportDocketEntryId}"]`).click();
cy.get('[data-testid="status-report-order-button"]').click();
selectAllOptionsInForm();
cy.get('[data-testid="save-draft-button"]').click();
cy.contains('Apply Signature').should('exist');
cy.get('[data-testid="skip-signature-button"]').click();

cy.get('#tab-drafts').click();

getLastDraftOrderElementFromDrafts().click();
// We'll get the order index and check it later to ensure that we have edited our existing order rather than created a new order
const lastOrderIndex = getLastDraftOrderElementIndexFromDrafts();

cy.get('[data-testid="draft-edit-button-not-signed"]').click();
cy.get('#stricken-from-trial-sessions').uncheck({ force: true });

cy.intercept('POST', '**/api/court-issued-order').as('courtIssuedOrder');
cy.get('[data-testid="save-draft-button"]').click();

cy.wait('@courtIssuedOrder').then(({ request: req }) => {
expectedPdfLines.forEach((pdfLine, i) => {
if (i === 2 || i === 3) {
expect(req.body.contentHtml).to.not.include(pdfLine);
} else {
expect(req.body.contentHtml).to.include(pdfLine);
}
});
});
cy.contains('Apply Signature').should('exist');

cy.get('[data-testid="skip-signature-button"]').click();
cy.get('#tab-drafts').click();

expect(lastOrderIndex == getLastDraftOrderElementIndexFromDrafts());
});
});

describe('editing a status report order from message view', () => {
it('should load existing unsigned order', () => {
cy.get('#tab-case-messages').click();
cy.contains('a', messages.testStatusReportOrderUnsigned.name).click();
cy.get('[data-testid="edit-unsigned-document-button"]').click();

cy.get('[data-testid="status-report-order-pdf-preview"]').should(
'not.be.empty',
);

cy.get('#order-type-status-report').should('be.checked');
// expect either the seeded data's date or else the updated date we set in these tests
cy.get('#status-report-due-date-picker').should($el => {
expect($el.val()).to.satisfy(
(t: string | string[]) =>
t.includes('07/11/2024') ||
t.includes(`${formatNow(FORMATS.MMDDYYYY)}`),
);
});
cy.get('#stricken-from-trial-sessions').should('be.checked');
cy.get('#jurisdiction-retained').should('be.checked');
cy.get('#additional-order-text').should('contain', 'Test');
});

it('should load existing signed order', () => {
cy.get('#tab-case-messages').click();
cy.contains('a', messages.testStatusReportOrderSigned.name).click();
cy.get('[data-testid="edit-signed-document-button"]').click();
cy.get('[data-testid="modal-button-confirm"]').click();

cy.get('[data-testid="status-report-order-pdf-preview"]').should(
'not.be.empty',
);

cy.get('#order-type-status-report').should('be.checked');
cy.get('#status-report-due-date-picker').invoke('val').should('exist');
cy.get('#stricken-from-trial-sessions').should('be.checked');
cy.get('#jurisdiction-retained').should('be.checked');
cy.get('#additional-order-text').should('contain', 'Test');

cy.get('#status-report-due-date-picker').clear();
cy.get('#status-report-due-date-picker').type(
formatNow(FORMATS.MMDDYYYY),
);
cy.get('[data-testid="save-draft-button"]').click();
cy.get('[data-testid="sign-pdf-canvas"]').click();
cy.get('[data-testid="save-signature-button"]').click();
});

it('should redirect to messages tab upon saving signed status report order', () => {
cy.get('#tab-case-messages').click();
cy.contains('a', messages.testStatusReportOrderSigned.name).click();
cy.get('[data-testid="edit-signed-document-button"]').click();
cy.get('[data-testid="modal-button-confirm"]').click();
cy.get('#status-report-due-date-picker').clear();
cy.get('#status-report-due-date-picker').type(
formatNow(FORMATS.MMDDYYYY),
);

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

cy.contains('Apply Signature').should('exist');

cy.get('[data-testid="sign-pdf-canvas"]').click();
cy.get('[data-testid="save-signature-button"]').click();

cy.url().should('contain', `messages/${docketNumber}/message-detail`);
cy.contains(
'.attachment-viewer-button',
messages.testStatusReportOrderSigned.name,
).should('exist');
});

it('should redirect to messages tab upon saving unsigned status report order', () => {
cy.get('#tab-case-messages').click();
cy.contains('a', messages.testStatusReportOrderUnsigned.name).click();
cy.get('[data-testid="edit-unsigned-document-button"]').click();

// Update date to pass validation on save
cy.get('#status-report-due-date-picker').clear();
cy.get('#status-report-due-date-picker').type(
formatNow(FORMATS.MMDDYYYY),
);

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

cy.contains('Apply Signature').should('exist');

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

cy.url().should('contain', `messages/${docketNumber}/message-detail`);
});
});
});
Loading
Loading