From 0c555250ea86641afc771fb640a0e82ea07b5a55 Mon Sep 17 00:00:00 2001 From: Olusola-Opencast Date: Mon, 20 Feb 2023 15:41:54 +0000 Subject: [PATCH] CAT-1411 remove womens cats from categorylite page --- .../hmpps/cattool/specs/LiteSpecification.groovy | 10 +++++----- server/routes/liteCategories.js | 2 -- test/routes/liteCategories.test.js | 4 ++-- .../offenderServiceGetCatAInformation.test.js | 12 ++++++------ 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/integration-tests/src/test/groovy/uk/gov/justice/digital/hmpps/cattool/specs/LiteSpecification.groovy b/integration-tests/src/test/groovy/uk/gov/justice/digital/hmpps/cattool/specs/LiteSpecification.groovy index 80079982..2460b149 100644 --- a/integration-tests/src/test/groovy/uk/gov/justice/digital/hmpps/cattool/specs/LiteSpecification.groovy +++ b/integration-tests/src/test/groovy/uk/gov/justice/digital/hmpps/cattool/specs/LiteSpecification.groovy @@ -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' @@ -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' @@ -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, @@ -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' diff --git a/server/routes/liteCategories.js b/server/routes/liteCategories.js index 2749e349..87194efe 100644 --- a/server/routes/liteCategories.js +++ b/server/routes/liteCategories.js @@ -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 => { diff --git a/test/routes/liteCategories.test.js b/test/routes/liteCategories.test.js index d309b68c..30719ef4 100644 --- a/test/routes/liteCategories.test.js +++ b/test/routes/liteCategories.test.js @@ -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', @@ -148,7 +148,7 @@ describe('approve', () => { .expect('Content-Type', /html/) .expect(res => { expect(res.text).toContain('Other category approval') - expect(res.text).toContain('
Fem Closed') + expect(res.text).toContain('
Indeterminate Cat D') expect(res.text).toContain('
Governor') expect(res.text).toContain('
01/01/2020') expect(res.text).toContain('
Fred Perry') diff --git a/test/services/offenderServiceGetCatAInformation.test.js b/test/services/offenderServiceGetCatAInformation.test.js index f1e698c7..6790bdab 100644 --- a/test/services/offenderServiceGetCatAInformation.test.js +++ b/test/services/offenderServiceGetCatAInformation.test.js @@ -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, @@ -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, @@ -412,7 +412,7 @@ describe('getCatAInformation for female prison', () => { catAStartYear: '2012', catAEndYear: '2013', releaseYear: '2014', - finalCat: 'Fem Open', + finalCat: 'Open', }) }) @@ -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, }, @@ -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, }, @@ -490,7 +490,7 @@ describe('getCatAInformation for female prison', () => { catAStartYear: '2011', catAEndYear: '2012', releaseYear: null, - finalCat: 'Fem Closed', + finalCat: 'Closed', }) }) })