From d5648d69d11cb35d2de347c02d56fda3d6e255b9 Mon Sep 17 00:00:00 2001 From: Amir Reavis-Bey Date: Mon, 12 Jun 2023 15:06:50 -0400 Subject: [PATCH 1/9] LG-9952 Welcome back screen should have a new information alert banner changelog: User-Facing Improvements, Identity Verification, Welcome back page for GPO letter displays banner containing recipient address --- app/views/idv/gpo_verify/index.html.erb | 12 ++++++++++++ config/locales/forms/en.yml | 3 +++ config/locales/forms/es.yml | 3 +++ config/locales/forms/fr.yml | 3 +++ 4 files changed, 21 insertions(+) diff --git a/app/views/idv/gpo_verify/index.html.erb b/app/views/idv/gpo_verify/index.html.erb index f901c9e1267..40612a17bb5 100644 --- a/app/views/idv/gpo_verify/index.html.erb +++ b/app/views/idv/gpo_verify/index.html.erb @@ -9,6 +9,18 @@ <% title t('forms.verify_profile.title') %> +<%= render AlertComponent.new(type: :info, class: 'margin-bottom-4', text_tag: 'div') do %> +

+ <%= t('forms.verify_profile.alert_info') %> +
+ <%= render 'shared/address', address: @gpo_verify_form.pii %> +

+

+ <%= t('forms.verify_profile.wrong_address') %> + <%= link_to t('forms.verify_profile.clear_and_start_over'), idv_confirm_start_over_path %> +

+<% end %> + <%= render PageHeadingComponent.new.with_content(t('forms.verify_profile.welcome_back')) %> <%= sanitize t('forms.verify_profile.welcome_back_description'), tags: %w[p strong] %>
diff --git a/config/locales/forms/en.yml b/config/locales/forms/en.yml index 06407a3a434..bfcbb371731 100644 --- a/config/locales/forms/en.yml +++ b/config/locales/forms/en.yml @@ -134,6 +134,9 @@ en: validation: required_checkbox: Please check this box to continue verify_profile: + alert_info: 'We sent a lettter with your one-time code to:' + wrong_address: Not the right address? + clear_and_start_over: Clear your information and start over instructions: Enter the 10-character code from the letter you received. name: One-time code return_to_profile: Return to your profile diff --git a/config/locales/forms/es.yml b/config/locales/forms/es.yml index 92fe063975d..2485aa79bdb 100644 --- a/config/locales/forms/es.yml +++ b/config/locales/forms/es.yml @@ -142,6 +142,9 @@ es: validation: required_checkbox: Marque esta casilla para continuar verify_profile: + alert_info: 'Enviamos una carta con su código único a:' + wrong_address: ¿La dirección no es correcta? + clear_and_start_over: Borrar su información y empezar de nuevo instructions: Introduzca el código de 10 caracteres de la carta que ha recibido. name: Código único return_to_profile: Regrese a su perfil diff --git a/config/locales/forms/fr.yml b/config/locales/forms/fr.yml index bb9eaf67407..c0560611e02 100644 --- a/config/locales/forms/fr.yml +++ b/config/locales/forms/fr.yml @@ -143,6 +143,9 @@ fr: validation: required_checkbox: Veuillez cocher cette case pour continuer verify_profile: + alert_info: 'Nous avons envoyé une lettre avec votre code à usage unique à:' + wrong_address: Pas la bonne adresse? + clear_and_start_over: Effacez vos informations et recommencez instructions: Entrez le code à 10 caractères figurant sur la lettre que vous avez reçue. name: Code à usage unique From 9a70d0fd73e55e9c647989c879150d111602b768 Mon Sep 17 00:00:00 2001 From: Amir Reavis-Bey Date: Mon, 12 Jun 2023 16:31:01 -0400 Subject: [PATCH 2/9] happy linting --- config/locales/forms/en.yml | 2 +- config/locales/forms/es.yml | 2 +- config/locales/forms/fr.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/locales/forms/en.yml b/config/locales/forms/en.yml index bfcbb371731..9fa2d31a8f3 100644 --- a/config/locales/forms/en.yml +++ b/config/locales/forms/en.yml @@ -135,7 +135,6 @@ en: required_checkbox: Please check this box to continue verify_profile: alert_info: 'We sent a lettter with your one-time code to:' - wrong_address: Not the right address? clear_and_start_over: Clear your information and start over instructions: Enter the 10-character code from the letter you received. name: One-time code @@ -147,6 +146,7 @@ en: your one-time code below.

If your letter hasn’t arrived yet, please be patient as letters typically take 3 to 7 business days to arrive. Thank you for your patience.

' + wrong_address: Not the right address? webauthn_delete: caution: If you remove your security key you won’t be able to use it to access your %{app_name} account. diff --git a/config/locales/forms/es.yml b/config/locales/forms/es.yml index 2485aa79bdb..7e6facd7f85 100644 --- a/config/locales/forms/es.yml +++ b/config/locales/forms/es.yml @@ -143,7 +143,6 @@ es: required_checkbox: Marque esta casilla para continuar verify_profile: alert_info: 'Enviamos una carta con su código único a:' - wrong_address: ¿La dirección no es correcta? clear_and_start_over: Borrar su información y empezar de nuevo instructions: Introduzca el código de 10 caracteres de la carta que ha recibido. name: Código único @@ -155,6 +154,7 @@ es: único a continuación.

Si su carta aún no ha llegado, tenga paciencia, ya que las cartas suelen tardar de 3 a 7 días hábiles en llegar. Gracias por su paciencia.

' + wrong_address: ¿La dirección no es correcta? webauthn_delete: caution: Si elimina su clave de seguridad, no podrá usarla para acceder a su cuenta %{app_name}. diff --git a/config/locales/forms/fr.yml b/config/locales/forms/fr.yml index c0560611e02..eaf99de4ec4 100644 --- a/config/locales/forms/fr.yml +++ b/config/locales/forms/fr.yml @@ -144,7 +144,6 @@ fr: required_checkbox: Veuillez cocher cette case pour continuer verify_profile: alert_info: 'Nous avons envoyé une lettre avec votre code à usage unique à:' - wrong_address: Pas la bonne adresse? clear_and_start_over: Effacez vos informations et recommencez instructions: Entrez le code à 10 caractères figurant sur la lettre que vous avez reçue. @@ -158,6 +157,7 @@ fr: encore arrivée, veuillez être patient car les lettres prennent généralement entre trois à sept jours ouvrables pour arriver. Nous vous remercions de votre patience.

' + wrong_address: Pas la bonne adresse? webauthn_delete: caution: Si vous supprimez votre clé de sécurité, vous ne pourrez plus l’utiliser pour accéder à votre compte %{app_name}. From 93188239f0a219109ab90a3a7c78db6695632024 Mon Sep 17 00:00:00 2001 From: Amir Reavis-Bey Date: Mon, 12 Jun 2023 17:34:51 -0400 Subject: [PATCH 3/9] keep french language consistent --- config/locales/forms/fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/forms/fr.yml b/config/locales/forms/fr.yml index eaf99de4ec4..778f8b04348 100644 --- a/config/locales/forms/fr.yml +++ b/config/locales/forms/fr.yml @@ -144,7 +144,7 @@ fr: required_checkbox: Veuillez cocher cette case pour continuer verify_profile: alert_info: 'Nous avons envoyé une lettre avec votre code à usage unique à:' - clear_and_start_over: Effacez vos informations et recommencez + clear_and_start_over: Supprimez vos données et recommencez instructions: Entrez le code à 10 caractères figurant sur la lettre que vous avez reçue. name: Code à usage unique From ba0ff7d6cf896a6bb5375cd7432d6784b86ab0a5 Mon Sep 17 00:00:00 2001 From: Amir Reavis-Bey Date: Tue, 13 Jun 2023 13:15:38 -0400 Subject: [PATCH 4/9] only show address if pii exists --- app/views/idv/gpo_verify/index.html.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/idv/gpo_verify/index.html.erb b/app/views/idv/gpo_verify/index.html.erb index 40612a17bb5..1e5361f593f 100644 --- a/app/views/idv/gpo_verify/index.html.erb +++ b/app/views/idv/gpo_verify/index.html.erb @@ -12,8 +12,10 @@ <%= render AlertComponent.new(type: :info, class: 'margin-bottom-4', text_tag: 'div') do %>

<%= t('forms.verify_profile.alert_info') %> -
- <%= render 'shared/address', address: @gpo_verify_form.pii %> + <% if pii = @gpo_verify_form.pii %> +
+ <%= render 'shared/address', address: pii %> + <% end %>

<%= t('forms.verify_profile.wrong_address') %> From 36d90356256eb1bb20b14de2d806ee0d6d988773 Mon Sep 17 00:00:00 2001 From: Amir Reavis-Bey Date: Tue, 13 Jun 2023 17:17:16 -0400 Subject: [PATCH 5/9] add tests for gpo verify alert content --- .../steps/gpo_otp_verification_step_spec.rb | 69 ++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/spec/features/idv/steps/gpo_otp_verification_step_spec.rb b/spec/features/idv/steps/gpo_otp_verification_step_spec.rb index 989882f443a..a63e0541dc1 100644 --- a/spec/features/idv/steps/gpo_otp_verification_step_spec.rb +++ b/spec/features/idv/steps/gpo_otp_verification_step_spec.rb @@ -9,7 +9,10 @@ :profile, deactivation_reason: 3, gpo_verification_pending_at: 2.days.ago, - pii: { ssn: '123-45-6789', dob: '1970-01-01' }, + pii: { + address1: '1 Secure Way', address2: 'Unit #4', city: 'Loginville', + state: 'DC', zipcode: '11111', ssn: '123-45-6789', dob: '1970-01-01' + }, fraud_review_pending_at: fraud_review_pending_timestamp, fraud_rejection_at: fraud_rejection_timestamp, ) @@ -111,4 +114,68 @@ expect(page).to_not have_content(t('account.index.verification.reactivate_button')) end end + + context 'canceling and starting over within the banner' do + context 'user has address pii' do + it 'displays address partial' do + sign_in_live_with_2fa(user) + + expect(current_path).to eq idv_gpo_verify_path + expect(page).to have_content t('forms.verify_profile.alert_info') + expect(page).to have_content t('forms.verify_profile.wrong_address') + expect(page).to have_content '1 Secure Way' + + click_on t('forms.verify_profile.clear_and_start_over') + + expect(current_path).to eq idv_confirm_start_over_path + + click_idv_continue + + expect(current_path).to eq idv_doc_auth_welcome_step + end + end + + context 'user does not have address pii' do + let(:profile) do + create( + :profile, + deactivation_reason: 3, + gpo_verification_pending_at: 2.days.ago, + pii: { ssn: '123-45-6789', dob: '1970-01-01' }, + fraud_review_pending_at: fraud_review_pending_timestamp, + fraud_rejection_at: fraud_rejection_timestamp, + ) + end + + it 'does not render address partial within the alert banner' do + sign_in_live_with_2fa(user) + + expect(current_path).to eq idv_gpo_verify_path + expect(page).to have_content t('forms.verify_profile.alert_info') + expect(page).to have_content t('forms.verify_profile.wrong_address') + expect(page).not_to have_content '1 Secure Way' + + click_on t('forms.verify_profile.clear_and_start_over') + + expect(current_path).to eq idv_confirm_start_over_path + + click_idv_continue + + expect(current_path).to eq idv_doc_auth_welcome_step + end + end + end + + it 'allows a user to cancel and start over in the footer' do + sign_in_live_with_2fa(user) + + expect(current_path).to eq idv_gpo_verify_path + click_on t('idv.messages.clear_and_start_over') + + expect(current_path).to eq idv_confirm_start_over_path + + click_idv_continue + + expect(current_path).to eq idv_doc_auth_welcome_step + end end From bc4b015e8fb00dc1f79b852f9e6656c56ea1709e Mon Sep 17 00:00:00 2001 From: Amir Reavis-Bey Date: Tue, 13 Jun 2023 17:42:23 -0400 Subject: [PATCH 6/9] verify adderess partial is rendered --- .../steps/gpo_otp_verification_step_spec.rb | 54 ++++--------------- 1 file changed, 10 insertions(+), 44 deletions(-) diff --git a/spec/features/idv/steps/gpo_otp_verification_step_spec.rb b/spec/features/idv/steps/gpo_otp_verification_step_spec.rb index a63e0541dc1..d936a793b6a 100644 --- a/spec/features/idv/steps/gpo_otp_verification_step_spec.rb +++ b/spec/features/idv/steps/gpo_otp_verification_step_spec.rb @@ -115,55 +115,21 @@ end end - context 'canceling and starting over within the banner' do - context 'user has address pii' do - it 'displays address partial' do - sign_in_live_with_2fa(user) - - expect(current_path).to eq idv_gpo_verify_path - expect(page).to have_content t('forms.verify_profile.alert_info') - expect(page).to have_content t('forms.verify_profile.wrong_address') - expect(page).to have_content '1 Secure Way' - - click_on t('forms.verify_profile.clear_and_start_over') - - expect(current_path).to eq idv_confirm_start_over_path - - click_idv_continue - - expect(current_path).to eq idv_doc_auth_welcome_step - end - end - - context 'user does not have address pii' do - let(:profile) do - create( - :profile, - deactivation_reason: 3, - gpo_verification_pending_at: 2.days.ago, - pii: { ssn: '123-45-6789', dob: '1970-01-01' }, - fraud_review_pending_at: fraud_review_pending_timestamp, - fraud_rejection_at: fraud_rejection_timestamp, - ) - end - - it 'does not render address partial within the alert banner' do - sign_in_live_with_2fa(user) + it 'allows a user to cancel and start over withinthe banner' do + sign_in_live_with_2fa(user) - expect(current_path).to eq idv_gpo_verify_path - expect(page).to have_content t('forms.verify_profile.alert_info') - expect(page).to have_content t('forms.verify_profile.wrong_address') - expect(page).not_to have_content '1 Secure Way' + expect(current_path).to eq idv_gpo_verify_path + expect(page).to have_content t('forms.verify_profile.alert_info') + expect(page).to have_content t('forms.verify_profile.wrong_address') + expect(page).to have_content '1 Secure Way' - click_on t('forms.verify_profile.clear_and_start_over') + click_on t('forms.verify_profile.clear_and_start_over') - expect(current_path).to eq idv_confirm_start_over_path + expect(current_path).to eq idv_confirm_start_over_path - click_idv_continue + click_idv_continue - expect(current_path).to eq idv_doc_auth_welcome_step - end - end + expect(current_path).to eq idv_doc_auth_welcome_step end it 'allows a user to cancel and start over in the footer' do From 024e915071662600c612c57a8062bfde70105dcb Mon Sep 17 00:00:00 2001 From: Amir Reavis-Bey Date: Tue, 13 Jun 2023 17:46:17 -0400 Subject: [PATCH 7/9] happy linting --- .../features/idv/steps/gpo_otp_verification_step_spec.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/spec/features/idv/steps/gpo_otp_verification_step_spec.rb b/spec/features/idv/steps/gpo_otp_verification_step_spec.rb index d936a793b6a..fe52b3b71df 100644 --- a/spec/features/idv/steps/gpo_otp_verification_step_spec.rb +++ b/spec/features/idv/steps/gpo_otp_verification_step_spec.rb @@ -10,8 +10,13 @@ deactivation_reason: 3, gpo_verification_pending_at: 2.days.ago, pii: { - address1: '1 Secure Way', address2: 'Unit #4', city: 'Loginville', - state: 'DC', zipcode: '11111', ssn: '123-45-6789', dob: '1970-01-01' + address1: '1 Secure Way', + address2: 'Unit #4', + city: 'Loginville', + state: 'DC', + zipcode: '11111', + ssn: '123-45-6789', + dob: '1970-01-01', }, fraud_review_pending_at: fraud_review_pending_timestamp, fraud_rejection_at: fraud_rejection_timestamp, From 5fa92ce3ac62d61c593109ceaad341cfe216ba4c Mon Sep 17 00:00:00 2001 From: Amir Reavis-Bey Date: Wed, 14 Jun 2023 10:33:36 -0400 Subject: [PATCH 8/9] remove guard for pii --- app/views/idv/gpo_verify/index.html.erb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/views/idv/gpo_verify/index.html.erb b/app/views/idv/gpo_verify/index.html.erb index 1e5361f593f..8a960b7f9ef 100644 --- a/app/views/idv/gpo_verify/index.html.erb +++ b/app/views/idv/gpo_verify/index.html.erb @@ -12,10 +12,8 @@ <%= render AlertComponent.new(type: :info, class: 'margin-bottom-4', text_tag: 'div') do %>

<%= t('forms.verify_profile.alert_info') %> - <% if pii = @gpo_verify_form.pii %> -
- <%= render 'shared/address', address: pii %> - <% end %> +
+ <%= render 'shared/address', address: pii %>

<%= t('forms.verify_profile.wrong_address') %> From 7631fd5eb3f1faff0808ab2ed043c148c3e18b98 Mon Sep 17 00:00:00 2001 From: Amir Reavis-Bey Date: Wed, 14 Jun 2023 11:05:04 -0400 Subject: [PATCH 9/9] fix typo --- app/views/idv/gpo_verify/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/idv/gpo_verify/index.html.erb b/app/views/idv/gpo_verify/index.html.erb index 8a960b7f9ef..40612a17bb5 100644 --- a/app/views/idv/gpo_verify/index.html.erb +++ b/app/views/idv/gpo_verify/index.html.erb @@ -13,7 +13,7 @@

<%= t('forms.verify_profile.alert_info') %>
- <%= render 'shared/address', address: pii %> + <%= render 'shared/address', address: @gpo_verify_form.pii %>

<%= t('forms.verify_profile.wrong_address') %>