From 5b20b52435d5014b56ca6caa0e96a6ed4577f324 Mon Sep 17 00:00:00 2001 From: Martin Crawley Date: Wed, 4 Jan 2023 18:18:21 +0000 Subject: [PATCH 1/8] Modified lost-stolen journey as per requirements --- apps/common/fields/contact-details.js | 21 ++++++++++++-- apps/common/views/partials/email-address.html | 5 ++++ apps/lost-stolen/index.js | 1 + .../translations/src/en/pages.json | 2 +- apps/lost-stolen/views/contact-details.html | 29 +++++++++---------- 5 files changed, 39 insertions(+), 19 deletions(-) create mode 100644 apps/common/views/partials/email-address.html diff --git a/apps/common/fields/contact-details.js b/apps/common/fields/contact-details.js index 7ab78178..b1f45e50 100644 --- a/apps/common/fields/contact-details.js +++ b/apps/common/fields/contact-details.js @@ -8,9 +8,24 @@ module.exports = { value: '', field: 'use-address' } - }, - 'use-address': { - toggle: 'address-group' + }, + 'has-email-radio': { + mixin: 'radio-group', + validate: ['required'], + className: ['form-group'], + legend: { + className: 'visuallyhidden' + }, + options: [{ + value: 'has-email-yes', + toggle: 'email', + label: 'Email Address', + child: 'partials/email-address' + }, { + value: 'has-email-no', + toggle: 'address-group', + label: 'I don\'t have an email address' + }] }, 'contact-address-house-number': { validate: ['required'], diff --git a/apps/common/views/partials/email-address.html b/apps/common/views/partials/email-address.html new file mode 100644 index 00000000..4124cbe3 --- /dev/null +++ b/apps/common/views/partials/email-address.html @@ -0,0 +1,5 @@ +
+
+ {{#input-text}}{{toggle}}{{/input-text}} +
+
\ No newline at end of file diff --git a/apps/lost-stolen/index.js b/apps/lost-stolen/index.js index a2ceeb50..6ed09624 100644 --- a/apps/lost-stolen/index.js +++ b/apps/lost-stolen/index.js @@ -27,6 +27,7 @@ module.exports = { }, '/contact-details': { fields: [ + 'has-email-radio', 'email', 'use-address', 'contact-address-house-number', diff --git a/apps/lost-stolen/translations/src/en/pages.json b/apps/lost-stolen/translations/src/en/pages.json index b7ca8904..05a4c62d 100644 --- a/apps/lost-stolen/translations/src/en/pages.json +++ b/apps/lost-stolen/translations/src/en/pages.json @@ -2,7 +2,7 @@ "contact-details": { "header": "How should we contact you about your BRP?", "address": { - "title": "What address should we contact you at?" + "title": "If you do not have an email address, what address should we use to contact you by post?" }, "delay": "Asking to be contacted by post will add a further 2 days on to our response time. If you provide an email address we can get back to you sooner." }, diff --git a/apps/lost-stolen/views/contact-details.html b/apps/lost-stolen/views/contact-details.html index 9d7fdf86..086bba72 100644 --- a/apps/lost-stolen/views/contact-details.html +++ b/apps/lost-stolen/views/contact-details.html @@ -30,13 +30,9 @@ {{ @@ -45,8 +41,18 @@ +

{{#t}}pages.contact-details.address.title{{/t}}

+
+ + Warning + + + {{#t}}pages.contact-details.delay{{/t}} + +
+ {{#input-text}}contact-address-house-number{{/input-text}} {{#input-text}}contact-address-street{{/input-text}} @@ -57,18 +63,11 @@ {{#input-text-code}}contact-address-postcode{{/input-text-code}} -
- - Warning - - - {{#t}}pages.contact-details.delay{{/t}} - -
- {{/location.inside-uk}} + {{#input-phone}}phone{{/input-phone}} + {{#input-submit}}continue{{/input-submit}} {{/form}} @@ -77,4 +76,4 @@ {{/content}} -{{/layout}} +{{/layout}} \ No newline at end of file From 2518a5df74c447bf8298af78c8b56ce45740d4dc Mon Sep 17 00:00:00 2001 From: Martin Crawley Date: Wed, 8 Feb 2023 10:09:02 +0000 Subject: [PATCH 2/8] BRP-58 Added missing translation and dependent to email field --- apps/common/fields/contact-details.js | 4 ++-- apps/common/translations/src/en/validation.json | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/common/fields/contact-details.js b/apps/common/fields/contact-details.js index b1f45e50..b49efba5 100644 --- a/apps/common/fields/contact-details.js +++ b/apps/common/fields/contact-details.js @@ -5,8 +5,8 @@ module.exports = { validate: ['required', 'email'], type: 'email', dependent: { - value: '', - field: 'use-address' + value: 'has-email-yes', + field: 'has-email-radio' } }, 'has-email-radio': { diff --git a/apps/common/translations/src/en/validation.json b/apps/common/translations/src/en/validation.json index 691d27ba..4b22d97d 100644 --- a/apps/common/translations/src/en/validation.json +++ b/apps/common/translations/src/en/validation.json @@ -43,5 +43,8 @@ "fullname": { "required": "Enter your full name", "notUrl": "Full name must not be a URL" + }, + "has-email-radio": { + "required": "Please select an option" } } From 891cb6dda51d839106fe5de28d0e63b5f8ef5d80 Mon Sep 17 00:00:00 2001 From: Martin Crawley Date: Wed, 8 Feb 2023 12:26:46 +0000 Subject: [PATCH 3/8] BRP-58 Added missing translations --- apps/common/fields/contact-details.js | 20 +++++++++---------- apps/common/translations/src/en/fields.json | 3 +++ .../translations/src/en/validation.json | 4 ++++ apps/lost-stolen/index.js | 2 +- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/apps/common/fields/contact-details.js b/apps/common/fields/contact-details.js index b49efba5..99497b74 100644 --- a/apps/common/fields/contact-details.js +++ b/apps/common/fields/contact-details.js @@ -1,7 +1,7 @@ 'use strict'; module.exports = { - email: { + 'contact-details-email': { validate: ['required', 'email'], type: 'email', dependent: { @@ -18,7 +18,7 @@ module.exports = { }, options: [{ value: 'has-email-yes', - toggle: 'email', + toggle: 'contact-details-email', label: 'Email Address', child: 'partials/email-address' }, { @@ -31,24 +31,24 @@ module.exports = { validate: ['required'], label: 'fields.address-house-number.label', dependent: { - value: 'true', - field: 'use-address' + value: 'has-email-no', + field: 'has-email-radio' } }, 'contact-address-street': { validate: ['required'], label: 'fields.address-street.label', dependent: { - value: 'true', - field: 'use-address' + value: 'has-email-no', + field: 'has-email-radio' } }, 'contact-address-town': { validate: ['required'], label: 'fields.address-town.label', dependent: { - value: 'true', - field: 'use-address' + value: 'has-email-no', + field: 'has-email-radio' } }, 'contact-address-county': { @@ -58,8 +58,8 @@ module.exports = { validate: ['required'], label: 'fields.address-postcode.label', dependent: { - value: 'true', - field: 'use-address' + value: 'has-email-no', + field: 'has-email-radio' } } }; diff --git a/apps/common/translations/src/en/fields.json b/apps/common/translations/src/en/fields.json index 9f0506bb..0ebbbf88 100644 --- a/apps/common/translations/src/en/fields.json +++ b/apps/common/translations/src/en/fields.json @@ -52,5 +52,8 @@ "label": "Support organisation" } } + }, + "contact-details-email": { + "label": "Email Address" } } diff --git a/apps/common/translations/src/en/validation.json b/apps/common/translations/src/en/validation.json index 4b22d97d..694b89a0 100644 --- a/apps/common/translations/src/en/validation.json +++ b/apps/common/translations/src/en/validation.json @@ -46,5 +46,9 @@ }, "has-email-radio": { "required": "Please select an option" + }, + "contact-details-email": { + "required": "An email address is required", + "email": "Enter the email in the correct format for example, name@domain.com" } } diff --git a/apps/lost-stolen/index.js b/apps/lost-stolen/index.js index 6ed09624..cc90d407 100644 --- a/apps/lost-stolen/index.js +++ b/apps/lost-stolen/index.js @@ -28,7 +28,7 @@ module.exports = { '/contact-details': { fields: [ 'has-email-radio', - 'email', + 'contact-details-email', 'use-address', 'contact-address-house-number', 'contact-address-street', From cb3d88989fd2d0aaa3f6e975ea5d9d4b159dbd21 Mon Sep 17 00:00:00 2001 From: Martin Crawley Date: Wed, 8 Feb 2023 13:40:23 +0000 Subject: [PATCH 4/8] BRP-58 Fixed acceptance tests --- apps/collection/index.js | 4 +-- .../collection/translations/src/en/pages.json | 2 +- apps/collection/views/contact-details.html | 30 +++++++++---------- apps/correct-mistakes/index.js | 4 +-- .../translations/src/en/pages.json | 2 +- .../views/contact-details.html | 26 ++++++++-------- apps/not-arrived/index.js | 3 +- .../translations/src/en/pages.json | 2 +- apps/not-arrived/views/contact-details.html | 26 ++++++++-------- apps/someone-else/index.js | 3 +- .../translations/src/en/pages.json | 2 +- apps/someone-else/views/contact-details.html | 26 ++++++++-------- test/_features/brp/collection_form.feature | 18 ++++++----- test/_features/brp/correct_mistakes.feature | 9 ++++-- test/_features/brp/lost_stolen.feature | 9 ++++-- test/_features/brp/not_arrived.feature | 9 ++++-- test/_features/brp/someone_else.feature | 9 ++++-- 17 files changed, 97 insertions(+), 87 deletions(-) diff --git a/apps/collection/index.js b/apps/collection/index.js index 320f2869..863f8b29 100644 --- a/apps/collection/index.js +++ b/apps/collection/index.js @@ -60,8 +60,8 @@ module.exports = { }, '/contact-details': { fields: [ - 'email', - 'use-address', + 'has-email-radio', + 'contact-details-email', 'contact-address-house-number', 'contact-address-street', 'contact-address-town', diff --git a/apps/collection/translations/src/en/pages.json b/apps/collection/translations/src/en/pages.json index 4d563111..02001ba3 100644 --- a/apps/collection/translations/src/en/pages.json +++ b/apps/collection/translations/src/en/pages.json @@ -14,7 +14,7 @@ "contact-details": { "header": "How should we contact you about your BRP?", "address": { - "title": "What address should we use to contact you by post?" + "title": "If you do not have an email address, what address should we use to contact you by post?" }, "delay": "Asking to be contacted by post will add a further 2 days on to our response time. If you provide an email address we can get back to you sooner." }, diff --git a/apps/collection/views/contact-details.html b/apps/collection/views/contact-details.html index 6622494a..cea6938d 100644 --- a/apps/collection/views/contact-details.html +++ b/apps/collection/views/contact-details.html @@ -30,13 +30,9 @@ {{ @@ -46,6 +42,15 @@

{{#t}}pages.contact-details.address.title{{/t}}

+
+ + Warning + + + {{#t}}pages.contact-details.delay{{/t}} + +
+ {{#input-text}}contact-address-house-number{{/input-text}} {{#input-text}}contact-address-street{{/input-text}} @@ -56,17 +61,10 @@ {{#input-text-code}}contact-address-postcode{{/input-text-code}} -
- - Warning - - - {{#t}}pages.contact-details.delay{{/t}} - -
- + {{#input-phone}}phone{{/input-phone}} + {{#input-submit}}continue{{/input-submit}} {{/form}} diff --git a/apps/correct-mistakes/index.js b/apps/correct-mistakes/index.js index e0e06696..ee0e22f8 100644 --- a/apps/correct-mistakes/index.js +++ b/apps/correct-mistakes/index.js @@ -118,8 +118,8 @@ module.exports = { }, '/contact-details': { fields: [ - 'email', - 'use-address', + 'has-email-radio', + 'contact-details-email', 'contact-address-house-number', 'contact-address-street', 'contact-address-town', diff --git a/apps/correct-mistakes/translations/src/en/pages.json b/apps/correct-mistakes/translations/src/en/pages.json index 05a61448..a8a6abfc 100644 --- a/apps/correct-mistakes/translations/src/en/pages.json +++ b/apps/correct-mistakes/translations/src/en/pages.json @@ -6,7 +6,7 @@ "contact-details": { "header": "How should we contact you about your BRP?", "address": { - "title": "What address should we use to contact you by post?" + "title": "If you do not have an email address, what address should we use to contact you by post?" }, "delay": "Asking to be contacted by post will add a further 2 days on to our response time. If you provide an email address we can get back to you sooner." }, diff --git a/apps/correct-mistakes/views/contact-details.html b/apps/correct-mistakes/views/contact-details.html index a12d5783..c5adee37 100644 --- a/apps/correct-mistakes/views/contact-details.html +++ b/apps/correct-mistakes/views/contact-details.html @@ -31,11 +31,7 @@ {{$form}} - {{#input-text}}email{{/input-text}} - - {{#input-phone}}phone{{/input-phone}} - - {{#checkbox}}use-address{{/checkbox}} + {{#radio-group}}has-email-radio{{/radio-group}}
@@ -46,6 +42,15 @@

{{#t}}pages.contact-details.address.title{{/t}}

+
+ + Warning + + + {{#t}}pages.contact-details.delay{{/t}} + +
+ {{#input-text}}contact-address-house-number{{/input-text}} {{#input-text}}contact-address-street{{/input-text}} @@ -56,17 +61,10 @@ {{#input-text-code}}contact-address-postcode{{/input-text-code}} -
- - Warning - - - {{#t}}pages.contact-details.delay{{/t}} - -
-
+ {{#input-phone}}phone{{/input-phone}} + {{#input-submit}}continue{{/input-submit}} {{/form}} diff --git a/apps/not-arrived/index.js b/apps/not-arrived/index.js index f9ae7884..fbce2955 100644 --- a/apps/not-arrived/index.js +++ b/apps/not-arrived/index.js @@ -77,7 +77,8 @@ module.exports = { }, '/contact-details': { fields: [ - 'email', + 'has-email-radio', + 'contact-details-email', 'use-address', 'contact-address-house-number', 'contact-address-street', diff --git a/apps/not-arrived/translations/src/en/pages.json b/apps/not-arrived/translations/src/en/pages.json index 7fa3a60d..c67baebc 100644 --- a/apps/not-arrived/translations/src/en/pages.json +++ b/apps/not-arrived/translations/src/en/pages.json @@ -45,7 +45,7 @@ "contact-details": { "header": "How should we contact you about your BRP?", "address": { - "title": "Tell us your address so that we can contact you by post." + "title": "If you do not have an email address, what address should we use to contact you by post?" }, "delay": "Asking to be contacted by post will add a further 2 days on to our response time. If you provide an email address we can get back to you sooner." }, diff --git a/apps/not-arrived/views/contact-details.html b/apps/not-arrived/views/contact-details.html index 29545ded..fd479ade 100644 --- a/apps/not-arrived/views/contact-details.html +++ b/apps/not-arrived/views/contact-details.html @@ -31,11 +31,7 @@ {{$form}} - {{#input-text}}email{{/input-text}} - - {{#input-phone}}phone{{/input-phone}} - - {{#checkbox}}use-address{{/checkbox}} + {{#radio-group}}has-email-radio{{/radio-group}}
@@ -46,6 +42,15 @@

{{#t}}pages.contact-details.address.title{{/t}}

+
+ + Warning + + + {{#t}}pages.contact-details.delay{{/t}} + +
+ {{#input-text}}contact-address-house-number{{/input-text}} {{#input-text}}contact-address-street{{/input-text}} @@ -56,17 +61,10 @@ {{#input-text-code}}contact-address-postcode{{/input-text-code}} -
- - Warning - - - {{#t}}pages.contact-details.delay{{/t}} - -
-
+ {{#input-phone}}phone{{/input-phone}} + {{#input-submit}}continue{{/input-submit}} {{/form}} diff --git a/apps/someone-else/index.js b/apps/someone-else/index.js index 57603ea6..10a500f1 100644 --- a/apps/someone-else/index.js +++ b/apps/someone-else/index.js @@ -35,7 +35,8 @@ module.exports = { }, '/contact-details': { fields: [ - 'email', + 'has-email-radio', + 'contact-details-email', 'use-address', 'contact-address-house-number', 'contact-address-street', diff --git a/apps/someone-else/translations/src/en/pages.json b/apps/someone-else/translations/src/en/pages.json index 28be9825..dddcafc4 100644 --- a/apps/someone-else/translations/src/en/pages.json +++ b/apps/someone-else/translations/src/en/pages.json @@ -20,7 +20,7 @@ "contact-details": { "header": "How should we contact you about your BRP?", "address": { - "title": "What address should we use to contact you by post?" + "title": "If you do not have an email address, what address should we use to contact you by post?" }, "delay": "Asking to be contacted by post will add a further 2 days on to our response time. If you provide an email address we can get back to you sooner." }, diff --git a/apps/someone-else/views/contact-details.html b/apps/someone-else/views/contact-details.html index 410d4fa2..2f720f1b 100644 --- a/apps/someone-else/views/contact-details.html +++ b/apps/someone-else/views/contact-details.html @@ -31,11 +31,7 @@ {{$form}} - {{#input-text}}email{{/input-text}} - - {{#input-phone}}phone{{/input-phone}} - - {{#checkbox}}use-address{{/checkbox}} + {{#radio-group}}has-email-radio{{/radio-group}}
@@ -46,6 +42,15 @@

{{#t}}pages.contact-details.address.title{{/t}}

+
+ + Warning + + + {{#t}}pages.contact-details.delay{{/t}} + +
+ {{#input-text}}contact-address-house-number{{/input-text}} {{#input-text}}contact-address-street{{/input-text}} @@ -56,17 +61,10 @@ {{#input-text-code}}contact-address-postcode{{/input-text-code}} -
- - Warning - - - {{#t}}pages.contact-details.delay{{/t}} - -
-
+ {{#input-phone}}phone{{/input-phone}} + {{#input-submit}}continue{{/input-submit}} {{/form}} diff --git a/test/_features/brp/collection_form.feature b/test/_features/brp/collection_form.feature index b777e446..b9364db0 100644 --- a/test/_features/brp/collection_form.feature +++ b/test/_features/brp/collection_form.feature @@ -19,7 +19,8 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I fill 'email' with 'test@test.test' + Then I check 'has-email-radio-has-email-yes' + Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -41,7 +42,7 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'use-address' + Then I check 'has-email-radio-has-email-no' Then I fill 'contact-address-house-number' with '17' Then I fill 'contact-address-street' with 'test avenue' Then I fill 'contact-address-town' with 'Rotherham' @@ -69,7 +70,7 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'use-address' + Then I check 'has-email-radio-has-email-no' Then I fill 'contact-address-house-number' with '17' Then I fill 'contact-address-street' with 'test avenue' Then I fill 'contact-address-town' with 'Rotherham' @@ -97,7 +98,8 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I fill 'email' with 'test@test.test' + Then I check 'has-email-radio-has-email-yes' + Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -118,7 +120,7 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'use-address' + Then I check 'has-email-radio-has-email-no' Then I fill 'contact-address-house-number' with '17' Then I fill 'contact-address-street' with 'test avenue' Then I fill 'contact-address-town' with 'Rotherham' @@ -145,7 +147,8 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I fill 'email' with 'test@test.test' + Then I check 'has-email-radio-has-email-yes' + Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -167,7 +170,8 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I fill 'email' with 'test@test.test' + Then I check 'has-email-radio-has-email-yes' + Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' diff --git a/test/_features/brp/correct_mistakes.feature b/test/_features/brp/correct_mistakes.feature index e8af6702..b7dd6a27 100644 --- a/test/_features/brp/correct_mistakes.feature +++ b/test/_features/brp/correct_mistakes.feature @@ -21,7 +21,8 @@ Feature: A user should access the correct mistakes service and be able to log an Then I fill 'brp-card' with 'XR1000123' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I fill 'email' with 'test@dtest.testemail' + Then I check 'has-email-radio-has-email-yes' + Then I fill 'contact-details-email' with 'test@dtest.testemail' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -50,7 +51,8 @@ Feature: A user should access the correct mistakes service and be able to log an Then I fill 'brp-card' with 'ZRX000123' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I fill 'email' with 'christopher.medland@digital.homeoffice.gov.uk' + Then I check 'has-email-radio-has-email-yes' + Then I fill 'contact-details-email' with 'christopher.medland@digital.homeoffice.gov.uk' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -159,7 +161,8 @@ Feature: A user should access the correct mistakes service and be able to log an Then I fill 'brp-card' with 'XR1000123' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I fill 'email' with 'test@dtest.testemail' + Then I check 'has-email-radio-has-email-yes' + Then I fill 'contact-details-email' with 'test@dtest.testemail' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' Then I check 'org-help-yes' diff --git a/test/_features/brp/lost_stolen.feature b/test/_features/brp/lost_stolen.feature index 27efd09e..b6e6d98c 100644 --- a/test/_features/brp/lost_stolen.feature +++ b/test/_features/brp/lost_stolen.feature @@ -16,7 +16,8 @@ Feature: A user should be able to log a lost or stolen BRP Then I fill 'brp-card' with 'ZRX000123' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you to tell you what to do next?' - Then I fill 'email' with 'test@dtest.testemail' + Then I check 'has-email-radio-has-email-yes' + Then I fill 'contact-details-email' with 'test@dtest.testemail' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -36,7 +37,8 @@ Feature: A user should be able to log a lost or stolen BRP Then I fill 'brp-card' with 'ZRX000123' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you to tell you what to do next?' - Then I fill 'email' with 'test@dtest.testemail' + Then I check 'has-email-radio-has-email-yes' + Then I fill 'contact-details-email' with 'test@dtest.testemail' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -71,7 +73,8 @@ Feature: A user should be able to log a lost or stolen BRP Then I fill 'brp-card' with 'ZRX000123' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you to tell you what to do next?' - Then I fill 'email' with 'test@dtest.testemail' + Then I check 'has-email-radio-has-email-yes' + Then I fill 'contact-details-email' with 'test@dtest.testemail' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' Then I check 'org-help-yes' diff --git a/test/_features/brp/not_arrived.feature b/test/_features/brp/not_arrived.feature index c26cfe01..0e78773a 100644 --- a/test/_features/brp/not_arrived.feature +++ b/test/_features/brp/not_arrived.feature @@ -45,7 +45,8 @@ Feature: I should be able to log that my BRP has not arrived Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I fill 'email' with 'test@test.test' + Then I check 'has-email-radio-has-email-yes' + Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -78,7 +79,8 @@ Feature: I should be able to log that my BRP has not arrived Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I fill 'email' with 'test@test.test' + Then I check 'has-email-radio-has-email-yes' + Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' Then I should see 'Delivery details' on the page @@ -135,7 +137,8 @@ Feature: I should be able to log that my BRP has not arrived Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I fill 'email' with 'test@test.test' + Then I check 'has-email-radio-has-email-yes' + Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' diff --git a/test/_features/brp/someone_else.feature b/test/_features/brp/someone_else.feature index 9ee7161e..7a0d36b7 100644 --- a/test/_features/brp/someone_else.feature +++ b/test/_features/brp/someone_else.feature @@ -21,7 +21,8 @@ Feature: I want someone else to collect my BRP Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I fill 'email' with 'test@test.test' + Then I check 'has-email-radio-has-email-yes' + Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' Then I should see 'Details of person nominated to collect BRP' on the page @@ -47,7 +48,8 @@ Feature: I want someone else to collect my BRP Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I fill 'email' with 'test@test.test' + Then I check 'has-email-radio-has-email-yes' + Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' Then I should see 'Details of person nominated to collect BRP' on the page @@ -127,7 +129,8 @@ Feature: I want someone else to collect my BRP Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I fill 'email' with 'test@test.test' + Then I check 'has-email-radio-has-email-yes' + Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' Then I should see 'Details of person nominated to collect BRP' on the page From 49d887fa5a854592a54a8d98c1c7e75178381b26 Mon Sep 17 00:00:00 2001 From: Martin Crawley Date: Wed, 8 Feb 2023 15:40:20 +0000 Subject: [PATCH 5/8] BRP-58 Fixed missing details on confirm page --- apps/collection/fields/index.js | 6 +----- apps/collection/views/confirm.html | 10 +++++----- apps/common/fields/contact-details.js | 14 +++++++------- apps/correct-mistakes/views/confirm.html | 6 +++--- apps/lost-stolen/views/confirm.html | 10 +++++----- apps/not-arrived/views/confirm.html | 10 +++++----- apps/someone-else/views/confirm.html | 10 +++++----- test/_features/brp/collection_form.feature | 14 +++++++------- test/_features/brp/correct_mistakes.feature | 6 +++--- test/_features/brp/lost_stolen.feature | 6 +++--- test/_features/brp/not_arrived.feature | 6 +++--- test/_features/brp/someone_else.feature | 6 +++--- 12 files changed, 50 insertions(+), 54 deletions(-) diff --git a/apps/collection/fields/index.js b/apps/collection/fields/index.js index f1d60a5e..e419e23c 100644 --- a/apps/collection/fields/index.js +++ b/apps/collection/fields/index.js @@ -97,10 +97,6 @@ module.exports = { label: 'fields.phone.label' }, 'contact-address-county': { - label: 'fields.address-county.label', - dependent: { - value: 'true', - field: 'use-address' - } + label: 'fields.address-county.label' } }; diff --git a/apps/collection/views/confirm.html b/apps/collection/views/confirm.html index 0ad65b2e..cfcf9505 100644 --- a/apps/collection/views/confirm.html +++ b/apps/collection/views/confirm.html @@ -145,7 +145,7 @@

{{#t}}journeys.collection.pages.check-details.tables. {{#t}}buttons.change.nationality{{/t}} {{/values.nationality}} - {{#values.use-address}} + {{^values.contact-details-email}} {{#values.contact-address-street}} {{#t}}pages.check-details.table.headers.contact-address{{/t}} @@ -158,7 +158,7 @@

{{#t}}journeys.collection.pages.check-details.tables. {{#t}}buttons.change.address{{/t}} {{/values.contact-address-street}} - {{/values.use-address}} + {{/values.contact-details-email}} {{#values.passport}} {{#t}}pages.check-details.table.headers.passport{{/t}} @@ -166,13 +166,13 @@

{{#t}}journeys.collection.pages.check-details.tables. {{#t}}buttons.change.passport{{/t}} {{/values.passport}} - {{#values.email}} + {{#values.contact-details-email}} {{#t}}pages.check-details.table.headers.email{{/t}} - {{values.email}} + {{values.contact-details-email}} {{#t}}buttons.change.email{{/t}} - {{/values.email}} + {{/values.contact-details-email}} {{#values.phone}} {{#t}}pages.check-details.table.headers.phone{{/t}} diff --git a/apps/common/fields/contact-details.js b/apps/common/fields/contact-details.js index 99497b74..6dc3671d 100644 --- a/apps/common/fields/contact-details.js +++ b/apps/common/fields/contact-details.js @@ -5,7 +5,7 @@ module.exports = { validate: ['required', 'email'], type: 'email', dependent: { - value: 'has-email-yes', + value: 'true', field: 'has-email-radio' } }, @@ -17,12 +17,12 @@ module.exports = { className: 'visuallyhidden' }, options: [{ - value: 'has-email-yes', + value: 'true', toggle: 'contact-details-email', label: 'Email Address', child: 'partials/email-address' }, { - value: 'has-email-no', + value: 'false', toggle: 'address-group', label: 'I don\'t have an email address' }] @@ -31,7 +31,7 @@ module.exports = { validate: ['required'], label: 'fields.address-house-number.label', dependent: { - value: 'has-email-no', + value: 'false', field: 'has-email-radio' } }, @@ -39,7 +39,7 @@ module.exports = { validate: ['required'], label: 'fields.address-street.label', dependent: { - value: 'has-email-no', + value: 'false', field: 'has-email-radio' } }, @@ -47,7 +47,7 @@ module.exports = { validate: ['required'], label: 'fields.address-town.label', dependent: { - value: 'has-email-no', + value: 'false', field: 'has-email-radio' } }, @@ -58,7 +58,7 @@ module.exports = { validate: ['required'], label: 'fields.address-postcode.label', dependent: { - value: 'has-email-no', + value: 'false', field: 'has-email-radio' } } diff --git a/apps/correct-mistakes/views/confirm.html b/apps/correct-mistakes/views/confirm.html index 69a1866e..a0c2ac9a 100644 --- a/apps/correct-mistakes/views/confirm.html +++ b/apps/correct-mistakes/views/confirm.html @@ -267,13 +267,13 @@

{{#t}}pages.check-details-error.personal-details-tabl {{#t}}buttons.change.brp-card{{/t}} {{/values.brp-card}} - {{#values.email}} + {{#values.contact-details-email}} {{#t}}pages.check-details-error.personal-details-table.headers.email{{/t}} - {{values.email}} + {{values.contact-details-email}} {{#t}}buttons.change.email{{/t}} - {{/values.email}} + {{/values.contact-details-email}} {{#values.phone}} {{#t}}pages.check-details.table.headers.phone{{/t}} diff --git a/apps/lost-stolen/views/confirm.html b/apps/lost-stolen/views/confirm.html index 3b7bc0b7..7c57ed0f 100644 --- a/apps/lost-stolen/views/confirm.html +++ b/apps/lost-stolen/views/confirm.html @@ -53,7 +53,7 @@ {{values.nationality}} {{#t}}buttons.change.nationality{{/t}} - {{#values.use-address}} + {{^values.contact-details-email}} {{#values.contact-address-street}} {{#t}}pages.check-details.table.headers.contact-address{{/t}} @@ -66,7 +66,7 @@ {{#t}}buttons.change.address{{/t}} {{/values.contact-address-street}} - {{/values.use-address}} + {{/values.contact-details-email}} {{#values.brp-card}} {{#t}}pages.check-details.table.headers.brp-card-number{{/t}} @@ -74,13 +74,13 @@ {{#t}}buttons.change.brp-card{{/t}} {{/values.brp-card}} - {{#values.email}} + {{#values.contact-details-email}} {{#t}}pages.check-details.table.headers.email{{/t}} - {{values.email}} + {{values.contact-details-email}} {{#t}}buttons.change.email{{/t}} - {{/values.email}} + {{/values.contact-details-email}} {{#values.phone}} {{#t}}pages.check-details.table.headers.phone{{/t}} diff --git a/apps/not-arrived/views/confirm.html b/apps/not-arrived/views/confirm.html index 457c036f..e2f63ad7 100644 --- a/apps/not-arrived/views/confirm.html +++ b/apps/not-arrived/views/confirm.html @@ -106,7 +106,7 @@

{{#t}}pages.check-details.table.head.personal-details {{values.nationality}} {{#t}}buttons.change.nationality{{/t}} - {{#values.use-address}} + {{^values.contact-details-email}} {{#values.contact-address-street}} {{#t}}pages.check-details.table.headers.contact-address{{/t}} @@ -119,7 +119,7 @@

{{#t}}pages.check-details.table.head.personal-details {{#t}}buttons.change.address{{/t}} {{/values.contact-address-street}} - {{/values.use-address}} + {{/values.contact-details-email}} {{#values.passport}} {{#t}}pages.check-details.table.headers.passport{{/t}} @@ -127,13 +127,13 @@

{{#t}}pages.check-details.table.head.personal-details {{#t}}buttons.change.passport{{/t}} {{/values.passport}} - {{#values.email}} + {{#values.contact-details-email}} {{#t}}pages.check-details.table.headers.email{{/t}} - {{values.email}} + {{values.contact-details-email}} {{#t}}buttons.change.email{{/t}} - {{/values.email}} + {{/values.contact-details-email}} {{#values.phone}} {{#t}}pages.check-details.table.headers.phone{{/t}} diff --git a/apps/someone-else/views/confirm.html b/apps/someone-else/views/confirm.html index c62fdb03..4e6664a7 100644 --- a/apps/someone-else/views/confirm.html +++ b/apps/someone-else/views/confirm.html @@ -111,7 +111,7 @@

{{#t}}pages.someone-else-check-details.tables.persona {{#t}}buttons.change.nationality{{/t}} {{/values.nationality}} - {{#values.use-address}} + {{^values.contact-details-email}} {{#values.contact-address-street}} {{#t}}pages.check-details.table.headers.contact-address{{/t}} @@ -124,7 +124,7 @@

{{#t}}pages.someone-else-check-details.tables.persona {{#t}}buttons.change.address{{/t}} {{/values.contact-address-street}} - {{/values.use-address}} + {{/values.contact-details-email}} {{#values.passport}} {{#t}}pages.check-details.table.headers.passport{{/t}} @@ -132,13 +132,13 @@

{{#t}}pages.someone-else-check-details.tables.persona {{#t}}buttons.change.passport{{/t}} {{/values.passport}} - {{#values.email}} + {{#values.contact-details-email}} {{#t}}pages.check-details.table.headers.email{{/t}} - {{values.email}} + {{values.contact-details-email}} {{#t}}buttons.change.email{{/t}} - {{/values.email}} + {{/values.contact-details-email}} {{#values.phone}} {{#t}}pages.check-details.table.headers.phone{{/t}} diff --git a/test/_features/brp/collection_form.feature b/test/_features/brp/collection_form.feature index b9364db0..43fc9d61 100644 --- a/test/_features/brp/collection_form.feature +++ b/test/_features/brp/collection_form.feature @@ -19,7 +19,7 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'has-email-radio-has-email-yes' + Then I check 'has-email-radio-true' Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -42,7 +42,7 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'has-email-radio-has-email-no' + Then I check 'has-email-radio-false' Then I fill 'contact-address-house-number' with '17' Then I fill 'contact-address-street' with 'test avenue' Then I fill 'contact-address-town' with 'Rotherham' @@ -70,7 +70,7 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'has-email-radio-has-email-no' + Then I check 'has-email-radio-false' Then I fill 'contact-address-house-number' with '17' Then I fill 'contact-address-street' with 'test avenue' Then I fill 'contact-address-town' with 'Rotherham' @@ -98,7 +98,7 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'has-email-radio-has-email-yes' + Then I check 'has-email-radio-true' Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -120,7 +120,7 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'has-email-radio-has-email-no' + Then I check 'has-email-radio-false' Then I fill 'contact-address-house-number' with '17' Then I fill 'contact-address-street' with 'test avenue' Then I fill 'contact-address-town' with 'Rotherham' @@ -147,7 +147,7 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'has-email-radio-has-email-yes' + Then I check 'has-email-radio-true' Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -170,7 +170,7 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'has-email-radio-has-email-yes' + Then I check 'has-email-radio-true' Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' diff --git a/test/_features/brp/correct_mistakes.feature b/test/_features/brp/correct_mistakes.feature index b7dd6a27..1b464ab7 100644 --- a/test/_features/brp/correct_mistakes.feature +++ b/test/_features/brp/correct_mistakes.feature @@ -21,7 +21,7 @@ Feature: A user should access the correct mistakes service and be able to log an Then I fill 'brp-card' with 'XR1000123' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'has-email-radio-has-email-yes' + Then I check 'has-email-radio-true' Then I fill 'contact-details-email' with 'test@dtest.testemail' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -51,7 +51,7 @@ Feature: A user should access the correct mistakes service and be able to log an Then I fill 'brp-card' with 'ZRX000123' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'has-email-radio-has-email-yes' + Then I check 'has-email-radio-true' Then I fill 'contact-details-email' with 'christopher.medland@digital.homeoffice.gov.uk' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -161,7 +161,7 @@ Feature: A user should access the correct mistakes service and be able to log an Then I fill 'brp-card' with 'XR1000123' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'has-email-radio-has-email-yes' + Then I check 'has-email-radio-true' Then I fill 'contact-details-email' with 'test@dtest.testemail' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' diff --git a/test/_features/brp/lost_stolen.feature b/test/_features/brp/lost_stolen.feature index b6e6d98c..530d358e 100644 --- a/test/_features/brp/lost_stolen.feature +++ b/test/_features/brp/lost_stolen.feature @@ -16,7 +16,7 @@ Feature: A user should be able to log a lost or stolen BRP Then I fill 'brp-card' with 'ZRX000123' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you to tell you what to do next?' - Then I check 'has-email-radio-has-email-yes' + Then I check 'has-email-radio-true' Then I fill 'contact-details-email' with 'test@dtest.testemail' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -37,7 +37,7 @@ Feature: A user should be able to log a lost or stolen BRP Then I fill 'brp-card' with 'ZRX000123' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you to tell you what to do next?' - Then I check 'has-email-radio-has-email-yes' + Then I check 'has-email-radio-true' Then I fill 'contact-details-email' with 'test@dtest.testemail' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -73,7 +73,7 @@ Feature: A user should be able to log a lost or stolen BRP Then I fill 'brp-card' with 'ZRX000123' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you to tell you what to do next?' - Then I check 'has-email-radio-has-email-yes' + Then I check 'has-email-radio-true' Then I fill 'contact-details-email' with 'test@dtest.testemail' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' diff --git a/test/_features/brp/not_arrived.feature b/test/_features/brp/not_arrived.feature index 0e78773a..3e462026 100644 --- a/test/_features/brp/not_arrived.feature +++ b/test/_features/brp/not_arrived.feature @@ -45,7 +45,7 @@ Feature: I should be able to log that my BRP has not arrived Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'has-email-radio-has-email-yes' + Then I check 'has-email-radio-true' Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -79,7 +79,7 @@ Feature: I should be able to log that my BRP has not arrived Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'has-email-radio-has-email-yes' + Then I check 'has-email-radio-true' Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -137,7 +137,7 @@ Feature: I should be able to log that my BRP has not arrived Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'has-email-radio-has-email-yes' + Then I check 'has-email-radio-true' Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' diff --git a/test/_features/brp/someone_else.feature b/test/_features/brp/someone_else.feature index 7a0d36b7..6f9ddb96 100644 --- a/test/_features/brp/someone_else.feature +++ b/test/_features/brp/someone_else.feature @@ -21,7 +21,7 @@ Feature: I want someone else to collect my BRP Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'has-email-radio-has-email-yes' + Then I check 'has-email-radio-true' Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -48,7 +48,7 @@ Feature: I want someone else to collect my BRP Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'has-email-radio-has-email-yes' + Then I check 'has-email-radio-true' Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' @@ -129,7 +129,7 @@ Feature: I want someone else to collect my BRP Then I fill 'passport' with '1234JA2345' Then I select 'Continue' Then I should be on the 'contact-details' page showing 'How should we contact you about your BRP?' - Then I check 'has-email-radio-has-email-yes' + Then I check 'has-email-radio-true' Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' From 34256050fc22436a25c0e2b46f1856820bc165be Mon Sep 17 00:00:00 2001 From: Martin Crawley Date: Wed, 8 Feb 2023 16:13:52 +0000 Subject: [PATCH 6/8] BRP-58 Expanded acceptance tests --- test/_features/brp/collection_form.feature | 8 +++++++- test/_features/brp/correct_mistakes.feature | 2 ++ test/_features/brp/lost_stolen.feature | 2 ++ test/_features/brp/not_arrived.feature | 2 ++ test/_features/brp/someone_else.feature | 2 ++ 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/test/_features/brp/collection_form.feature b/test/_features/brp/collection_form.feature index 43fc9d61..e945d27a 100644 --- a/test/_features/brp/collection_form.feature +++ b/test/_features/brp/collection_form.feature @@ -23,6 +23,7 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' + And I should see 'test@test.test' on the page @unprovenIdentity Scenario: collection application to be contacted via post @@ -51,6 +52,7 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'phone' with '071234567890' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' + And I should see 'RH17 5BE' on the page @lostPassport Scenario: collection application to be contacted via post @@ -79,6 +81,7 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'phone' with '071234567890' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' + And I should see 'RH17 5BE' on the page @lostPassport Scenario: collection application to be contacted via email @@ -102,6 +105,7 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' + And I should see 'test@test.test' on the page @noBrp Scenario: collection application to be contacted via post @@ -129,6 +133,7 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'phone' with '071234567890' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' + And I should see 'RH17 5BE' on the page @noBrp Scenario: collection application to be contacted via email @@ -151,7 +156,7 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' - + And I should see 'test@test.test' on the page @noBrp Scenario: collection application to be contacted via email @@ -174,6 +179,7 @@ Feature: A user should access the collection problem service and be able to log Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' + And I should see 'test@test.test' on the page @validation Scenario: Collection application Personal Details not a URL validation diff --git a/test/_features/brp/correct_mistakes.feature b/test/_features/brp/correct_mistakes.feature index 1b464ab7..fd60a916 100644 --- a/test/_features/brp/correct_mistakes.feature +++ b/test/_features/brp/correct_mistakes.feature @@ -25,6 +25,7 @@ Feature: A user should access the correct mistakes service and be able to log an Then I fill 'contact-details-email' with 'test@dtest.testemail' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' + And I should see 'test@dtest.testemail' on the page @out_uk Scenario: correct mistakes on brp form outside the uk @@ -55,6 +56,7 @@ Feature: A user should access the correct mistakes service and be able to log an Then I fill 'contact-details-email' with 'christopher.medland@digital.homeoffice.gov.uk' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' + And I should see 'christopher.medland@digital.homeoffice.gov.uk' on the page @validation Scenario: validation of about-error page diff --git a/test/_features/brp/lost_stolen.feature b/test/_features/brp/lost_stolen.feature index 530d358e..ef7d88a2 100644 --- a/test/_features/brp/lost_stolen.feature +++ b/test/_features/brp/lost_stolen.feature @@ -20,6 +20,7 @@ Feature: A user should be able to log a lost or stolen BRP Then I fill 'contact-details-email' with 'test@dtest.testemail' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' + And I should see 'test@dtest.testemail' on the page Scenario: Lost brp outside the UK Given I start the 'lost-stolen' application journey @@ -41,6 +42,7 @@ Feature: A user should be able to log a lost or stolen BRP Then I fill 'contact-details-email' with 'test@dtest.testemail' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' + And I should see 'test@dtest.testemail' on the page @validation Scenario: Lost or Stolen application Personal Details not a URL validation diff --git a/test/_features/brp/not_arrived.feature b/test/_features/brp/not_arrived.feature index 3e462026..1a20fb47 100644 --- a/test/_features/brp/not_arrived.feature +++ b/test/_features/brp/not_arrived.feature @@ -49,6 +49,7 @@ Feature: I should be able to log that my BRP has not arrived Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' + And I should see 'test@test.test' on the page Scenario: BRP resent to different address Given I start the 'not-arrived' application journey @@ -141,6 +142,7 @@ Feature: I should be able to log that my BRP has not arrived Then I fill 'contact-details-email' with 'test@test.test' Then I select 'Continue' Then I should be on the 'confirm' page showing 'Check the details you have provided' + And I should see 'test@test.test' on the page @validation Scenario: Not arrived application changing mind on letter recieved diff --git a/test/_features/brp/someone_else.feature b/test/_features/brp/someone_else.feature index 6f9ddb96..a3c78d20 100644 --- a/test/_features/brp/someone_else.feature +++ b/test/_features/brp/someone_else.feature @@ -28,6 +28,7 @@ Feature: I want someone else to collect my BRP Then I should see 'Details of person nominated to collect BRP' on the page Then I should see 'Your details' on the page Then I should see 'Are you completing this form on behalf of the BRP holder?' on the page + And I should see 'test@test.test' on the page Scenario: I need someone else to collect my BRP because I am under 18 Given I start the 'someone-else' application journey @@ -55,6 +56,7 @@ Feature: I want someone else to collect my BRP Then I should see 'Details of person nominated to collect BRP' on the page Then I should see 'Your details' on the page Then I should see 'Are you completing this form on behalf of the BRP holder?' on the page + And I should see 'test@test.test' on the page @validation Scenario: I need someone else to collect my BRP because I am under 18 but I enter an age over 18 From 851b142eab685f34dfa32739927946de2f200de9 Mon Sep 17 00:00:00 2001 From: Martin Crawley Date: Mon, 13 Feb 2023 09:43:04 +0000 Subject: [PATCH 7/8] BRP-58 Removed old references to use-address --- apps/collection/translations/src/en/fields.json | 3 --- apps/correct-mistakes/acceptance/features/_happy-path.js | 1 - apps/correct-mistakes/fields/uk-address.js | 6 +----- apps/correct-mistakes/translations/src/en/fields.json | 3 --- apps/lost-stolen/acceptance/features/_happy-path.js | 1 - apps/lost-stolen/acceptance/features/confirm/confirm.js | 1 - apps/lost-stolen/fields/personal-details.js | 6 +----- apps/lost-stolen/index.js | 1 - apps/lost-stolen/translations/src/en/fields.json | 3 --- apps/not-arrived/acceptance/features/_happy-path.js | 1 - apps/not-arrived/fields/address-match.js | 6 +----- apps/not-arrived/index.js | 1 - apps/not-arrived/translations/src/en/fields.json | 3 --- apps/someone-else/acceptance/features/_happy-path.js | 1 - apps/someone-else/fields/reason.js | 6 +----- apps/someone-else/index.js | 1 - apps/someone-else/translations/src/en/fields.json | 3 --- 17 files changed, 4 insertions(+), 43 deletions(-) diff --git a/apps/collection/translations/src/en/fields.json b/apps/collection/translations/src/en/fields.json index 96c6e68e..1496eaa9 100644 --- a/apps/collection/translations/src/en/fields.json +++ b/apps/collection/translations/src/en/fields.json @@ -126,9 +126,6 @@ "email": { "label": "Email address" }, - "use-address": { - "label": "I want to be contacted by post" - }, "phone": { "label": "Phone number (optional)" }, diff --git a/apps/correct-mistakes/acceptance/features/_happy-path.js b/apps/correct-mistakes/acceptance/features/_happy-path.js index a5e828d8..06d3ecc1 100644 --- a/apps/correct-mistakes/acceptance/features/_happy-path.js +++ b/apps/correct-mistakes/acceptance/features/_happy-path.js @@ -18,7 +18,6 @@ const values = { 'damaged-error-checkbox': 'false', 'conditions-error-checkbox': 'false', 'letter-error-checkbox': 'false', - 'use-address': 'true', 'org-help': 'yes' }; diff --git a/apps/correct-mistakes/fields/uk-address.js b/apps/correct-mistakes/fields/uk-address.js index 298c0ce1..cdc8a4e0 100644 --- a/apps/correct-mistakes/fields/uk-address.js +++ b/apps/correct-mistakes/fields/uk-address.js @@ -63,10 +63,6 @@ module.exports = { label: 'fields.phone.label' }, 'contact-address-county': { - label: 'fields.address-county.label', - dependent: { - value: 'true', - field: 'use-address' - } + label: 'fields.address-county.label' } }; diff --git a/apps/correct-mistakes/translations/src/en/fields.json b/apps/correct-mistakes/translations/src/en/fields.json index ff0fcd2c..d5763c5b 100644 --- a/apps/correct-mistakes/translations/src/en/fields.json +++ b/apps/correct-mistakes/translations/src/en/fields.json @@ -52,9 +52,6 @@ "email": { "label": "Email address" }, - "use-address": { - "label": "I want to be contacted by post" - }, "phone": { "label": "Phone number (optional)" }, diff --git a/apps/lost-stolen/acceptance/features/_happy-path.js b/apps/lost-stolen/acceptance/features/_happy-path.js index 8f2fafe2..17a345f7 100644 --- a/apps/lost-stolen/acceptance/features/_happy-path.js +++ b/apps/lost-stolen/acceptance/features/_happy-path.js @@ -5,7 +5,6 @@ Feature('Lost or Stolen - Happy path'); const values = { 'inside-uk': 'yes', - 'use-address': 'true', 'org-help': 'yes' }; diff --git a/apps/lost-stolen/acceptance/features/confirm/confirm.js b/apps/lost-stolen/acceptance/features/confirm/confirm.js index 77e983b0..f9e32ac4 100644 --- a/apps/lost-stolen/acceptance/features/confirm/confirm.js +++ b/apps/lost-stolen/acceptance/features/confirm/confirm.js @@ -14,7 +14,6 @@ const values = { nationality: 'United Arab Emirates', 'brp-card': '123', 'phone:': '0123', - 'use-address': 'true', 'org-help': 'yes' }; diff --git a/apps/lost-stolen/fields/personal-details.js b/apps/lost-stolen/fields/personal-details.js index ccb82cc7..cbb48e35 100644 --- a/apps/lost-stolen/fields/personal-details.js +++ b/apps/lost-stolen/fields/personal-details.js @@ -31,10 +31,6 @@ module.exports = { label: 'fields.phone.label' }, 'contact-address-county': { - label: 'fields.address-county.label', - dependent: { - value: 'true', - field: 'use-address' - } + label: 'fields.address-county.label' } }; diff --git a/apps/lost-stolen/index.js b/apps/lost-stolen/index.js index cc90d407..6ffdc9d1 100644 --- a/apps/lost-stolen/index.js +++ b/apps/lost-stolen/index.js @@ -29,7 +29,6 @@ module.exports = { fields: [ 'has-email-radio', 'contact-details-email', - 'use-address', 'contact-address-house-number', 'contact-address-street', 'contact-address-town', diff --git a/apps/lost-stolen/translations/src/en/fields.json b/apps/lost-stolen/translations/src/en/fields.json index a6babe5f..33ac65c5 100644 --- a/apps/lost-stolen/translations/src/en/fields.json +++ b/apps/lost-stolen/translations/src/en/fields.json @@ -30,9 +30,6 @@ "email": { "label": "Email address" }, - "use-address": { - "label": "I want to be contacted by post" - }, "phone": { "label": "Phone number (optional)" }, diff --git a/apps/not-arrived/acceptance/features/_happy-path.js b/apps/not-arrived/acceptance/features/_happy-path.js index b1c3bbe6..a2e895e6 100644 --- a/apps/not-arrived/acceptance/features/_happy-path.js +++ b/apps/not-arrived/acceptance/features/_happy-path.js @@ -10,7 +10,6 @@ const values = { 'no-letter': 'false', 'delivery-date-month': '6', 'delivery-date-year': yearString(), - 'use-address': 'true', 'org-help': 'yes' }; diff --git a/apps/not-arrived/fields/address-match.js b/apps/not-arrived/fields/address-match.js index ef04a7b3..83ced5b8 100644 --- a/apps/not-arrived/fields/address-match.js +++ b/apps/not-arrived/fields/address-match.js @@ -78,10 +78,6 @@ module.exports = { label: 'fields.phone.label' }, 'contact-address-county': { - label: 'fields.address-county.label', - dependent: { - value: 'true', - field: 'use-address' - } + label: 'fields.address-county.label' } }; diff --git a/apps/not-arrived/index.js b/apps/not-arrived/index.js index fbce2955..9c17c152 100644 --- a/apps/not-arrived/index.js +++ b/apps/not-arrived/index.js @@ -79,7 +79,6 @@ module.exports = { fields: [ 'has-email-radio', 'contact-details-email', - 'use-address', 'contact-address-house-number', 'contact-address-street', 'contact-address-town', diff --git a/apps/not-arrived/translations/src/en/fields.json b/apps/not-arrived/translations/src/en/fields.json index 0ee8ca3d..cfc27b14 100644 --- a/apps/not-arrived/translations/src/en/fields.json +++ b/apps/not-arrived/translations/src/en/fields.json @@ -97,9 +97,6 @@ "email": { "label": "Email address" }, - "use-address": { - "label": "I want to be contacted by post" - }, "phone": { "label": "Phone number (optional)" }, diff --git a/apps/someone-else/acceptance/features/_happy-path.js b/apps/someone-else/acceptance/features/_happy-path.js index d3767a02..2a77487c 100644 --- a/apps/someone-else/acceptance/features/_happy-path.js +++ b/apps/someone-else/acceptance/features/_happy-path.js @@ -9,7 +9,6 @@ const values = { 'date-of-birth-day': '1', 'date-of-birth-month': '1', 'date-of-birth-year': yearString(), - 'use-address': 'true', 'org-help': 'yes' }; diff --git a/apps/someone-else/fields/reason.js b/apps/someone-else/fields/reason.js index a39638da..bca7acba 100644 --- a/apps/someone-else/fields/reason.js +++ b/apps/someone-else/fields/reason.js @@ -30,10 +30,6 @@ module.exports = { label: 'fields.phone.label' }, 'contact-address-county': { - label: 'fields.address-county.label', - dependent: { - value: 'true', - field: 'use-address' - } + label: 'fields.address-county.label' } }; diff --git a/apps/someone-else/index.js b/apps/someone-else/index.js index 10a500f1..3933a476 100644 --- a/apps/someone-else/index.js +++ b/apps/someone-else/index.js @@ -37,7 +37,6 @@ module.exports = { fields: [ 'has-email-radio', 'contact-details-email', - 'use-address', 'contact-address-house-number', 'contact-address-street', 'contact-address-town', diff --git a/apps/someone-else/translations/src/en/fields.json b/apps/someone-else/translations/src/en/fields.json index 8636f0d4..ed6550a8 100644 --- a/apps/someone-else/translations/src/en/fields.json +++ b/apps/someone-else/translations/src/en/fields.json @@ -80,9 +80,6 @@ "email": { "label": "Email address" }, - "use-address": { - "label": "I want to be contacted by post" - }, "phone": { "label": "Phone number (optional)" }, From 41c51577d50e0a0ee54d0dbc61d5a6cdac3f3a1b Mon Sep 17 00:00:00 2001 From: Martin Crawley Date: Wed, 5 Apr 2023 13:53:26 +0100 Subject: [PATCH 8/8] Fixed linting issue --- apps/common/fields/contact-details.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/fields/contact-details.js b/apps/common/fields/contact-details.js index 6dc3671d..a3247cb6 100644 --- a/apps/common/fields/contact-details.js +++ b/apps/common/fields/contact-details.js @@ -8,7 +8,7 @@ module.exports = { value: 'true', field: 'has-email-radio' } - }, + }, 'has-email-radio': { mixin: 'radio-group', validate: ['required'],