Skip to content

Commit

Permalink
Deprecate the rate programs field across the board
Browse files Browse the repository at this point in the history
  • Loading branch information
pearl-truss committed May 15, 2024
1 parent 74c4f62 commit 70ddbc9
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ describe('RateDetailsSummarySection', () => {
}
)
const programElement = screen.getByRole('definition', {
name: 'Programs this rate certification covers',
name: 'Rates this rate certification covers',
})
expect(programElement).toBeInTheDocument()
const programList = within(programElement).getByText('SNBC, PMAP')
Expand All @@ -513,7 +513,7 @@ describe('RateDetailsSummarySection', () => {
}
)
const programElement = screen.getByRole('definition', {
name: 'Programs this rate certification covers',
name: 'Rates this rate certification covers',
})
expect(programElement).toBeInTheDocument()
const programList = within(programElement).getByText('SNBC, PMAP')
Expand All @@ -536,7 +536,7 @@ describe('RateDetailsSummarySection', () => {
}
)
const programList = screen.getAllByRole('definition', {
name: 'Programs this rate certification covers',
name: 'Rates this rate certification covers',
})
expect(programList).toHaveLength(2)
expect(programList[0]).toHaveTextContent('SNBC')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export const RateDetailsSummarySection = ({
{ratePrograms && (
<DataDetail
id="ratePrograms"
label="Programs this rate certification covers"
label="Rates this rate certification covers"
explainMissingData={!isSubmitted}
children={ratePrograms(
submission,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('SingleRateSummarySection', () => {
expect(screen.getByText(rateName)).toBeInTheDocument()
expect(
screen.getByRole('definition', {
name: 'Programs this rate certification covers',
name: 'Rates this rate certification covers',
})
).toBeInTheDocument()
expect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export const SingleRateSummarySection = ({
{ratePrograms && (
<DataDetail
id="ratePrograms"
label="Programs this rate certification covers"
label="Rates this rate certification covers"
explainMissingData={explainMissingData}
children={ratePrograms(formData, statePrograms)}
/>
Expand Down
8 changes: 2 additions & 6 deletions services/app-web/src/pages/RateSummary/RateSummary.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ describe('RateSummary', () => {
})

expect(
await screen.findByText(
'Programs this rate certification covers'
)
await screen.findByText('Rates this rate certification covers')
).toBeInTheDocument()
})

Expand Down Expand Up @@ -137,9 +135,7 @@ describe('RateSummary', () => {
})

expect(
await screen.findByText(
'Programs this rate certification covers'
)
await screen.findByText('Rates this rate certification covers')
).toBeInTheDocument()
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ describe('RateDetails', () => {
})

expect(
screen.getByText('Programs this rate certification covers')
screen.getByText('Rates this rate certification covers')
).toBeInTheDocument()
expect(
screen.getByText('Rate certification type')
Expand Down Expand Up @@ -282,7 +282,9 @@ describe('RateDetails', () => {
await waitFor(() => {
expect(screen.queryAllByTestId('errorMessage')).toHaveLength(7)
expect(
screen.queryAllByText('You must select a program')
screen.queryAllByText(
'You must indicate which rate are included in this certification'
)
).toHaveLength(2)
expect(
screen.queryByText(
Expand Down Expand Up @@ -1660,9 +1662,7 @@ const fillOutIndexRate = async (screen: Screen, index: number) => {
withinTargetRateCert.getByText('Upload one rate certification document')
).toBeInTheDocument()
expect(
withinTargetRateCert.getByText(
'Programs this rate certification covers'
)
withinTargetRateCert.getByText('Rates this rate certification covers')
).toBeInTheDocument()
expect(
withinTargetRateCert.getByText('Rate certification type')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export const SingleRateCert = ({

<FormGroup error={Boolean(showFieldErrors('rateProgramIDs'))}>
<Label htmlFor={`${fieldNamePrefix}.rateProgramIDs`}>
Programs this rate certification covers
Rates this rate certification covers
</Label>
<span className={styles.requiredOptionalText}>
Required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ export const SingleRateFormFields = ({
name={`${fieldNamePrefix}.rateProgramIDs`}
inputId={`${fieldNamePrefix}.rateProgramIDs`}
programIDs={rateForm.rateProgramIDs}
aria-label="What rates are included in this certification? (required)"
aria-label={
'What rates are included in this certification? (required)'
}
/>
</FormGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ describe('RateDetailsSummarySection', () => {
)
}
const programElement = screen.getByRole('definition', {
name: 'Programs this rate certification covers',
name: 'Rates this rate certification covers',
})
expect(programElement).toBeInTheDocument()
const programList = within(programElement).getByText('SNBC, PMAP')
Expand Down Expand Up @@ -602,7 +602,7 @@ describe('RateDetailsSummarySection', () => {
)
}
const programElement = screen.getByRole('definition', {
name: 'Programs this rate certification covers',
name: 'Rates this rate certification covers',
})
expect(programElement).toBeInTheDocument()
const programList = within(programElement).getByText('SNBC, PMAP')
Expand All @@ -624,7 +624,7 @@ describe('RateDetailsSummarySection', () => {
}
)
const programList = screen.getAllByRole('definition', {
name: 'Programs this rate certification covers',
name: 'Rates this rate certification covers',
})
expect(programList).toHaveLength(2)
expect(programList[0]).toHaveTextContent('SNBC')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export const RateDetailsSummarySectionV2 = ({
{ratePrograms && (
<DataDetail
id="ratePrograms"
label="Programs this rate certification covers"
label="Rates this rate certification covers"
explainMissingData={
!isSubmittedOrCMSUser
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ describe('SubmissionSummary', () => {
).toBeInTheDocument()
expect(
screen.getByRole('definition', {
name: 'Programs this rate certification covers',
name: 'Rates this rate certification covers',
})
).toBeInTheDocument()
expect(screen.getByText('SNBC')).toBeInTheDocument()
Expand Down Expand Up @@ -1380,7 +1380,7 @@ describe('SubmissionSummary', () => {
).toBeInTheDocument()
expect(
screen.getByRole('definition', {
name: 'Programs this rate certification covers',
name: 'Rates this rate certification covers',
})
).toBeInTheDocument()
expect(screen.getByText('SNBC')).toBeInTheDocument()
Expand Down Expand Up @@ -1739,7 +1739,7 @@ describe('SubmissionSummary', () => {
).toBeInTheDocument()
expect(
screen.getByRole('definition', {
name: 'Programs this rate certification covers',
name: 'Rates this rate certification covers',
})
).toBeInTheDocument()
expect(screen.getByText('SNBC')).toBeInTheDocument()
Expand Down Expand Up @@ -2097,7 +2097,7 @@ describe('SubmissionSummary', () => {
).toBeInTheDocument()
expect(
screen.getByRole('definition', {
name: 'Programs this rate certification covers',
name: 'Rates this rate certification covers',
})
).toBeInTheDocument()
expect(screen.getByText('SNBC')).toBeInTheDocument()
Expand Down

0 comments on commit 70ddbc9

Please sign in to comment.