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

CAT-1411 remove womens cats from categorylite page #658

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class LiteSpecification extends AbstractSpecification {

when: 'Re-assessment is omitted'
form.nextReviewDate = ''
form.category = 'T'
form.category = 'D'
form.authority = 'GOV'
form.placement = 'BXI'
form.comment = 'comment text'
Expand All @@ -48,7 +48,7 @@ class LiteSpecification extends AbstractSpecification {
at LiteCategoriesPage
errorSummaries*.text() == ['Enter a valid date that is after today']
errors*.text() == ['Error:\nEnter a valid date that is after today']
form.category == 'T'
form.category == 'D'
form.authority == 'GOV'
form.placement == 'BXI'
form.comment == 'comment text'
Expand Down Expand Up @@ -187,14 +187,14 @@ class LiteSpecification extends AbstractSpecification {

when: 'details are entered'
form.approvedDate = '29/04/2020'
form.supervisorCategory = 'T'
form.supervisorCategory = 'D'
form.approvedCategoryComment = 'approvedCategoryComment'
form.approvedCommittee = 'GOV'
form.approvedPlacement = 'SYI'
form.approvedPlacementComment = 'approvedPlacementComment'
form.nextReviewDate = now.plusMonths(12).format('dd/MM/yyyy')
form.approvedComment = 'approvedComment'
elite2Api.stubSupervisorApprove([category : 'T',
elite2Api.stubSupervisorApprove([category : 'D',
"approvedCategoryComment": "approvedCategoryComment",
bookingId : 12,
"assessmentSeq" : 1,
Expand All @@ -210,7 +210,7 @@ class LiteSpecification extends AbstractSpecification {
then: 'The confirmed page is shown and details are in the database'
at LiteCategoriesConfirmedPage
def data2 = db.getLiteData(12)[0]
data2.supervisor_category == 'T'
data2.supervisor_category == 'D'
data2.approved_date.toLocalDate().equals(LocalDate.of(2020, 4, 29))
data2.approved_by == 'SUPERVISOR_USER'
data2.approved_committee == 'GOV'
Expand Down
2 changes: 0 additions & 2 deletions server/routes/liteCategories.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ const getCatList = current => [
{ value: 'V', text: 'YOI Restricted', selected: current === 'V' },
{ value: 'B', text: 'Downgrade A to B', selected: current === 'B' },
{ value: 'D', text: 'Indeterminate Cat D', selected: current === 'D' },
{ value: 'R', text: 'Fem Closed', selected: current === 'R' },
{ value: 'T', text: 'Fem Open', selected: current === 'T' },
]

const assessmentHasBeenApprovedInNomisManually = error => {
Expand Down
4 changes: 2 additions & 2 deletions test/routes/liteCategories.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ describe('approve', () => {
formService.getLiteCategorisation.mockResolvedValue({
bookingId: 12,
assessedBy: 'categoriser',
category: 'R',
category: 'D',
assessmentCommittee: 'GOV',
displayCreatedDate: '01/01/2020',
placementPrisonId: 'SYI',
Expand All @@ -148,7 +148,7 @@ describe('approve', () => {
.expect('Content-Type', /html/)
.expect(res => {
expect(res.text).toContain('Other category approval</h1>')
expect(res.text).toContain('<div id="category" class="govuk-grid-column-one-third">Fem Closed')
expect(res.text).toContain('<div id="category" class="govuk-grid-column-one-third">Indeterminate Cat D')
expect(res.text).toContain('<div id="assessmentCommittee" class="govuk-grid-column-one-third">Governor')
expect(res.text).toContain('<div id="displayCreatedDate" class="govuk-grid-column-one-third">01/01/2020')
expect(res.text).toContain('<div id="assessedBy" class="govuk-grid-column-one-third">Fred Perry')
Expand Down
12 changes: 6 additions & 6 deletions test/services/offenderServiceGetCatAInformation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ describe('getCatAInformation for female prison', () => {
bookingId: 45,
offenderNo,
classificationCode: 'R',
classification: 'Fem Closed',
classification: 'Closed',
assessmentDate: '2013-03-24',
approvalDate: '2013-03-24',
assessmentSeq: 3,
Expand All @@ -380,7 +380,7 @@ describe('getCatAInformation for female prison', () => {
bookingId: 45,
offenderNo,
classificationCode: 'T',
classification: 'Fem Open',
classification: 'Open',
assessmentDate: '2014-03-24',
approvalDate: '2014-03-24',
assessmentSeq: 4,
Expand Down Expand Up @@ -412,7 +412,7 @@ describe('getCatAInformation for female prison', () => {
catAStartYear: '2012',
catAEndYear: '2013',
releaseYear: '2014',
finalCat: 'Fem Open',
finalCat: 'Open',
})
})

Expand All @@ -422,7 +422,7 @@ describe('getCatAInformation for female prison', () => {
bookingId: 45,
offenderNo,
classificationCode: 'R',
classification: 'Fem Closed',
classification: 'Closed',
approvalDate: '2015-03-24',
assessmentSeq: 2,
},
Expand Down Expand Up @@ -464,7 +464,7 @@ describe('getCatAInformation for female prison', () => {
bookingId: 35,
offenderNo,
classificationCode: 'R',
classification: 'Fem Closed',
classification: 'Closed',
approvalDate: '2012-03-24',
assessmentSeq: 6,
},
Expand All @@ -490,7 +490,7 @@ describe('getCatAInformation for female prison', () => {
catAStartYear: '2011',
catAEndYear: '2012',
releaseYear: null,
finalCat: 'Fem Closed',
finalCat: 'Closed',
})
})
})