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
1 change: 1 addition & 0 deletions app/controllers/idv/gpo_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def create
redirect_to capture_password_url
elsif resend_requested?
resend_letter
flash[:success] = t('idv.messages.gpo.another_letter_on_the_way')
redirect_to idv_come_back_later_url
else
redirect_to idv_review_url
Expand Down
8 changes: 7 additions & 1 deletion app/controllers/idv/review_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ def create

user_session[:need_personal_key_confirmation] = true

flash[:success] = t('idv.messages.confirm')
flash[:success] =
if gpo_user_flow?
t('idv.messages.gpo.letter_on_the_way')
else
t('idv.messages.confirm')
end

redirect_to next_step

analytics.idv_review_complete(
Expand Down
2 changes: 2 additions & 0 deletions config/locales/idv/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,10 @@ en:
gpo:
address_on_file_html: We will mail a letter with a <strong>one-time
code</strong> to the address that you provided on the previous step.
another_letter_on_the_way: We are sending you another letter
info_alert: You’ll need to wait until your letter is delivered to finish
verifying your identity.
letter_on_the_way: We are sending you a letter
resend: Send me another letter
resend_code_warning: If you request a new letter now, the one-time code from
your current letter will remain valid for a limited time. You may
Expand Down
2 changes: 2 additions & 0 deletions config/locales/idv/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ es:
gpo:
address_on_file_html: Le enviaremos una carta con <strong>un código único
</strong> a la dirección que nos facilitó en el paso anterior.
another_letter_on_the_way: Te enviaremos otra carta
info_alert: Tendrá que esperar a que su carta sea entregada para terminar de
verificar su identidad.
letter_on_the_way: Te enviaremos una carta
resend: Envíeme otra carta
resend_code_warning: Si solicitas una nueva carta ahora, el código de una sola
vez de tu carta actual seguirá siendo válido durante un tiempo
Expand Down
2 changes: 2 additions & 0 deletions config/locales/idv/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,10 @@ fr:
address_on_file_html: Nous enverrons une lettre avec <strong>un code à usage
unique </strong> à l’adresse que vous avez indiquée à l’étape
précédente.
another_letter_on_the_way: Nous vous envoyons une autre lettre
info_alert: Vous devrez attendre la livraison de votre lettre pour compléter la
vérification de votre identité.
letter_on_the_way: Nous vous envoyons une lettre
resend: Envoyez-moi une autre lettre
resend_code_warning: Si vous demandez une nouvelle lettre maintenant, le code à
usage unique de votre lettre actuelle restera valable pendant une
Expand Down
6 changes: 5 additions & 1 deletion spec/features/idv/steps/gpo_step_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
include IdvStepHelper
include OidcAuthHelper

it 'redirects to the review step when the user chooses to verify by letter', :js do
it 'redirects to and completes the review step when the user chooses to verify by letter', :js do
start_idv_from_sp
complete_idv_steps_before_gpo_step
click_on t('idv.buttons.mail.send')

expect(page).to have_content(t('idv.titles.session.review', app_name: APP_NAME))
expect(page).to have_current_path(idv_review_path)

complete_review_step
expect(page).to have_content(t('idv.messages.gpo.letter_on_the_way'))
end

it 'allows the user to go back', :js do
Expand Down Expand Up @@ -48,6 +51,7 @@
to change { GpoConfirmation.count }.from(1).to(2)
expect_user_to_be_unverified(user)

expect(page).to have_content(t('idv.messages.gpo.another_letter_on_the_way'))
expect(page).to have_content(t('idv.titles.come_back_later'))
expect(page).to have_current_path(idv_come_back_later_path)

Expand Down