Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRS-1970 -Add Release Dates dedicated link #760

Merged
merged 9 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Unit test improvements
  • Loading branch information
FaizJD030 committed Jul 22, 2024
commit 158e7321089446d50df96ccc8bd6dbe8eedfe38b
3 changes: 3 additions & 0 deletions server/routes/calculationRoutes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,9 @@ describe('Calculation routes tests', () => {
'Early removal cannot happen as release from the Detention Training Order (DTO) is later than the Conditional Release Date (CRD).',
)
expect(res.text).toContain('Calculation breakdown')
const $ = cheerio.load(res.text)
const submitToNomis = $('[data-qa=submit-to-nomis]').first()
expect(submitToNomis.attr('href')).toStrictEqual('/calculation/A1234AA/123456/approved-dates-question')
})
})

Expand Down
3 changes: 3 additions & 0 deletions server/routes/startRoutes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ describe('Start routes tests', () => {
.expect(res => {
const $ = cheerio.load(res.text)
expect($('.govuk-link').first().attr('href')).toStrictEqual('/view/GU32342/nomis-calculation-summary/123456')
expect($('[data-qa=calc-release-dates-for-adding-dates-link]').first().attr('href')).toStrictEqual(
'/calculation/A1234AA/reason?isAddDatesFlow=true',
)
})
})

Expand Down