Skip to content

Commit

Permalink
MAP-578 added restraing and kneeling options to prisonr compliance qu…
Browse files Browse the repository at this point in the history
…estion (#669)
  • Loading branch information
GurnankCheema authored Jan 17, 2024
1 parent 8cc1c09 commit edfc061
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,40 @@ context('Submitting use of force details page', () => {
)
})

it('Compliancy of "No" and "KNEELING" is stored correctly', () => {
fillFormAndSave()
relocationAndInjuries.prisonerCompliant().check('false')
relocationAndInjuries.relocationType().check('KNEELING')
relocationAndInjuries.userSpecifiedRelocationType().should('not.be.visible')
relocationAndInjuries.clickSaveAndContinue()

cy.task('getFormSection', { bookingId: offender.bookingId, formName: 'relocationAndInjuries' }).then(
({ section }) => {
expect(section).to.deep.equal({
prisonerRelocation: 'SEGREGATION_UNIT',
relocationCompliancy: false,
relocationType: 'KNEELING',
healthcareInvolved: true,
f213CompletedBy: 'Dr Taylor',
prisonerInjuries: true,
healthcarePractionerName: 'Dr Smith',
prisonerHospitalisation: true,
staffMedicalAttention: true,
staffNeedingMedicalAttention: [
{
name: 'Eddie Thomas',
hospitalisation: true,
},
{
name: 'Jayne Eyre',
hospitalisation: true,
},
],
})
}
)
})

it('Displays validation messages', () => {
fillFormAndSave()
relocationAndInjuries.prisonerCompliant().check('false')
Expand Down
2 changes: 2 additions & 0 deletions server/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ export const RelocationType = toEnum({
FULL: { value: 'FULL', label: 'Full relocation' },
VEHICLE: { value: 'VEHICLE', label: 'Relocated to vehicle' },
NTRG: { value: 'NTRG', label: 'Handed to local staff (NTRG)' },
SEARCH_UNDER_RESTRAINT: { value: 'SEARCH_UNDER_RESTRAINT', label: 'Full search under restraint' },
KNEELING: { value: 'KNEELING', label: 'Kneeling' },
OTHER: { value: 'OTHER', label: 'Other' },
})

Expand Down

0 comments on commit edfc061

Please sign in to comment.