From bc193f2a1779b9697534b7484800a1caf935259e Mon Sep 17 00:00:00 2001 From: Kaitlyn Swann Date: Wed, 2 Oct 2024 09:43:18 -0600 Subject: [PATCH 1/3] 10391: fix more tests --- .../caseAssociation/associatePrivatePractitionerToCase.test.ts | 1 + .../caseAssociation/updateCaseAndAssociations.test.ts | 1 + .../caseAssociation/deleteCounselFromCaseInteractor.test.ts | 1 + .../caseAssociation/updateCounselOnCaseInteractor.test.ts | 1 + .../caseConsolidation/removeConsolidatedCasesInteractor.test.ts | 1 + .../courtIssuedOrder/fileCourtIssuedOrderInteractor.test.ts | 1 + .../courtIssuedOrder/updateCourtIssuedOrderInteractor.test.ts | 1 + .../useCases/docketEntry/addPaperFilingInteractor.test.ts | 1 + .../useCases/docketEntry/completeDocketEntryQCInteractor.test.ts | 1 + .../useCases/docketEntry/editPaperFilingInteractor.test.ts | 1 + .../docketEntry/fileCourtIssuedDocketEntryInteractor.test.ts | 1 + .../useCases/docketEntry/updateDocketEntryMetaInteractor.test.ts | 1 + .../externalDocument/fileExternalDocumentInteractor.test.ts | 1 + .../useCases/serveCaseToIrs/serveCaseToIrsInteractor.test.ts | 1 + .../generateNoticesForCaseTrialSessionCalendarInteractor.test.ts | 1 + .../useCases/trialSessions/removeCaseFromTrialInteractor.test.ts | 1 + .../trialSessions/setTrialSessionCalendarInteractor.test.ts | 1 + .../updateTrialSessionInteractor.noticeGeneration.test.ts | 1 + .../useCases/trialSessions/updateTrialSessionInteractor.test.ts | 1 + .../business/useCases/user/updateAssociatedCaseWorker.test.ts | 1 + .../useCases/user/updatePetitionerInformationInteractor.test.ts | 1 + 21 files changed, 21 insertions(+) diff --git a/web-api/src/business/useCaseHelper/caseAssociation/associatePrivatePractitionerToCase.test.ts b/web-api/src/business/useCaseHelper/caseAssociation/associatePrivatePractitionerToCase.test.ts index 0d336d5ddee..c912f24f64c 100644 --- a/web-api/src/business/useCaseHelper/caseAssociation/associatePrivatePractitionerToCase.test.ts +++ b/web-api/src/business/useCaseHelper/caseAssociation/associatePrivatePractitionerToCase.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { CASE_TYPES_MAP, CONTACT_TYPES, diff --git a/web-api/src/business/useCaseHelper/caseAssociation/updateCaseAndAssociations.test.ts b/web-api/src/business/useCaseHelper/caseAssociation/updateCaseAndAssociations.test.ts index aa24ee6965a..e2f87d20b8d 100644 --- a/web-api/src/business/useCaseHelper/caseAssociation/updateCaseAndAssociations.test.ts +++ b/web-api/src/business/useCaseHelper/caseAssociation/updateCaseAndAssociations.test.ts @@ -1,4 +1,5 @@ /* eslint-disable max-lines */ +import '@web-api/persistence/postgres/cases/mocks.jest'; jest.mock('@shared/business/entities/Message.ts'); jest.mock('@shared/business/entities/CaseDeadline'); jest.mock('@web-api/persistence/postgres/messages/getMessagesByDocketNumber'); diff --git a/web-api/src/business/useCases/caseAssociation/deleteCounselFromCaseInteractor.test.ts b/web-api/src/business/useCases/caseAssociation/deleteCounselFromCaseInteractor.test.ts index 7cfc848524b..fde8c7098d2 100644 --- a/web-api/src/business/useCases/caseAssociation/deleteCounselFromCaseInteractor.test.ts +++ b/web-api/src/business/useCases/caseAssociation/deleteCounselFromCaseInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { CONTACT_TYPES, ROLES, diff --git a/web-api/src/business/useCases/caseAssociation/updateCounselOnCaseInteractor.test.ts b/web-api/src/business/useCases/caseAssociation/updateCounselOnCaseInteractor.test.ts index 56719bbb81c..6535c6ce88f 100644 --- a/web-api/src/business/useCases/caseAssociation/updateCounselOnCaseInteractor.test.ts +++ b/web-api/src/business/useCases/caseAssociation/updateCounselOnCaseInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { CASE_TYPES_MAP, CONTACT_TYPES, diff --git a/web-api/src/business/useCases/caseConsolidation/removeConsolidatedCasesInteractor.test.ts b/web-api/src/business/useCases/caseConsolidation/removeConsolidatedCasesInteractor.test.ts index b7e200db419..337f5487e8d 100644 --- a/web-api/src/business/useCases/caseConsolidation/removeConsolidatedCasesInteractor.test.ts +++ b/web-api/src/business/useCases/caseConsolidation/removeConsolidatedCasesInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { MOCK_CASE } from '../../../../../shared/src/test/mockCase'; import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock'; import { ServiceUnavailableError } from '@web-api/errors/errors'; diff --git a/web-api/src/business/useCases/courtIssuedOrder/fileCourtIssuedOrderInteractor.test.ts b/web-api/src/business/useCases/courtIssuedOrder/fileCourtIssuedOrderInteractor.test.ts index a84d6940c77..c83d9a05950 100644 --- a/web-api/src/business/useCases/courtIssuedOrder/fileCourtIssuedOrderInteractor.test.ts +++ b/web-api/src/business/useCases/courtIssuedOrder/fileCourtIssuedOrderInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import '@web-api/persistence/postgres/messages/mocks.jest'; import { CASE_STATUS_TYPES, diff --git a/web-api/src/business/useCases/courtIssuedOrder/updateCourtIssuedOrderInteractor.test.ts b/web-api/src/business/useCases/courtIssuedOrder/updateCourtIssuedOrderInteractor.test.ts index ffd804e606b..170bb1a5afd 100644 --- a/web-api/src/business/useCases/courtIssuedOrder/updateCourtIssuedOrderInteractor.test.ts +++ b/web-api/src/business/useCases/courtIssuedOrder/updateCourtIssuedOrderInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { CASE_TYPES_MAP, CONTACT_TYPES, diff --git a/web-api/src/business/useCases/docketEntry/addPaperFilingInteractor.test.ts b/web-api/src/business/useCases/docketEntry/addPaperFilingInteractor.test.ts index 4c6f24fedf0..c75373967ea 100644 --- a/web-api/src/business/useCases/docketEntry/addPaperFilingInteractor.test.ts +++ b/web-api/src/business/useCases/docketEntry/addPaperFilingInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import '@web-api/persistence/postgres/messages/mocks.jest'; import { AUTOMATIC_BLOCKED_REASONS, diff --git a/web-api/src/business/useCases/docketEntry/completeDocketEntryQCInteractor.test.ts b/web-api/src/business/useCases/docketEntry/completeDocketEntryQCInteractor.test.ts index f561a1ee72b..ea7b93fc49d 100644 --- a/web-api/src/business/useCases/docketEntry/completeDocketEntryQCInteractor.test.ts +++ b/web-api/src/business/useCases/docketEntry/completeDocketEntryQCInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { CASE_SERVICES_SUPERVISOR_SECTION, DOCKET_SECTION, diff --git a/web-api/src/business/useCases/docketEntry/editPaperFilingInteractor.test.ts b/web-api/src/business/useCases/docketEntry/editPaperFilingInteractor.test.ts index e1d7318e0e8..583fdef7027 100644 --- a/web-api/src/business/useCases/docketEntry/editPaperFilingInteractor.test.ts +++ b/web-api/src/business/useCases/docketEntry/editPaperFilingInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { DOCKET_SECTION, DOCUMENT_SERVED_MESSAGES, diff --git a/web-api/src/business/useCases/docketEntry/fileCourtIssuedDocketEntryInteractor.test.ts b/web-api/src/business/useCases/docketEntry/fileCourtIssuedDocketEntryInteractor.test.ts index 0d1be995e20..f7712146d50 100644 --- a/web-api/src/business/useCases/docketEntry/fileCourtIssuedDocketEntryInteractor.test.ts +++ b/web-api/src/business/useCases/docketEntry/fileCourtIssuedDocketEntryInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { Case } from '../../../../../shared/src/business/entities/cases/Case'; import { DOCKET_SECTION, diff --git a/web-api/src/business/useCases/docketEntry/updateDocketEntryMetaInteractor.test.ts b/web-api/src/business/useCases/docketEntry/updateDocketEntryMetaInteractor.test.ts index dea9d2dd9fd..eac756bc109 100644 --- a/web-api/src/business/useCases/docketEntry/updateDocketEntryMetaInteractor.test.ts +++ b/web-api/src/business/useCases/docketEntry/updateDocketEntryMetaInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { MOCK_CASE } from '../../../../../shared/src/test/mockCase'; import { MOCK_LOCK } from '@shared/test/mockLock'; import { diff --git a/web-api/src/business/useCases/externalDocument/fileExternalDocumentInteractor.test.ts b/web-api/src/business/useCases/externalDocument/fileExternalDocumentInteractor.test.ts index 4738d8b4e96..a3b322e7501 100644 --- a/web-api/src/business/useCases/externalDocument/fileExternalDocumentInteractor.test.ts +++ b/web-api/src/business/useCases/externalDocument/fileExternalDocumentInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { AUTOMATIC_BLOCKED_REASONS, CASE_STATUS_TYPES, diff --git a/web-api/src/business/useCases/serveCaseToIrs/serveCaseToIrsInteractor.test.ts b/web-api/src/business/useCases/serveCaseToIrs/serveCaseToIrsInteractor.test.ts index 3f38263efdd..9d9b66f7671 100644 --- a/web-api/src/business/useCases/serveCaseToIrs/serveCaseToIrsInteractor.test.ts +++ b/web-api/src/business/useCases/serveCaseToIrs/serveCaseToIrsInteractor.test.ts @@ -1,4 +1,5 @@ /* eslint-disable max-lines */ +import '@web-api/persistence/postgres/cases/mocks.jest'; import '@web-api/persistence/postgres/messages/mocks.jest'; import { CASE_STATUS_TYPES, diff --git a/web-api/src/business/useCases/trialSessions/generateNoticesForCaseTrialSessionCalendarInteractor.test.ts b/web-api/src/business/useCases/trialSessions/generateNoticesForCaseTrialSessionCalendarInteractor.test.ts index 3ef64845009..5bad57ebd3f 100644 --- a/web-api/src/business/useCases/trialSessions/generateNoticesForCaseTrialSessionCalendarInteractor.test.ts +++ b/web-api/src/business/useCases/trialSessions/generateNoticesForCaseTrialSessionCalendarInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { MOCK_CASE, MOCK_ELIGIBLE_CASE_WITH_PRACTITIONERS, diff --git a/web-api/src/business/useCases/trialSessions/removeCaseFromTrialInteractor.test.ts b/web-api/src/business/useCases/trialSessions/removeCaseFromTrialInteractor.test.ts index 892e92e595c..c9206aa2525 100644 --- a/web-api/src/business/useCases/trialSessions/removeCaseFromTrialInteractor.test.ts +++ b/web-api/src/business/useCases/trialSessions/removeCaseFromTrialInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import '@web-api/persistence/postgres/messages/mocks.jest'; import { CASE_STATUS_TYPES, diff --git a/web-api/src/business/useCases/trialSessions/setTrialSessionCalendarInteractor.test.ts b/web-api/src/business/useCases/trialSessions/setTrialSessionCalendarInteractor.test.ts index 49fb0b05a43..11152d6fa2c 100644 --- a/web-api/src/business/useCases/trialSessions/setTrialSessionCalendarInteractor.test.ts +++ b/web-api/src/business/useCases/trialSessions/setTrialSessionCalendarInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import '@web-api/persistence/postgres/messages/mocks.jest'; import { MOCK_CASE } from '../../../../../shared/src/test/mockCase'; import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock'; diff --git a/web-api/src/business/useCases/trialSessions/updateTrialSessionInteractor.noticeGeneration.test.ts b/web-api/src/business/useCases/trialSessions/updateTrialSessionInteractor.noticeGeneration.test.ts index 1c172f17a27..bca313ce72d 100644 --- a/web-api/src/business/useCases/trialSessions/updateTrialSessionInteractor.noticeGeneration.test.ts +++ b/web-api/src/business/useCases/trialSessions/updateTrialSessionInteractor.noticeGeneration.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { CASE_STATUS_TYPES, TRIAL_SESSION_PROCEEDING_TYPES, diff --git a/web-api/src/business/useCases/trialSessions/updateTrialSessionInteractor.test.ts b/web-api/src/business/useCases/trialSessions/updateTrialSessionInteractor.test.ts index 47461af33ad..0c925d36798 100644 --- a/web-api/src/business/useCases/trialSessions/updateTrialSessionInteractor.test.ts +++ b/web-api/src/business/useCases/trialSessions/updateTrialSessionInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { MOCK_CASE } from '../../../../../shared/src/test/mockCase'; import { MOCK_TRIAL_INPERSON, diff --git a/web-api/src/business/useCases/user/updateAssociatedCaseWorker.test.ts b/web-api/src/business/useCases/user/updateAssociatedCaseWorker.test.ts index 3e3c34a441a..1f0985544ef 100644 --- a/web-api/src/business/useCases/user/updateAssociatedCaseWorker.test.ts +++ b/web-api/src/business/useCases/user/updateAssociatedCaseWorker.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import '@web-api/persistence/postgres/messages/mocks.jest'; import { CASE_STATUS_TYPES, diff --git a/web-api/src/business/useCases/user/updatePetitionerInformationInteractor.test.ts b/web-api/src/business/useCases/user/updatePetitionerInformationInteractor.test.ts index e49be24a635..34bebd27fd4 100644 --- a/web-api/src/business/useCases/user/updatePetitionerInformationInteractor.test.ts +++ b/web-api/src/business/useCases/user/updatePetitionerInformationInteractor.test.ts @@ -1,4 +1,5 @@ /* eslint-disable max-lines */ +import '@web-api/persistence/postgres/cases/mocks.jest'; import '@web-api/persistence/postgres/messages/mocks.jest'; import { CASE_STATUS_TYPES, From ef715a38e77bbb91639e1c873616a0d7c63bda8f Mon Sep 17 00:00:00 2001 From: Kaitlyn Swann Date: Wed, 2 Oct 2024 10:05:14 -0600 Subject: [PATCH 2/3] 10391: more mocks --- .../caseAssociation/associateIrsPractitionerToCase.test.ts | 1 + .../business/useCaseHelper/sealInLowerEnvironment.test.ts | 1 + .../addDraftStampOrderDocketEntryInteractor.test.ts | 1 + .../business/useCases/addPetitionerToCaseInteractor.test.ts | 1 + .../business/useCases/archiveDraftDocumentInteractor.test.ts | 1 + .../caseConsolidation/addConsolidatedCaseInteractor.test.ts | 1 + .../caseDeadline/createCaseDeadlineInteractor.test.ts | 1 + .../caseDeadline/deleteCaseDeadlineInteractor.test.ts | 1 + .../useCases/caseNote/deleteCaseNoteInteractor.test.ts | 1 + .../caseStatistics/addDeficiencyStatisticInteractor.test.ts | 1 + .../deleteDeficiencyStatisticInteractor.test.ts | 1 + .../updateDeficiencyStatisticInteractor.test.ts | 1 + .../useCases/checkForReadyForTrialCasesInteractor.test.ts | 1 + .../archiveCorrespondenceDocumentInteractor.test.ts | 1 + ...fileAndServeCourtIssuedDocumentInteractor.locking.test.ts | 1 + .../docketEntry/addPaperFilingInteractor.locking.test.ts | 1 + .../docketEntry/editPaperFilingInteractor.locking.test.ts | 1 + .../updateCourtIssuedDocketEntryInteractor.test.ts | 1 + .../associatePrivatePractitionerWithCaseInteractor.test.ts | 1 + .../trialSessions/addCaseToTrialSessionInteractor.test.ts | 1 + .../trialSessions/deleteTrialSessionInteractor.test.ts | 1 + ...onerInformationInteractor.createWorkItemForChange.test.ts | 1 + .../workItems/completeWorkItemInteractor.locking.test.ts | 1 + .../useCases/workItems/completeWorkItemInteractor.test.ts | 1 + web-api/src/persistence/postgres/cases/upsertCase.ts | 5 ++++- web-api/src/persistence/postgres/cases/upsertCases.ts | 5 ++++- .../postgres/messages/getCompletedUserInboxMessages.ts | 4 ++-- 27 files changed, 34 insertions(+), 4 deletions(-) diff --git a/web-api/src/business/useCaseHelper/caseAssociation/associateIrsPractitionerToCase.test.ts b/web-api/src/business/useCaseHelper/caseAssociation/associateIrsPractitionerToCase.test.ts index c9f8628ddcf..d0748abafc2 100644 --- a/web-api/src/business/useCaseHelper/caseAssociation/associateIrsPractitionerToCase.test.ts +++ b/web-api/src/business/useCaseHelper/caseAssociation/associateIrsPractitionerToCase.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { CASE_STATUS_TYPES, CASE_TYPES_MAP, diff --git a/web-api/src/business/useCaseHelper/sealInLowerEnvironment.test.ts b/web-api/src/business/useCaseHelper/sealInLowerEnvironment.test.ts index b6199edd967..4a352ca47ed 100644 --- a/web-api/src/business/useCaseHelper/sealInLowerEnvironment.test.ts +++ b/web-api/src/business/useCaseHelper/sealInLowerEnvironment.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { MOCK_CASE } from '../../../../shared/src/test/mockCase'; import { applicationContext } from '../../../../shared/src/business/test/createTestApplicationContext'; import { mockDocketClerkUser } from '@shared/test/mockAuthUsers'; diff --git a/web-api/src/business/useCaseHelper/stampDisposition/addDraftStampOrderDocketEntryInteractor.test.ts b/web-api/src/business/useCaseHelper/stampDisposition/addDraftStampOrderDocketEntryInteractor.test.ts index fabf8430364..a974a5df19d 100644 --- a/web-api/src/business/useCaseHelper/stampDisposition/addDraftStampOrderDocketEntryInteractor.test.ts +++ b/web-api/src/business/useCaseHelper/stampDisposition/addDraftStampOrderDocketEntryInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import '@web-api/persistence/postgres/messages/mocks.jest'; import { MOCK_CASE } from '../../../../../shared/src/test/mockCase'; import { MOCK_DOCUMENTS } from '../../../../../shared/src/test/mockDocketEntry'; diff --git a/web-api/src/business/useCases/addPetitionerToCaseInteractor.test.ts b/web-api/src/business/useCases/addPetitionerToCaseInteractor.test.ts index df800007eb5..9dac22e1f94 100644 --- a/web-api/src/business/useCases/addPetitionerToCaseInteractor.test.ts +++ b/web-api/src/business/useCases/addPetitionerToCaseInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import '@web-api/persistence/postgres/messages/mocks.jest'; import { CASE_STATUS_TYPES, diff --git a/web-api/src/business/useCases/archiveDraftDocumentInteractor.test.ts b/web-api/src/business/useCases/archiveDraftDocumentInteractor.test.ts index da39f5846e1..aecb3c1cff1 100644 --- a/web-api/src/business/useCases/archiveDraftDocumentInteractor.test.ts +++ b/web-api/src/business/useCases/archiveDraftDocumentInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { MOCK_CASE } from '../../../../shared/src/test/mockCase'; import { MOCK_LOCK } from '../../../../shared/src/test/mockLock'; import { ROLES } from '../../../../shared/src/business/entities/EntityConstants'; diff --git a/web-api/src/business/useCases/caseConsolidation/addConsolidatedCaseInteractor.test.ts b/web-api/src/business/useCases/caseConsolidation/addConsolidatedCaseInteractor.test.ts index 0679b9e788e..8878c3523f7 100644 --- a/web-api/src/business/useCases/caseConsolidation/addConsolidatedCaseInteractor.test.ts +++ b/web-api/src/business/useCases/caseConsolidation/addConsolidatedCaseInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { MOCK_CASE } from '../../../../../shared/src/test/mockCase'; import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock'; import { ServiceUnavailableError } from '@web-api/errors/errors'; diff --git a/web-api/src/business/useCases/caseDeadline/createCaseDeadlineInteractor.test.ts b/web-api/src/business/useCases/caseDeadline/createCaseDeadlineInteractor.test.ts index 5d33e245a78..839e1310de1 100644 --- a/web-api/src/business/useCases/caseDeadline/createCaseDeadlineInteractor.test.ts +++ b/web-api/src/business/useCases/caseDeadline/createCaseDeadlineInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { AUTOMATIC_BLOCKED_REASONS, CHIEF_JUDGE, diff --git a/web-api/src/business/useCases/caseDeadline/deleteCaseDeadlineInteractor.test.ts b/web-api/src/business/useCases/caseDeadline/deleteCaseDeadlineInteractor.test.ts index 526fe875438..3524f6f2605 100644 --- a/web-api/src/business/useCases/caseDeadline/deleteCaseDeadlineInteractor.test.ts +++ b/web-api/src/business/useCases/caseDeadline/deleteCaseDeadlineInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { AUTOMATIC_BLOCKED_REASONS } from '../../../../../shared/src/business/entities/EntityConstants'; import { MOCK_CASE_WITHOUT_PENDING } from '../../../../../shared/src/test/mockCase'; import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock'; diff --git a/web-api/src/business/useCases/caseNote/deleteCaseNoteInteractor.test.ts b/web-api/src/business/useCases/caseNote/deleteCaseNoteInteractor.test.ts index 05b7392ee7c..5360f6ea3e5 100644 --- a/web-api/src/business/useCases/caseNote/deleteCaseNoteInteractor.test.ts +++ b/web-api/src/business/useCases/caseNote/deleteCaseNoteInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { AuthUser } from '@shared/business/entities/authUser/AuthUser'; import { MOCK_CASE } from '../../../../../shared/src/test/mockCase'; import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock'; diff --git a/web-api/src/business/useCases/caseStatistics/addDeficiencyStatisticInteractor.test.ts b/web-api/src/business/useCases/caseStatistics/addDeficiencyStatisticInteractor.test.ts index 8acce62e9bf..8f0727d408c 100644 --- a/web-api/src/business/useCases/caseStatistics/addDeficiencyStatisticInteractor.test.ts +++ b/web-api/src/business/useCases/caseStatistics/addDeficiencyStatisticInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { MOCK_CASE } from '../../../../../shared/src/test/mockCase'; import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock'; import { ServiceUnavailableError } from '@web-api/errors/errors'; diff --git a/web-api/src/business/useCases/caseStatistics/deleteDeficiencyStatisticInteractor.test.ts b/web-api/src/business/useCases/caseStatistics/deleteDeficiencyStatisticInteractor.test.ts index f8093b119c5..4185844f95f 100644 --- a/web-api/src/business/useCases/caseStatistics/deleteDeficiencyStatisticInteractor.test.ts +++ b/web-api/src/business/useCases/caseStatistics/deleteDeficiencyStatisticInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { CASE_TYPES_MAP } from '../../../../../shared/src/business/entities/EntityConstants'; import { MOCK_CASE } from '../../../../../shared/src/test/mockCase'; import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock'; diff --git a/web-api/src/business/useCases/caseStatistics/updateDeficiencyStatisticInteractor.test.ts b/web-api/src/business/useCases/caseStatistics/updateDeficiencyStatisticInteractor.test.ts index d8ea74fb509..de2ffb0c45f 100644 --- a/web-api/src/business/useCases/caseStatistics/updateDeficiencyStatisticInteractor.test.ts +++ b/web-api/src/business/useCases/caseStatistics/updateDeficiencyStatisticInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { MOCK_CASE } from '../../../../../shared/src/test/mockCase'; import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock'; import { ServiceUnavailableError } from '@web-api/errors/errors'; diff --git a/web-api/src/business/useCases/checkForReadyForTrialCasesInteractor.test.ts b/web-api/src/business/useCases/checkForReadyForTrialCasesInteractor.test.ts index b0150090c0d..e79f82978ac 100644 --- a/web-api/src/business/useCases/checkForReadyForTrialCasesInteractor.test.ts +++ b/web-api/src/business/useCases/checkForReadyForTrialCasesInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import '@web-api/persistence/postgres/messages/mocks.jest'; import { CASE_STATUS_TYPES } from '../../../../shared/src/business/entities/EntityConstants'; import { MOCK_CASE } from '../../../../shared/src/test/mockCase'; diff --git a/web-api/src/business/useCases/correspondence/archiveCorrespondenceDocumentInteractor.test.ts b/web-api/src/business/useCases/correspondence/archiveCorrespondenceDocumentInteractor.test.ts index 49648b0c6f8..4c2c3c6eff6 100644 --- a/web-api/src/business/useCases/correspondence/archiveCorrespondenceDocumentInteractor.test.ts +++ b/web-api/src/business/useCases/correspondence/archiveCorrespondenceDocumentInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { Correspondence } from '../../../../../shared/src/business/entities/Correspondence'; import { MOCK_CASE } from '../../../../../shared/src/test/mockCase'; import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock'; diff --git a/web-api/src/business/useCases/courtIssuedDocument/fileAndServeCourtIssuedDocumentInteractor.locking.test.ts b/web-api/src/business/useCases/courtIssuedDocument/fileAndServeCourtIssuedDocumentInteractor.locking.test.ts index 9d7603e0182..bf0bb8be536 100644 --- a/web-api/src/business/useCases/courtIssuedDocument/fileAndServeCourtIssuedDocumentInteractor.locking.test.ts +++ b/web-api/src/business/useCases/courtIssuedDocument/fileAndServeCourtIssuedDocumentInteractor.locking.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { MOCK_CASE } from '../../../../../shared/src/test/mockCase'; import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock'; import { ServiceUnavailableError } from '@web-api/errors/errors'; diff --git a/web-api/src/business/useCases/docketEntry/addPaperFilingInteractor.locking.test.ts b/web-api/src/business/useCases/docketEntry/addPaperFilingInteractor.locking.test.ts index 1bc5d9e951b..7a89260c18a 100644 --- a/web-api/src/business/useCases/docketEntry/addPaperFilingInteractor.locking.test.ts +++ b/web-api/src/business/useCases/docketEntry/addPaperFilingInteractor.locking.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { MOCK_CASE } from '../../../../../shared/src/test/mockCase'; import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock'; import { ServiceUnavailableError } from '@web-api/errors/errors'; diff --git a/web-api/src/business/useCases/docketEntry/editPaperFilingInteractor.locking.test.ts b/web-api/src/business/useCases/docketEntry/editPaperFilingInteractor.locking.test.ts index 8bc572d3751..e2da173709b 100644 --- a/web-api/src/business/useCases/docketEntry/editPaperFilingInteractor.locking.test.ts +++ b/web-api/src/business/useCases/docketEntry/editPaperFilingInteractor.locking.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { MOCK_CASE } from '../../../../../shared/src/test/mockCase'; import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock'; import { ServiceUnavailableError } from '@web-api/errors/errors'; diff --git a/web-api/src/business/useCases/docketEntry/updateCourtIssuedDocketEntryInteractor.test.ts b/web-api/src/business/useCases/docketEntry/updateCourtIssuedDocketEntryInteractor.test.ts index b1fd2d76a75..a1a1b3e74cc 100644 --- a/web-api/src/business/useCases/docketEntry/updateCourtIssuedDocketEntryInteractor.test.ts +++ b/web-api/src/business/useCases/docketEntry/updateCourtIssuedDocketEntryInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { CASE_STATUS_TYPES, DOCKET_NUMBER_SUFFIXES, diff --git a/web-api/src/business/useCases/manualAssociation/associatePrivatePractitionerWithCaseInteractor.test.ts b/web-api/src/business/useCases/manualAssociation/associatePrivatePractitionerWithCaseInteractor.test.ts index 67fdf72b420..04a7ea9baea 100644 --- a/web-api/src/business/useCases/manualAssociation/associatePrivatePractitionerWithCaseInteractor.test.ts +++ b/web-api/src/business/useCases/manualAssociation/associatePrivatePractitionerWithCaseInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { CASE_TYPES_MAP, CONTACT_TYPES, diff --git a/web-api/src/business/useCases/trialSessions/addCaseToTrialSessionInteractor.test.ts b/web-api/src/business/useCases/trialSessions/addCaseToTrialSessionInteractor.test.ts index 5aaaf103c6a..5d6c2cec874 100644 --- a/web-api/src/business/useCases/trialSessions/addCaseToTrialSessionInteractor.test.ts +++ b/web-api/src/business/useCases/trialSessions/addCaseToTrialSessionInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import '@web-api/persistence/postgres/messages/mocks.jest'; import { CASE_STATUS_TYPES, diff --git a/web-api/src/business/useCases/trialSessions/deleteTrialSessionInteractor.test.ts b/web-api/src/business/useCases/trialSessions/deleteTrialSessionInteractor.test.ts index b52d8079b4a..8965720fa07 100644 --- a/web-api/src/business/useCases/trialSessions/deleteTrialSessionInteractor.test.ts +++ b/web-api/src/business/useCases/trialSessions/deleteTrialSessionInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import '@web-api/persistence/postgres/messages/mocks.jest'; import { MOCK_CASE } from '../../../../../shared/src/test/mockCase'; import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock'; diff --git a/web-api/src/business/useCases/user/updatePetitionerInformationInteractor.createWorkItemForChange.test.ts b/web-api/src/business/useCases/user/updatePetitionerInformationInteractor.createWorkItemForChange.test.ts index 1e8c9eecde9..bd4a20ca5f8 100644 --- a/web-api/src/business/useCases/user/updatePetitionerInformationInteractor.createWorkItemForChange.test.ts +++ b/web-api/src/business/useCases/user/updatePetitionerInformationInteractor.createWorkItemForChange.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { CASE_STATUS_TYPES, CONTACT_TYPES, diff --git a/web-api/src/business/useCases/workItems/completeWorkItemInteractor.locking.test.ts b/web-api/src/business/useCases/workItems/completeWorkItemInteractor.locking.test.ts index 61853ab4c6d..db48938cceb 100644 --- a/web-api/src/business/useCases/workItems/completeWorkItemInteractor.locking.test.ts +++ b/web-api/src/business/useCases/workItems/completeWorkItemInteractor.locking.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { DOCKET_NUMBER_SUFFIXES, DOCKET_SECTION, diff --git a/web-api/src/business/useCases/workItems/completeWorkItemInteractor.test.ts b/web-api/src/business/useCases/workItems/completeWorkItemInteractor.test.ts index edbc4ac0de7..30c815d54a9 100644 --- a/web-api/src/business/useCases/workItems/completeWorkItemInteractor.test.ts +++ b/web-api/src/business/useCases/workItems/completeWorkItemInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { DOCKET_NUMBER_SUFFIXES, DOCKET_SECTION, diff --git a/web-api/src/persistence/postgres/cases/upsertCase.ts b/web-api/src/persistence/postgres/cases/upsertCase.ts index 5ce89e67a24..8d1c3bfe464 100644 --- a/web-api/src/persistence/postgres/cases/upsertCase.ts +++ b/web-api/src/persistence/postgres/cases/upsertCase.ts @@ -1,3 +1,4 @@ +import { calculateDate } from '@shared/business/utilities/DateHandler'; import { getDbWriter } from '@web-api/database'; export const upsertCase = async ({ rawCase }: { rawCase: RawCase }) => { @@ -7,7 +8,9 @@ export const upsertCase = async ({ rawCase }: { rawCase: RawCase }) => { docketNumberSuffix: rawCase.docketNumberSuffix, leadDocketNumber: rawCase.leadDocketNumber, status: rawCase.status, - trialDate: rawCase.trialDate, + trialDate: rawCase.trialDate + ? calculateDate({ dateString: rawCase.trialDate }) + : undefined, trialLocation: rawCase.trialLocation, }; await getDbWriter(writer => diff --git a/web-api/src/persistence/postgres/cases/upsertCases.ts b/web-api/src/persistence/postgres/cases/upsertCases.ts index 0c256216c82..816dc010f89 100644 --- a/web-api/src/persistence/postgres/cases/upsertCases.ts +++ b/web-api/src/persistence/postgres/cases/upsertCases.ts @@ -1,3 +1,4 @@ +import { calculateDate } from '@shared/business/utilities/DateHandler'; import { getDbWriter } from '@web-api/database'; export const upsertCases = async (rawCases: RawCase[]) => { @@ -9,7 +10,9 @@ export const upsertCases = async (rawCases: RawCase[]) => { docketNumberSuffix: rawCase.docketNumberSuffix, leadDocketNumber: rawCase.leadDocketNumber, status: rawCase.status, - trialDate: rawCase.trialDate, + trialDate: rawCase.trialDate + ? calculateDate({ dateString: rawCase.trialDate }) + : undefined, trialLocation: rawCase.trialLocation, })); diff --git a/web-api/src/persistence/postgres/messages/getCompletedUserInboxMessages.ts b/web-api/src/persistence/postgres/messages/getCompletedUserInboxMessages.ts index 81bb1a38d09..2551fdbdfe4 100644 --- a/web-api/src/persistence/postgres/messages/getCompletedUserInboxMessages.ts +++ b/web-api/src/persistence/postgres/messages/getCompletedUserInboxMessages.ts @@ -1,5 +1,5 @@ import { Message } from '@shared/business/entities/Message'; -import { calculateISODate } from '@shared/business/utilities/DateHandler'; +import { calculateDate } from '@shared/business/utilities/DateHandler'; import { getDbReader } from '@web-api/database'; import { messageResultEntity } from '@web-api/persistence/postgres/messages/mapper'; @@ -8,7 +8,7 @@ export const getCompletedUserInboxMessages = async ({ }: { userId: string; }): Promise => { - const filterDate = calculateISODate({ howMuch: -7 }); + const filterDate = calculateDate({ howMuch: -7 }); const messages = await getDbReader(reader => reader From 8004db026bcdc9818ca39d9bdc6d72d54fe5526b Mon Sep 17 00:00:00 2001 From: Kaitlyn Swann Date: Wed, 2 Oct 2024 10:11:21 -0600 Subject: [PATCH 3/3] 10391: more test fixes --- .../business/useCases/caseNote/saveCaseNoteInteractor.test.ts | 1 + .../caseStatistics/updateOtherStatisticsInteractor.test.ts | 1 + .../associateIrsPractitionerWithCaseInteractor.test.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/web-api/src/business/useCases/caseNote/saveCaseNoteInteractor.test.ts b/web-api/src/business/useCases/caseNote/saveCaseNoteInteractor.test.ts index eea1f25a8ac..0f47cb4056d 100644 --- a/web-api/src/business/useCases/caseNote/saveCaseNoteInteractor.test.ts +++ b/web-api/src/business/useCases/caseNote/saveCaseNoteInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { MOCK_CASE } from '../../../../../shared/src/test/mockCase'; import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock'; import { ServiceUnavailableError } from '@web-api/errors/errors'; diff --git a/web-api/src/business/useCases/caseStatistics/updateOtherStatisticsInteractor.test.ts b/web-api/src/business/useCases/caseStatistics/updateOtherStatisticsInteractor.test.ts index bac8d35e215..842ecbb8bb5 100644 --- a/web-api/src/business/useCases/caseStatistics/updateOtherStatisticsInteractor.test.ts +++ b/web-api/src/business/useCases/caseStatistics/updateOtherStatisticsInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { MOCK_CASE } from '../../../../../shared/src/test/mockCase'; import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock'; import { ServiceUnavailableError } from '@web-api/errors/errors'; diff --git a/web-api/src/business/useCases/manualAssociation/associateIrsPractitionerWithCaseInteractor.test.ts b/web-api/src/business/useCases/manualAssociation/associateIrsPractitionerWithCaseInteractor.test.ts index 7db5483f53f..79f64d74b69 100644 --- a/web-api/src/business/useCases/manualAssociation/associateIrsPractitionerWithCaseInteractor.test.ts +++ b/web-api/src/business/useCases/manualAssociation/associateIrsPractitionerWithCaseInteractor.test.ts @@ -1,3 +1,4 @@ +import '@web-api/persistence/postgres/cases/mocks.jest'; import { CASE_TYPES_MAP, CONTACT_TYPES,