diff --git a/services/app-web/src/pages/StateSubmission/RateDetails/RateDetailsSchema.test.ts b/services/app-web/src/pages/StateSubmission/RateDetails/RateDetailsSchema.test.ts index b4736f5255..adbbed2281 100644 --- a/services/app-web/src/pages/StateSubmission/RateDetails/RateDetailsSchema.test.ts +++ b/services/app-web/src/pages/StateSubmission/RateDetails/RateDetailsSchema.test.ts @@ -13,7 +13,8 @@ describe('RateDetailsSchema', () => { supportingDocuments: [], ratePreviouslySubmitted: 'YES', } - ] + ], + actuaryCommunicationPreference: 'OACT_TO_ACTUARY' } const res = await RateDetailsFormSchema({'link-rates': true}).validate(badRateRev, {abortEarly: false}) diff --git a/services/app-web/src/pages/StateSubmission/RateDetails/RateDetailsSchema.ts b/services/app-web/src/pages/StateSubmission/RateDetails/RateDetailsSchema.ts index feadd389e1..bcbb71fdd4 100644 --- a/services/app-web/src/pages/StateSubmission/RateDetails/RateDetailsSchema.ts +++ b/services/app-web/src/pages/StateSubmission/RateDetails/RateDetailsSchema.ts @@ -168,6 +168,9 @@ const RateDetailsFormSchema = (activeFeatureFlags?: FeatureFlagSettings) => { rateForms: Yup.array().of( SingleRateCertSchema(activeFeatureFlags || {}) ), + actuaryCommunicationPreference: Yup.string().required( + 'You must select a communication preference' + ) }): Yup.object().shape({ rateInfos: Yup.array().of( diff --git a/services/app-web/src/pages/StateSubmission/RateDetails/V2/RateDetailsV2.test.tsx b/services/app-web/src/pages/StateSubmission/RateDetails/V2/RateDetailsV2.test.tsx index cc727afb1a..05287a6fc7 100644 --- a/services/app-web/src/pages/StateSubmission/RateDetails/V2/RateDetailsV2.test.tsx +++ b/services/app-web/src/pages/StateSubmission/RateDetails/V2/RateDetailsV2.test.tsx @@ -507,16 +507,11 @@ describe('RateDetailsv2', () => { ).toBeInTheDocument() expect(submitButton).toHaveAttribute('aria-disabled', 'true') expect( - screen.getByText('There are 2 errors on this page') + screen.getByText('There is 1 error on this page') ).toBeInTheDocument() expect( screen.getByText('You must select yes or no') ).toBeInTheDocument() - expect( - screen.getAllByText( - 'You must select a communication preference' - ) - ).toHaveLength(2) }) }) })