diff --git a/app/controllers/idv/gpo_controller.rb b/app/controllers/idv/gpo_controller.rb index e361f53840b..0ba648025ef 100644 --- a/app/controllers/idv/gpo_controller.rb +++ b/app/controllers/idv/gpo_controller.rb @@ -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 diff --git a/app/controllers/idv/review_controller.rb b/app/controllers/idv/review_controller.rb index 24d07fef588..6a1437a45a0 100644 --- a/app/controllers/idv/review_controller.rb +++ b/app/controllers/idv/review_controller.rb @@ -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( diff --git a/config/locales/idv/en.yml b/config/locales/idv/en.yml index 39e8e54e503..d3d9185aabf 100644 --- a/config/locales/idv/en.yml +++ b/config/locales/idv/en.yml @@ -191,8 +191,10 @@ en: gpo: address_on_file_html: We will mail a letter with a one-time code 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 diff --git a/config/locales/idv/es.yml b/config/locales/idv/es.yml index ddbacbcb285..430b351365d 100644 --- a/config/locales/idv/es.yml +++ b/config/locales/idv/es.yml @@ -199,8 +199,10 @@ es: gpo: address_on_file_html: Le enviaremos una carta con un código único 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 diff --git a/config/locales/idv/fr.yml b/config/locales/idv/fr.yml index 92350997147..a25b86cfbe0 100644 --- a/config/locales/idv/fr.yml +++ b/config/locales/idv/fr.yml @@ -211,8 +211,10 @@ fr: address_on_file_html: Nous enverrons une lettre avec un code à usage unique à 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 diff --git a/spec/features/idv/steps/gpo_step_spec.rb b/spec/features/idv/steps/gpo_step_spec.rb index 60fc77f79aa..739d4777dfb 100644 --- a/spec/features/idv/steps/gpo_step_spec.rb +++ b/spec/features/idv/steps/gpo_step_spec.rb @@ -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 @@ -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)