Skip to content

Commit

Permalink
9998 - WIP - fixing integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolutestunna committed Aug 22, 2023
1 parent ea75681 commit 36046e2
Showing 1 changed file with 65 additions and 43 deletions.
108 changes: 65 additions & 43 deletions web-client/integration-tests/judgeActivityReportJourney.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ describe('Judge activity report journey', () => {
cerebralTest.closeSocket();
});

///////// VALIDATION ///////////////

loginAs(cerebralTest, '[email protected]');
it('should disable the submit button on initial page load when form has not yet been completed', async () => {
await cerebralTest.runSequence('gotoJudgeActivityReportSequence');
Expand Down Expand Up @@ -66,11 +68,13 @@ describe('Judge activity report journey', () => {
});

viewJudgeActivityReportResults(cerebralTest);

///////// ADD CAV/SUBMITTED CASES ///////////////

it('should set the progressDescriptionTableBeforeCount', () => {
progressDescriptionTableTotalBefore =
cerebralTest.progressDescriptionTableTotal;
});

loginAs(cerebralTest, '[email protected]');
petitionsClerkCreatesNewCase(cerebralTest);

Expand Down Expand Up @@ -99,6 +103,9 @@ describe('Judge activity report journey', () => {
});

viewJudgeActivityReportResults(cerebralTest);

///////// ADD REGULAR CASE ///////////////

it('should set the progressDescriptionTableBeforeCount', () => {
progressDescriptionTableTotalBefore =
cerebralTest.progressDescriptionTableTotal;
Expand All @@ -119,6 +126,9 @@ describe('Judge activity report journey', () => {
});

viewJudgeActivityReportResults(cerebralTest);

///////// ADD PROHIBITED (SERVED) DOCKET ENTRY ///////////////

it('should set the progressDescriptionTableBeforeCount', () => {
progressDescriptionTableTotalBefore =
cerebralTest.progressDescriptionTableTotal;
Expand Down Expand Up @@ -159,6 +169,8 @@ describe('Judge activity report journey', () => {
cerebralTest.progressDescriptionTableTotal;
});

///////// ADD PROHIBITED (UNSERVED) DOCKET ENTRY ///////////////

loginAs(cerebralTest, '[email protected]');
petitionsClerkCreatesNewCase(cerebralTest);

Expand Down Expand Up @@ -192,6 +204,8 @@ describe('Judge activity report journey', () => {
cerebralTest.progressDescriptionTableTotal;
});

///////// ADD PROHIBITED (SERVED) DOCKET ENTRY THAT HAS BEEN STRICKED ///////////////

loginAs(cerebralTest, '[email protected]');
petitionsClerkCreatesNewCase(cerebralTest);

Expand All @@ -208,6 +222,12 @@ describe('Judge activity report journey', () => {
});
docketClerkViewsDraftOrder(cerebralTest);
docketClerkSignsOrder(cerebralTest);
docketClerkAddsDocketEntryFromOrder(cerebralTest, 0, 'Colvin');
docketClerkServesDocument(cerebralTest, 0);
// todo NEED TO STRIKE DOCKET ENTRY
// flip case back to CAV/Submitted
// get docket entry index of newly served OAD
// docketClerkChecksDocketEntryEditLink(cerebralTest);

loginAs(cerebralTest, '[email protected]');
viewJudgeActivityReportResults(cerebralTest);
Expand All @@ -216,10 +236,12 @@ describe('Judge activity report journey', () => {
cerebralTest.progressDescriptionTableTotal;

expect(progressDescriptionTableTotalAfter).toEqual(
progressDescriptionTableTotalBefore + 1,
progressDescriptionTableTotalBefore,
);
});

////// CONSOLIDATED CASES //////////

// //// new test ==================================================
it('should set the progressDescriptionTableBeforeCount', () => {
progressDescriptionTableTotalBefore =
Expand Down Expand Up @@ -263,51 +285,51 @@ describe('Judge activity report journey', () => {
// docketClerkStrikesDocketEntry(cerebralTest, 3);
// });

describe('Petitioner creates a case', () => {
loginAs(cerebralTest, '[email protected]');
it('petitioner creates an electronic case', async () => {
const caseDetail = await uploadPetition(cerebralTest);
expect(caseDetail.docketNumber).toBeDefined();
cerebralTest.docketNumber = caseDetail.docketNumber;
cerebralTest.docketNumber = caseDetail.docketNumber;
console.log('cerebralTest.docketNumber', cerebralTest.docketNumber);
});
});
// describe('Petitioner creates a case', () => {

Check warning on line 288 in web-client/integration-tests/judgeActivityReportJourney.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Some tests seem to be commented
// loginAs(cerebralTest, '[email protected]');
// it('petitioner creates an electronic case', async () => {

Check warning on line 290 in web-client/integration-tests/judgeActivityReportJourney.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Some tests seem to be commented
// const caseDetail = await uploadPetition(cerebralTest);
// expect(caseDetail.docketNumber).toBeDefined();
// cerebralTest.docketNumber = caseDetail.docketNumber;
// cerebralTest.docketNumber = caseDetail.docketNumber;
// console.log('cerebralTest.docketNumber', cerebralTest.docketNumber);
// });
// });

describe('Petitions clerk serves case to IRS', () => {
loginAs(cerebralTest, '[email protected]');
petitionsClerkServesElectronicCaseToIrs(cerebralTest);
});
// describe('Petitions clerk serves case to IRS', () => {

Check warning on line 299 in web-client/integration-tests/judgeActivityReportJourney.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Some tests seem to be commented
// loginAs(cerebralTest, '[email protected]');
// petitionsClerkServesElectronicCaseToIrs(cerebralTest);
// });

loginAs(cerebralTest, '[email protected]');
docketClerkUpdatesCaseStatusTo(
cerebralTest,
CASE_STATUS_TYPES.submitted,
'Colvin',
);
// loginAs(cerebralTest, '[email protected]');
// docketClerkUpdatesCaseStatusTo(
// cerebralTest,
// CASE_STATUS_TYPES.submitted,
// 'Colvin',
// );

describe('Petitioner files a document for the case', () => {
loginAs(cerebralTest, '[email protected]');
petitionerFilesADocumentForCase(cerebralTest, fakeFile);
});
// describe('Petitioner files a document for the case', () => {

Check warning on line 311 in web-client/integration-tests/judgeActivityReportJourney.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Some tests seem to be commented
// loginAs(cerebralTest, '[email protected]');
// petitionerFilesADocumentForCase(cerebralTest, fakeFile);
// });

describe('Docketclerk QCs and Strikes a docket entry', () => {
loginAs(cerebralTest, '[email protected]');
docketClerkChecksDocketEntryEditLink(cerebralTest);
docketClerkQCsDocketEntry(cerebralTest);
docketClerkChecksDocketEntryEditLink(cerebralTest, { value: true });
docketClerkNavigatesToEditDocketEntryMeta(cerebralTest, 3);
docketClerkStrikesDocketEntry(cerebralTest, 3);
});
// describe('Docketclerk QCs and Strikes a docket entry', () => {

Check warning on line 316 in web-client/integration-tests/judgeActivityReportJourney.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Some tests seem to be commented
// loginAs(cerebralTest, '[email protected]');
// docketClerkChecksDocketEntryEditLink(cerebralTest);
// docketClerkQCsDocketEntry(cerebralTest);
// docketClerkChecksDocketEntryEditLink(cerebralTest, { value: true });
// docketClerkNavigatesToEditDocketEntryMeta(cerebralTest, 3);
// docketClerkStrikesDocketEntry(cerebralTest, 3);
// });

loginAs(cerebralTest, '[email protected]');
viewJudgeActivityReportResults(cerebralTest);
it('should not increase progressDescriptionTableTotal when a case has a Decision type docket entry on the docket record and is stricken', () => {
const progressDescriptionTableTotalAfter =
cerebralTest.progressDescriptionTableTotal;
// loginAs(cerebralTest, '[email protected]');

Check warning on line 325 in web-client/integration-tests/judgeActivityReportJourney.test.ts

View workflow job for this annotation

GitHub Actions / Lint

You have a misspelled word: 'judgecolvin on Comment
// viewJudgeActivityReportResults(cerebralTest);
// it('should not increase progressDescriptionTableTotal when a case has a Decision type docket entry on the docket record and is stricken', () => {

Check warning on line 327 in web-client/integration-tests/judgeActivityReportJourney.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Some tests seem to be commented
// const progressDescriptionTableTotalAfter =
// cerebralTest.progressDescriptionTableTotal;

expect(progressDescriptionTableTotalAfter).toEqual(
progressDescriptionTableTotalBefore,
);
});
// expect(progressDescriptionTableTotalAfter).toEqual(
// progressDescriptionTableTotalBefore,
// );
// });
});

0 comments on commit 36046e2

Please sign in to comment.