Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions app/views/idv/gpo_verify/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@

<% title t('forms.verify_profile.title') %>

<%= render AlertComponent.new(type: :info, class: 'margin-bottom-4', text_tag: 'div') do %>
<p>
<%= t('forms.verify_profile.alert_info') %>
<br>
<%= render 'shared/address', address: @gpo_verify_form.pii %>
</p>
<p>
<%= t('forms.verify_profile.wrong_address') %>
<%= link_to t('forms.verify_profile.clear_and_start_over'), idv_confirm_start_over_path %>
</p>
<% end %>

<%= render PageHeadingComponent.new.with_content(t('forms.verify_profile.welcome_back')) %>
<%= sanitize t('forms.verify_profile.welcome_back_description'), tags: %w[p strong] %>
<hr class="margin-y-4" />
Expand Down
3 changes: 3 additions & 0 deletions config/locales/forms/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ en:
validation:
required_checkbox: Please check this box to continue
verify_profile:
alert_info: 'We sent a lettter with your one-time code to:'
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
Expand All @@ -144,6 +146,7 @@ en:
your one-time code below. </p><p>If your letter hasn’t arrived yet,
please be patient as <strong>letters typically take 3 to 7 business days
to arrive</strong>. Thank you for your patience.</p>'
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.
Expand Down
3 changes: 3 additions & 0 deletions config/locales/forms/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ es:
validation:
required_checkbox: Marque esta casilla para continuar
verify_profile:
alert_info: 'Enviamos una carta con su código único a:'
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
Expand All @@ -152,6 +154,7 @@ es:
único a continuación.</p> <p>Si su carta aún no ha llegado, tenga
paciencia, ya que las <strong>cartas suelen tardar de 3 a 7 días hábiles
en llegar</strong>. Gracias por su paciencia.</p>'
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}.
Expand Down
3 changes: 3 additions & 0 deletions config/locales/forms/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ fr:
validation:
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: 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
Expand All @@ -155,6 +157,7 @@ fr:
encore arrivée, veuillez être patient car les <strong>lettres prennent
généralement entre trois à sept jours ouvrables pour arriver</strong>.
Nous vous remercions de votre patience.</p>'
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}.
Expand Down
40 changes: 39 additions & 1 deletion spec/features/idv/steps/gpo_otp_verification_step_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@
: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,
)
Expand Down Expand Up @@ -111,4 +119,34 @@
expect(page).to_not have_content(t('account.index.verification.reactivate_button'))
end
end

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).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

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