diff --git a/assets/js/add-another-detail.js b/assets/js/add-another-detail.js new file mode 100644 index 00000000..355e8e44 --- /dev/null +++ b/assets/js/add-another-detail.js @@ -0,0 +1 @@ +new AddAnother($('.add-another-body-worn-camera'), '.remove-button-container') diff --git a/assets/js/add-another-evidence.js b/assets/js/add-another-evidence.js index 7723d5e8..013ffe04 100644 --- a/assets/js/add-another-evidence.js +++ b/assets/js/add-another-evidence.js @@ -1,2 +1 @@ new AddAnother($('.add-another-evidence'), '.remove-button-container') -new AddAnother($('.add-another-input'), '.remove-button-container') diff --git a/integration-tests/pages/createReport/useOfForceDetailsPage.js b/integration-tests/pages/createReport/useOfForceDetailsPage.js index 8e12ce99..d271b8d7 100644 --- a/integration-tests/pages/createReport/useOfForceDetailsPage.js +++ b/integration-tests/pages/createReport/useOfForceDetailsPage.js @@ -7,8 +7,9 @@ const useOfForceDetailsPage = () => bodyWornCamera: () => cy.get('[name="bodyWornCamera"]'), bodyWornCameraNumber: index => cy.get(`[name="bodyWornCameraNumbers[${index}][cameraNum]"]`), - addAnotherBodyWornCamera: () => cy.get('[data-qa-add-another-input = true]').click(), - removeBodyWornCamera: index => cy.get('.add-another-input .add-another__remove-button').eq(index).click(), + addAnotherBodyWornCamera: () => cy.get('[dataqa=add-another-body-worn-camera]').click(), + removeBodyWornCamera: index => + cy.get('.add-another-body-worn-camera .add-another__remove-button').eq(index).click(), personalProtectionTechniques: () => cy.get('[name="personalProtectionTechniques"]'), batonDrawn: () => cy.get('[name="batonDrawn"]'), diff --git a/server/config/forms/useOfForceDetailsForm.js b/server/config/forms/useOfForceDetailsForm.js index d3d11617..c89044c5 100644 --- a/server/config/forms/useOfForceDetailsForm.js +++ b/server/config/forms/useOfForceDetailsForm.js @@ -19,8 +19,7 @@ const completeSchema = joi.object({ bodyWornCamera: requiredOneOfMsg( 'YES', - 'NO', - 'NOT_KNOWN' + 'NO' )('Select yes if any part of the incident was captured on a body-worn camera').alter(optionalForPartialValidation), bodyWornCameraNumbers: joi diff --git a/server/views/formPages/incident/useOfForceDetails.html b/server/views/formPages/incident/useOfForceDetails.html index 1d103f7c..cef31ec0 100644 --- a/server/views/formPages/incident/useOfForceDetails.html +++ b/server/views/formPages/incident/useOfForceDetails.html @@ -32,13 +32,13 @@