From ca138d4dff27d5a4d8e1908ebbfcdc429cabdfbc Mon Sep 17 00:00:00 2001 From: haworku Date: Mon, 22 Apr 2024 08:55:05 -0700 Subject: [PATCH] fix: MCR-3988 document dates working again (#2369) --- .../ContractDetailsSummarySection.tsx | 4 +- .../RateDetailsSummarySection.tsx | 4 +- .../SingleRateSummarySection.tsx | 2 +- .../UploadedDocumentsTable.test.tsx | 2 + .../UploadedDocumentsTable.tsx | 2 +- .../makeDocumentDateLookupTable.ts | 18 +- .../RateDetails/V2/LinkedRateSummary.tsx | 1 + .../ContractDetailsSummarySectionV2.test.tsx | 16 +- .../ContractDetailsSummarySectionV2.tsx | 2 +- .../RateDetailsSummarySectionV2.tsx | 2 +- .../V2/ReviewSubmit/ReviewSubmitV2.test.tsx | 57 ++- .../apolloMocks/contractPackageDataMock.ts | 389 +++++++++++++++++- .../src/testHelpers/apolloMocks/index.ts | 3 +- .../cmsWorkflow/rateReview.spec.ts | 3 + .../cmsWorkflow/unlockResubmit.spec.ts | 3 + .../cmsWorkflow/viewSubmission.spec.ts | 4 + .../questionResponse/questionResponse.spec.ts | 4 + 17 files changed, 474 insertions(+), 42 deletions(-) diff --git a/services/app-web/src/components/SubmissionSummarySection/ContractDetailsSummarySection/ContractDetailsSummarySection.tsx b/services/app-web/src/components/SubmissionSummarySection/ContractDetailsSummarySection/ContractDetailsSummarySection.tsx index 50222683f3..9f25cdffa0 100644 --- a/services/app-web/src/components/SubmissionSummarySection/ContractDetailsSummarySection/ContractDetailsSummarySection.tsx +++ b/services/app-web/src/components/SubmissionSummarySection/ContractDetailsSummarySection/ContractDetailsSummarySection.tsx @@ -309,7 +309,7 @@ export const ContractDetailsSummarySection = ({ ? new Date( documentDateLookupTable.previousSubmissionDate ) - : undefined + : null } caption="Contract" documentCategory="Contract" @@ -325,7 +325,7 @@ export const ContractDetailsSummarySection = ({ ? new Date( documentDateLookupTable.previousSubmissionDate ) - : undefined + : null } caption="Contract supporting documents" documentCategory="Contract-supporting" diff --git a/services/app-web/src/components/SubmissionSummarySection/RateDetailsSummarySection/RateDetailsSummarySection.tsx b/services/app-web/src/components/SubmissionSummarySection/RateDetailsSummarySection/RateDetailsSummarySection.tsx index 90c3fe7d5b..27b89b9143 100644 --- a/services/app-web/src/components/SubmissionSummarySection/RateDetailsSummarySection/RateDetailsSummarySection.tsx +++ b/services/app-web/src/components/SubmissionSummarySection/RateDetailsSummarySection/RateDetailsSummarySection.tsx @@ -364,7 +364,7 @@ export const RateDetailsSummarySection = ({ ? new Date( documentDateLookupTable.previousSubmissionDate ) - : undefined + : null } multipleDocumentsAllowed={false} caption="Rate certification" @@ -388,7 +388,7 @@ export const RateDetailsSummarySection = ({ ? new Date( documentDateLookupTable.previousSubmissionDate ) - : undefined + : null } caption="Rate supporting documents" isSupportingDocuments diff --git a/services/app-web/src/components/SubmissionSummarySection/RateDetailsSummarySection/SingleRateSummarySection.tsx b/services/app-web/src/components/SubmissionSummarySection/RateDetailsSummarySection/SingleRateSummarySection.tsx index c3247b7b1f..f3b43803ec 100644 --- a/services/app-web/src/components/SubmissionSummarySection/RateDetailsSummarySection/SingleRateSummarySection.tsx +++ b/services/app-web/src/components/SubmissionSummarySection/RateDetailsSummarySection/SingleRateSummarySection.tsx @@ -99,7 +99,7 @@ export const SingleRateSummarySection = ({ const navigate = useNavigate() const rateRevision = rate.revisions[0] const formData: RateFormData = rateRevision?.formData - const lastSubmittedDate = rate.revisions[0]?.submitInfo?.updatedAt + const lastSubmittedDate = rate.revisions[0]?.submitInfo?.updatedAt ?? null const isRateAmendment = formData.rateType === 'AMENDMENT' const isUnlocked = rate.status === 'UNLOCKED' const explainMissingData = diff --git a/services/app-web/src/components/SubmissionSummarySection/UploadedDocumentsTable/UploadedDocumentsTable.test.tsx b/services/app-web/src/components/SubmissionSummarySection/UploadedDocumentsTable/UploadedDocumentsTable.test.tsx index 19510796d4..a071847f1d 100644 --- a/services/app-web/src/components/SubmissionSummarySection/UploadedDocumentsTable/UploadedDocumentsTable.test.tsx +++ b/services/app-web/src/components/SubmissionSummarySection/UploadedDocumentsTable/UploadedDocumentsTable.test.tsx @@ -67,6 +67,7 @@ describe('UploadedDocumentsTable', () => { renderWithProviders( { renderWithProviders( { + const listOfRevisionLookups = Object.keys(revisionsLookup) + listOfRevisionLookups.forEach( + (revisionId: string, index) => { const revision = revisionsLookup[revisionId] - if (index === 1) { - // second most recent revision - const previousSubmission = getDateAdded(revision) // used in UploadedDocumentsTable to determine if we should show NEW tag - if (previousSubmission) - lookupTable['previousSubmissionDate'] = previousSubmission - } + + const submitDate = revision.submitInfo?.updatedAt + if (submitDate && (listOfRevisionLookups.length === 1 || index === 1)) { // if we have a package with only one submitted revision, use that - otherwise use whatever in is the 1 index because thats the last submitted + lookupTable['previousSubmissionDate'] = submitDate + } const allDocuments = getAllDocuments(revision.formData) allDocuments.forEach((doc) => { diff --git a/services/app-web/src/pages/StateSubmission/RateDetails/V2/LinkedRateSummary.tsx b/services/app-web/src/pages/StateSubmission/RateDetails/V2/LinkedRateSummary.tsx index 0cf5083f21..e5c8977836 100644 --- a/services/app-web/src/pages/StateSubmission/RateDetails/V2/LinkedRateSummary.tsx +++ b/services/app-web/src/pages/StateSubmission/RateDetails/V2/LinkedRateSummary.tsx @@ -64,6 +64,7 @@ export const LinkedRateSummary = ({ caption="Rate certification" documentCategory="Rate certification" isEditing={false} + previousSubmissionDate={null} /> ) diff --git a/services/app-web/src/pages/StateSubmission/ReviewSubmit/V2/ReviewSubmit/ContractDetailsSummarySectionV2.test.tsx b/services/app-web/src/pages/StateSubmission/ReviewSubmit/V2/ReviewSubmit/ContractDetailsSummarySectionV2.test.tsx index 3b20f565b4..01cd2b6966 100644 --- a/services/app-web/src/pages/StateSubmission/ReviewSubmit/V2/ReviewSubmit/ContractDetailsSummarySectionV2.test.tsx +++ b/services/app-web/src/pages/StateSubmission/ReviewSubmit/V2/ReviewSubmit/ContractDetailsSummarySectionV2.test.tsx @@ -11,6 +11,7 @@ import { StatutoryRegulatoryAttestation, StatutoryRegulatoryAttestationQuestion, } from '../../../../../constants/statutoryRegulatoryAttestation' +import { mockContractFormData } from '../../../../../testHelpers/apolloMocks/contractPackageDataMock' describe('ContractDetailsSummarySection', () => { const defaultApolloMocks = { @@ -314,7 +315,20 @@ describe('ContractDetailsSummarySection', () => { it('does not render supporting contract documents table when no documents exist', () => { renderWithProviders( , { diff --git a/services/app-web/src/pages/StateSubmission/ReviewSubmit/V2/ReviewSubmit/ContractDetailsSummarySectionV2.tsx b/services/app-web/src/pages/StateSubmission/ReviewSubmit/V2/ReviewSubmit/ContractDetailsSummarySectionV2.tsx index 81a5f58f2e..ddae446d85 100644 --- a/services/app-web/src/pages/StateSubmission/ReviewSubmit/V2/ReviewSubmit/ContractDetailsSummarySectionV2.tsx +++ b/services/app-web/src/pages/StateSubmission/ReviewSubmit/V2/ReviewSubmit/ContractDetailsSummarySectionV2.tsx @@ -157,7 +157,7 @@ export const ContractDetailsSummarySectionV2 = ({ isPreviousSubmission, ]) const lastSubmittedDate = - getLastContractSubmission(contract)?.submitInfo.updatedAt + getLastContractSubmission(contract)?.submitInfo.updatedAt ?? null return ( { }) }) + it('extracts the correct dates from unlocked submission and displays them in tables', async () => { + const contractMock = fetchContractMockSuccess({ + contract: mockContractPackageUnlocked(), + }) + + renderWithProviders( + + } + /> + , + { + apolloProvider: { + mocks: [ + fetchCurrentUserMock({ statusCode: 200 }), + contractMock, + ], + }, + routerProvider: { + route: '/submissions/test-abc-123/edit/review-and-submit', + }, + featureFlags: { + 'link-rates': true, + }, + } + ) + + await waitFor(() => { + const contractDocRow = screen.getByRole('row', { + name: /contract document/, + }) + expect( + within(contractDocRow).getByText('1/1/24') + ).toBeInTheDocument() + const contractSupporting1Row = screen.getByRole('row', { + name: /contractSupporting1/, + }) + expect( + within(contractSupporting1Row).getByText('1/15/24') + ).toBeInTheDocument() + const rateDocRow = screen.getByRole('row', { + name: /rate certification/, + }) + expect(within(rateDocRow).getByText('1/13/24')).toBeInTheDocument() + const rateSupporting1Row = screen.getByRole('row', { + name: /rateSupporting1/, + }) + expect( + within(rateSupporting1Row).getByText('1/15/24') + ).toBeInTheDocument() + }) + }) + it('displays back, save as draft, and submit buttons', async () => { renderWithProviders( diff --git a/services/app-web/src/testHelpers/apolloMocks/contractPackageDataMock.ts b/services/app-web/src/testHelpers/apolloMocks/contractPackageDataMock.ts index bc7166e547..31fb04b4df 100644 --- a/services/app-web/src/testHelpers/apolloMocks/contractPackageDataMock.ts +++ b/services/app-web/src/testHelpers/apolloMocks/contractPackageDataMock.ts @@ -1,9 +1,108 @@ import { mockMNState } from '../../common-code/healthPlanFormDataMocks/healthPlanFormData' -import { Contract } from '../../gen/gqlClient' +import { Contract, ContractFormData } from '../../gen/gqlClient' // Assemble versions of Contract data (with or without rates) for jest testing. Intended for use with related GQL Moc file. function mockContractPackageDraft( partial?: Partial +): Contract { + return { + __typename: 'Contract', + initiallySubmittedAt: undefined, + status: 'DRAFT', + createdAt: new Date('01/01/24'), + updatedAt: new Date(), + id: 'test-abc-123', + stateCode: 'MN', + state: mockMNState(), + stateNumber: 5, + draftRevision: { + __typename: 'ContractRevision', + submitInfo: undefined, + unlockInfo: undefined, + id: '123', + createdAt: new Date(), + updatedAt: new Date(), + contractName: 'MCR-0005-alvhalfhdsalf', + formData: mockContractFormData(partial?.draftRevision?.formData) + }, + + draftRates: [ + { + id: '123', + createdAt: new Date(), + updatedAt: new Date(), + status: 'DRAFT', + stateCode: 'MN', + revisions: [], + state: mockMNState(), + stateNumber: 5, + parentContractID: 'foo-baz', + draftRevision: { + id: '123', + rateID: '456', + contractRevisions: [], + createdAt: new Date(), + updatedAt: new Date(), + formData: { + rateType: 'AMENDMENT', + rateCapitationType: 'RATE_CELL', + rateDocuments: [ + { + s3URL: 's3://bucketname/key/rate', + sha256: 'fakesha', + name: 'rate certification', + dateAdded: new Date('01/13/2024') + }, + ], + supportingDocuments: [ + { + s3URL: 's3://bucketname/key/ratesupporting1', + sha256: 'fakesha', + name: 'rateSupporting1', + dateAdded: new Date('01/15/2024') + }, + { + s3URL: 's3://bucketname/key/rateSupporting2', + sha256: 'fakesha', + name: 'rateSupporting2', + dateAdded: new Date('01/13/2024') + }, + ], + rateDateStart: new Date(), + rateDateEnd: new Date(), + rateDateCertified: new Date(), + amendmentEffectiveDateStart: new Date(), + amendmentEffectiveDateEnd: new Date(), + rateProgramIDs: ['abbdf9b0-c49e-4c4c-bb6f-040cb7b51cce'], + certifyingActuaryContacts: [ + { + actuarialFirm: 'DELOITTE', + name: 'Actuary Contact 1', + titleRole: 'Test Actuary Contact 1', + email: 'actuarycontact1@test.com', + }, + ], + addtlActuaryContacts: [ + { + actuarialFirm: 'DELOITTE', + name: 'Actuary Contact 1', + titleRole: 'Test Actuary Contact 1', + email: 'additionalactuarycontact1@test.com', + }, + ], + actuaryCommunicationPreference: 'OACT_TO_ACTUARY', + packagesWithSharedRateCerts: [], + } + } + + }, + ], + packageSubmissions: [], + ...partial, + } +} +function mockContractWithLinkedRateDraft( + partial?: Partial ): Contract { return { __typename: 'Contract', @@ -78,7 +177,7 @@ function mockContractPackageDraft( id: '123', createdAt: new Date(), updatedAt: new Date(), - status: 'DRAFT', + status: 'SUBMITTED', stateCode: 'MN', revisions: [], state: mockMNState(), @@ -135,14 +234,14 @@ function mockContractPackageDraft( ...partial, } } -function mockContractWithLinkedRateDraft( +function mockContractPackageUnlocked( partial?: Partial ): Contract { return { __typename: 'Contract', initiallySubmittedAt: undefined, - status: 'DRAFT', - createdAt: new Date(), + status: 'UNLOCKED', + createdAt: new Date('01/01/24'), updatedAt: new Date(), id: 'test-abc-123', stateCode: 'MN', @@ -162,7 +261,20 @@ function mockContractWithLinkedRateDraft( submissionType: 'CONTRACT_AND_RATES', riskBasedContract: true, submissionDescription: 'A real submission', - supportingDocuments: [], + supportingDocuments: [ + { + s3URL: 's3://bucketname/key/contractsupporting1', + sha256: 'fakesha', + name: 'contractSupporting1', + dateAdded: new Date('01/15/2024') + }, + { + s3URL: 's3://bucketname/key/contractSupporting2', + sha256: 'fakesha', + name: 'contractSupporting2', + dateAdded: new Date('01/13/2024') + }, + ], stateContacts: [ { name: 'State Contact 1', @@ -176,8 +288,8 @@ function mockContractWithLinkedRateDraft( { s3URL: 's3://bucketname/one-two/one-two.png', sha256: 'fakesha', - name: 'one two', - dateAdded: new Date() + name: 'contract document', + dateAdded: new Date('01/01/2024') }, ], contractDateStart: new Date('01/01/2023'), @@ -211,15 +323,15 @@ function mockContractWithLinkedRateDraft( id: '123', createdAt: new Date(), updatedAt: new Date(), - status: 'SUBMITTED', + status: 'DRAFT', stateCode: 'MN', revisions: [], state: mockMNState(), stateNumber: 5, - parentContractID: 'foo-baz', + parentContractID:'test-abc-123', draftRevision: { - id: '123', - rateID: '456', + id: '456', + rateID: '123', contractRevisions: [], createdAt: new Date(), updatedAt: new Date(), @@ -230,11 +342,24 @@ function mockContractWithLinkedRateDraft( { s3URL: 's3://bucketname/key/rate', sha256: 'fakesha', - name: 'rate', - dateAdded: new Date() + name: 'rate certification', + dateAdded: new Date('01/13/2024') + }, + ], + supportingDocuments: [ + { + s3URL: 's3://bucketname/key/ratesupporting1', + sha256: 'fakesha', + name: 'rateSupporting1', + dateAdded: new Date('01/15/2024') + }, + { + s3URL: 's3://bucketname/key/rateSupporting2', + sha256: 'fakesha', + name: 'rateSupporting2', + dateAdded: new Date('01/13/2024') }, ], - supportingDocuments: [], rateDateStart: new Date(), rateDateEnd: new Date(), rateDateCertified: new Date(), @@ -264,7 +389,135 @@ function mockContractWithLinkedRateDraft( }, ], - packageSubmissions: [], + packageSubmissions: [{ + cause: 'CONTRACT_SUBMISSION', + submitInfo: { + updatedAt: new Date('12/31/2023'), + updatedBy: 'example@state.com', + updatedReason: 'contract submit' + }, + submittedRevisions: [], + contractRevision: { + contractName: 'MCR-MN-0005-SNBC', + createdAt: new Date('01/01/2023'), + updatedAt: new Date('12/31/2023'), + id: '123', + formData: { + programIDs: ['abbdf9b0-c49e-4c4c-bb6f-040cb7b51cce'], + populationCovered: 'MEDICAID', + submissionType: 'CONTRACT_AND_RATES', + riskBasedContract: true, + submissionDescription: 'A real submission', + supportingDocuments: [ + { + s3URL: 's3://bucketname/key/contractsupporting1', + sha256: 'fakesha', + name: 'contractSupporting1', + dateAdded: new Date('01/15/2023') + }, + { + s3URL: 's3://bucketname/key/contractSupporting2', + sha256: 'fakesha', + name: 'contractSupporting2', + dateAdded: new Date('01/13/2023') + }, + ], + stateContacts: [], + contractType: 'AMENDMENT', + contractExecutionStatus: 'EXECUTED', + contractDocuments: [ + { + s3URL: 's3://bucketname/key/contract', + sha256: 'fakesha', + name: 'contract', + dateAdded: new Date('01/01/2023') + }, + ], + contractDateStart: new Date(), + contractDateEnd: new Date(), + managedCareEntities: ['MCO'], + federalAuthorities: ['STATE_PLAN'], + inLieuServicesAndSettings: true, + modifiedBenefitsProvided: true, + modifiedGeoAreaServed: false, + modifiedMedicaidBeneficiaries: true, + modifiedRiskSharingStrategy: true, + modifiedIncentiveArrangements: false, + modifiedWitholdAgreements: false, + modifiedStateDirectedPayments: true, + modifiedPassThroughPayments: true, + modifiedPaymentsForMentalDiseaseInstitutions: false, + modifiedMedicalLossRatioStandards: true, + modifiedOtherFinancialPaymentIncentive: false, + modifiedEnrollmentProcess: true, + modifiedGrevienceAndAppeal: false, + modifiedNetworkAdequacyStandards: true, + modifiedLengthOfContract: false, + modifiedNonRiskPaymentArrangements: true, + statutoryRegulatoryAttestation: true, + statutoryRegulatoryAttestationDescription: "everything meets regulatory attestation" + } + }, + rateRevisions: [ + { + id: '1234', + rateID: '456', + createdAt: new Date('01/01/2023'), + updatedAt: new Date('01/01/2023'), + contractRevisions: [], + formData: { + rateType: 'AMENDMENT', + rateCapitationType: 'RATE_CELL', + rateDocuments: [ + { + s3URL: 's3://bucketname/key/rate', + sha256: 'fakesha', + name: 'rate', + dateAdded: new Date('01/01/2023') + }, + ], + supportingDocuments: [ + { + s3URL: 's3://bucketname/key/rateSupporting1', + sha256: 'fakesha', + name: 'rate supporting 1', + dateAdded: new Date('01/15/2023') + }, + { + s3URL: 's3://bucketname/key/rateSupporting1', + sha256: 'fakesha', + name: 'rate supporting 2', + dateAdded: new Date('01/15/2023') + }, + ], + rateDateStart: new Date(), + rateDateEnd: new Date(), + rateDateCertified: new Date(), + amendmentEffectiveDateStart: new Date(), + amendmentEffectiveDateEnd: new Date(), + rateProgramIDs: ['abbdf9b0-c49e-4c4c-bb6f-040cb7b51cce'], + certifyingActuaryContacts: [ + { + actuarialFirm: 'DELOITTE', + name: 'Actuary Contact 1', + titleRole: 'Test Actuary Contact 1', + email: 'actuarycontact1@test.com', + }, + ], + addtlActuaryContacts: [ + { + actuarialFirm: 'DELOITTE', + name: 'Actuary Contact 1', + titleRole: 'Test Actuary Contact 1', + email: 'actuarycontact1@test.com', + }, + ], + actuaryCommunicationPreference: 'OACT_TO_ACTUARY', + packagesWithSharedRateCerts: [] + } + }, + ], + }], ...partial, } } @@ -298,7 +551,20 @@ function mockContractPackageSubmitted( submissionType: 'CONTRACT_AND_RATES', riskBasedContract: true, submissionDescription: 'A real submission', - supportingDocuments: [], + supportingDocuments: [ + { + s3URL: 's3://bucketname/key/contractsupporting1', + sha256: 'fakesha', + name: 'contractSupporting1', + dateAdded: new Date('01/15/2024') + }, + { + s3URL: 's3://bucketname/key/contractSupporting2', + sha256: 'fakesha', + name: 'contractSupporting2', + dateAdded: new Date('01/13/2024') + }, + ], stateContacts: [], contractType: 'AMENDMENT', contractExecutionStatus: 'EXECUTED', @@ -307,7 +573,7 @@ function mockContractPackageSubmitted( s3URL: 's3://bucketname/key/contract', sha256: 'fakesha', name: 'contract', - dateAdded: new Date() + dateAdded: new Date('01/01/2024') }, ], contractDateStart: new Date(), @@ -338,7 +604,7 @@ function mockContractPackageSubmitted( rateRevisions: [ { id: '1234', - rateID: '456', + rateID: '123', createdAt: new Date('01/01/2023'), updatedAt: new Date('01/01/2023'), contractRevisions: [], @@ -350,10 +616,23 @@ function mockContractPackageSubmitted( s3URL: 's3://bucketname/key/rate', sha256: 'fakesha', name: 'rate', - dateAdded: new Date() + dateAdded: new Date('01/01/2023') + }, + ], + supportingDocuments: [ + { + s3URL: 's3://bucketname/key/rateSupporting1', + sha256: 'fakesha', + name: 'rate supporting 1', + dateAdded: new Date('01/15/2023') + }, + { + s3URL: 's3://bucketname/key/rateSupporting1', + sha256: 'fakesha', + name: 'rate supporting 2', + dateAdded: new Date('01/15/2023') }, ], - supportingDocuments: [], rateDateStart: new Date(), rateDateEnd: new Date(), rateDateCertified: new Date(), @@ -386,4 +665,70 @@ function mockContractPackageSubmitted( } } -export { mockContractPackageDraft, mockContractPackageSubmitted, mockContractWithLinkedRateDraft } \ No newline at end of file +function mockContractFormData( partial?: Partial): ContractFormData { + return { + programIDs: ['abbdf9b0-c49e-4c4c-bb6f-040cb7b51cce'], + populationCovered: 'MEDICAID', + submissionType: 'CONTRACT_AND_RATES', + riskBasedContract: true, + submissionDescription: 'A real submission', + supportingDocuments: [ + { + s3URL: 's3://bucketname/key/contractsupporting1', + sha256: 'fakesha', + name: 'contractSupporting1', + dateAdded: new Date('01/15/2024') + }, + { + s3URL: 's3://bucketname/key/contractSupporting2', + sha256: 'fakesha', + name: 'contractSupporting2', + dateAdded: new Date('01/13/2024') + }, + ], + stateContacts: [ + { + name: 'State Contact 1', + titleRole: 'Test State Contact 1', + email: 'actuarycontact1@test.com', + }, + ], + contractType: 'AMENDMENT', + contractExecutionStatus: 'EXECUTED', + contractDocuments: [ + { + s3URL: 's3://bucketname/one-two/one-two.png', + sha256: 'fakesha', + name: 'contract document', + dateAdded: new Date('01/01/2024') + }, + ], + contractDateStart: new Date('01/01/2023'), + contractDateEnd: new Date('12/31/2023'), + managedCareEntities: ['MCO'], + federalAuthorities: ['STATE_PLAN'], + inLieuServicesAndSettings: true, + modifiedBenefitsProvided: true, + modifiedGeoAreaServed: false, + modifiedMedicaidBeneficiaries: true, + modifiedRiskSharingStrategy: true, + modifiedIncentiveArrangements: false, + modifiedWitholdAgreements: false, + modifiedStateDirectedPayments: true, + modifiedPassThroughPayments: true, + modifiedPaymentsForMentalDiseaseInstitutions: false, + modifiedMedicalLossRatioStandards: true, + modifiedOtherFinancialPaymentIncentive: false, + modifiedEnrollmentProcess: true, + modifiedGrevienceAndAppeal: false, + modifiedNetworkAdequacyStandards: true, + modifiedLengthOfContract: false, + modifiedNonRiskPaymentArrangements: true, + statutoryRegulatoryAttestation: true, + statutoryRegulatoryAttestationDescription: "everything meets regulatory attestation", + ...partial + } +} + +export { mockContractPackageDraft, mockContractPackageSubmitted, mockContractWithLinkedRateDraft, mockContractPackageUnlocked, mockContractFormData} + diff --git a/services/app-web/src/testHelpers/apolloMocks/index.ts b/services/app-web/src/testHelpers/apolloMocks/index.ts index 656375ff07..403fd4a90f 100644 --- a/services/app-web/src/testHelpers/apolloMocks/index.ts +++ b/services/app-web/src/testHelpers/apolloMocks/index.ts @@ -65,7 +65,8 @@ export { export { mockContractPackageDraft, mockContractPackageSubmitted, - mockContractWithLinkedRateDraft + mockContractWithLinkedRateDraft, + mockContractPackageUnlocked } from './contractPackageDataMock' export { rateDataMock } from './rateDataMock' export { fetchContractMockSuccess, updateDraftContractRatesMockSuccess } from './contractGQLMock' diff --git a/services/cypress/integration/cmsWorkflow/rateReview.spec.ts b/services/cypress/integration/cmsWorkflow/rateReview.spec.ts index b7d476c7b0..b4e03ffed7 100644 --- a/services/cypress/integration/cmsWorkflow/rateReview.spec.ts +++ b/services/cypress/integration/cmsWorkflow/rateReview.spec.ts @@ -74,6 +74,9 @@ describe('CMS user can view rate reviews', () => { }) cy.findByText('rate1SupportingDocument1.pdf').should('exist') + // No document dates or other fields are undefined + cy.findByText('N/A').should('not.exist') + // Go back to dashboard and check both rates in the table // check the dashboard has the columns we expect cy.findByText('Back to dashboard').should('exist').click() diff --git a/services/cypress/integration/cmsWorkflow/unlockResubmit.spec.ts b/services/cypress/integration/cmsWorkflow/unlockResubmit.spec.ts index e12dd3526f..bb02eae69c 100644 --- a/services/cypress/integration/cmsWorkflow/unlockResubmit.spec.ts +++ b/services/cypress/integration/cmsWorkflow/unlockResubmit.spec.ts @@ -196,6 +196,9 @@ describe('CMS user', () => { cy.navigateFormByDirectLink(submissionURL) cy.findByTestId('updatedSubmissionBanner').should('exist') + // No document dates or other fields are undefined + cy.findByText('N/A').should('not.exist') + // Should have change history records cy.findAllByTestId('change-history-record').should('have.length', 5) diff --git a/services/cypress/integration/cmsWorkflow/viewSubmission.spec.ts b/services/cypress/integration/cmsWorkflow/viewSubmission.spec.ts index b29cc9f7b2..f3d4af6885 100644 --- a/services/cypress/integration/cmsWorkflow/viewSubmission.spec.ts +++ b/services/cypress/integration/cmsWorkflow/viewSubmission.spec.ts @@ -95,6 +95,10 @@ describe('CMS user can view submission', () => { cy.findByText(submissionName).should('exist').click() cy.url({ timeout: 10_000 }).should('contain', submissionId) cy.findByTestId('submission-summary').should('exist') + + + // No document dates or other fields are undefined + cy.findByText('N/A').should('not.exist') }) }) }) diff --git a/services/cypress/integration/stateWorkflow/questionResponse/questionResponse.spec.ts b/services/cypress/integration/stateWorkflow/questionResponse/questionResponse.spec.ts index 5f8bc3e0b1..2f99690150 100644 --- a/services/cypress/integration/stateWorkflow/questionResponse/questionResponse.spec.ts +++ b/services/cypress/integration/stateWorkflow/questionResponse/questionResponse.spec.ts @@ -93,6 +93,10 @@ describe('Q&A', () => { { timeout: 5_000 } ).should('exist') }) + + + // No document dates or other fields are undefined + cy.findByText('N/A').should('not.exist') } ) })