Skip to content

Commit

Permalink
MAP-626 Fix ITs after pain techniques reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
danbenton-mojdt committed Jan 26, 2024
1 parent b6600f4 commit 9b8984f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ context('Enter use of force details page', () => {
useOfForceDetailsPage.escortingHold().check('true')
useOfForceDetailsPage.restraintPositions.check(restraintPositions)
useOfForceDetailsPage.handcuffsApplied().check('true')
useOfForceDetailsPage.painInducingTechniques().check('true')
useOfForceDetailsPage.painInducingTechniquesUsed.check(['THUMB_LOCK', 'THROUGH_RIGID_BAR_CUFFS'])
const relocationAndInjuriesPage = useOfForceDetailsPage.save()
return relocationAndInjuriesPage
Expand All @@ -63,7 +62,6 @@ context('Enter use of force details page', () => {
personalProtectionTechniques: true,
positiveCommunication: true,
restraintPositions: ['STANDING', 'ON_BACK', 'FACE_DOWN', 'KNEELING'],
painInducingTechniques: true,
painInducingTechniquesUsed: ['THROUGH_RIGID_BAR_CUFFS', 'THUMB_LOCK'],
})
})
Expand All @@ -89,7 +87,6 @@ context('Enter use of force details page', () => {
personalProtectionTechniques: true,
positiveCommunication: true,
restraintPositions: 'STANDING',
painInducingTechniques: true,
painInducingTechniquesUsed: ['THROUGH_RIGID_BAR_CUFFS', 'THUMB_LOCK'],
})
})
Expand Down Expand Up @@ -118,7 +115,8 @@ context('Enter use of force details page', () => {
useOfForceDetailsPage.restraintPositions.kneeling().should('be.checked')
useOfForceDetailsPage.restraintPositions.onBack().should('not.be.checked')
useOfForceDetailsPage.handcuffsApplied().should('have.value', 'true')
useOfForceDetailsPage.painInducingTechniques().should('have.value', 'true')
useOfForceDetailsPage.painInducingTechniquesUsed.throughRigidBarCuffs().should('be.checked')
useOfForceDetailsPage.painInducingTechniquesUsed.thumbLock().should('be.checked')
})

it('Displays validation messages', () => {
Expand All @@ -139,9 +137,9 @@ context('Enter use of force details page', () => {
useOfForceDetailsPage.guidingHoldOfficersInvolved.check('2')
useOfForceDetailsPage.escortingHold().check('true')
useOfForceDetailsPage.handcuffsApplied().check('true')
useOfForceDetailsPage.painInducingTechniques().check('true')
useOfForceDetailsPage.clickSaveAndContinue()
useOfForceDetailsPage.errorSummary().contains('Select yes if a baton was drawn')
useOfForceDetailsPage.errorSummary().contains('Enter the body-worn camera number')
useOfForceDetailsPage.errorSummary().contains('Select if any pain inducing techniques were used')
})
})
1 change: 0 additions & 1 deletion integration-tests/integration/seedData.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const expectedPayload = {
escortingHold: true,
handcuffsApplied: true,
restraintPositions: ['STANDING', 'ON_BACK', 'FACE_DOWN', 'KNEELING'],
painInducingTechniques: true,
painInducingTechniquesUsed: ['FINAL_LOCK_FLEXION', 'THUMB_LOCK'],
positiveCommunication: true,
guidingHoldOfficersInvolved: 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const useOfForceDetailsPage = () =>

handcuffsApplied: () => cy.get('[name="handcuffsApplied"]'),

painInducingTechniques: () => cy.get('[name="painInducingTechniques"]'),
painInducingTechniquesUsed: {
check: value => cy.get('#pain-inducing-techniques [type="checkbox"]').check(value),
thumbLock: () => cy.get('#pain-inducing-techniques [type="checkbox"][value="THUMB_LOCK"]'),
Expand All @@ -47,6 +46,7 @@ const useOfForceDetailsPage = () =>
finalLockRotation: () => cy.get('#pain-inducing-techniques [type="checkbox"][value="FINAL_LOCK_ROTATION"]'),
throughRigidBarCuffs: () =>
cy.get('#pain-inducing-techniques [type="checkbox"][value="THROUGH_RIGID_BAR_CUFFS"]'),
none: () => cy.get('#pain-inducing-techniques [type="checkbox"][value="NONE"]'),
},

fillForm() {
Expand All @@ -62,7 +62,6 @@ const useOfForceDetailsPage = () =>
this.escortingHold().check('true')
this.restraintPositions.check(['STANDING', 'ON_BACK', 'FACE_DOWN', 'KNEELING'])
this.handcuffsApplied().check('true')
this.painInducingTechniques().check('true')
this.painInducingTechniquesUsed.check(['THUMB_LOCK', 'FINAL_LOCK_FLEXION'])
},

Expand Down
5 changes: 1 addition & 4 deletions integration-tests/pages/sections/reportDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const positiveCommunicationUsed = () => cy.get('[data-qa="positiveCommunication"
const handcuffsApplied = () => cy.get('[data-qa=handcuffsApplied]')
const prisonerCompliant = () => cy.get('[data-qa="compliancy"]')
const photosTaken = () => cy.get('[data-qa="photographs"]')
const painInducingTechniques = () => cy.get('[data-qa=painInducingTechniques]')
const painInducingTechniquesUsed = () => cy.get('[data-qa=painInducingTechniquesUsed]')
const reasonsForUseOfForce = () => cy.get('[data-qa="reasonsForUseOfForce"')
const primaryReasonForUseOfForce = () => cy.get('[data-qa="primaryReason"')
Expand All @@ -17,7 +16,6 @@ module.exports = {
handcuffsApplied,
prisonerCompliant,
photosTaken,
painInducingTechniques,
painInducingTechniquesUsed,
prison,
reasonsForUseOfForce,
Expand Down Expand Up @@ -68,8 +66,7 @@ module.exports = {
cy.get('[data-qa="restraintUsed"]').contains('On front (prone)')
cy.get('[data-qa="restraintUsed"]').contains('Kneeling')
handcuffsApplied().contains('Yes')
painInducingTechniques().contains('Yes')
cy.get('[data-qa="painInducingTechniques"]').contains('Yes - wrist flexion, thumb lock')
cy.get('[data-qa="painInducingTechniques"]').contains('Wrist flexion, thumb lock')

cy.get('[data-qa="prisonerRelocation"]').contains('Segregation unit')
prisonerCompliant().contains('Yes')
Expand Down

0 comments on commit 9b8984f

Please sign in to comment.