diff --git a/app/assets/images/no-verify.svg b/app/assets/images/no-verify.svg new file mode 100644 index 00000000000..c302b772d27 --- /dev/null +++ b/app/assets/images/no-verify.svg @@ -0,0 +1 @@ +no-verify \ No newline at end of file diff --git a/app/decorators/session_decorator.rb b/app/decorators/session_decorator.rb index a16889a1ad1..fcd5d419b76 100644 --- a/app/decorators/session_decorator.rb +++ b/app/decorators/session_decorator.rb @@ -27,7 +27,7 @@ def verification_method_choice end def idv_hardfail4_partial - 'shared/null' + 'verify/no_sp_hardfail' end def sp_name; end diff --git a/app/views/verify/_hardfail4.html.slim b/app/views/verify/_hardfail4.html.slim index 01d3f029edb..3810e962ed5 100644 --- a/app/views/verify/_hardfail4.html.slim +++ b/app/views/verify/_hardfail4.html.slim @@ -1 +1,10 @@ -p.mb1 = t('idv.messages.hardfail4', sp: decorated_session.sp_name) +p.mb1 = t('idv.messages.hardfail', hours: Figaro.env.idv_attempt_window_in_hours) +.mt2.p3.col-12.center.border-box.border.border-teal.rounded-xl + p.mb3.fs-20p = t('idv.messages.hardfail4_html', sp: decorated_session.sp_name) + = link_to t('idv.buttons.continue_plain'), + decorated_session.sp_return_url, + class: 'btn btn-primary btn-wide' +hr.mt2 +.mt2 = link_to t('idv.messages.help_center'), MarketingSite.help_url +.mt2 + = link_to t('idv.messages.return_to_profile', app: APP_NAME), profile_path diff --git a/app/views/verify/_no_sp_hardfail.html.slim b/app/views/verify/_no_sp_hardfail.html.slim new file mode 100644 index 00000000000..171a1998c7f --- /dev/null +++ b/app/views/verify/_no_sp_hardfail.html.slim @@ -0,0 +1,9 @@ +.mt2.p3.col-12.center.border-box.border.border-teal.rounded-xl + p.mb3.fs-20p + = t('idv.messages.help_center') + = link_to t('idv.buttons.continue_plain'), + MarketingSite.help_url, + class: 'btn btn-primary btn-wide' +hr.mt2 +.mt2 + = link_to t('idv.messages.return_to_profile', app: APP_NAME), profile_path diff --git a/app/views/verify/fail.html.slim b/app/views/verify/fail.html.slim index d2d1a8d75b5..2e0dbd1d786 100644 --- a/app/views/verify/fail.html.slim +++ b/app/views/verify/fail.html.slim @@ -1,9 +1,10 @@ - title t('idv.titles.hardfail') -h1.h3.mt0 = t('idv.titles.hardfail') -p.mb1 = t('idv.messages.hardfail', hours: Figaro.env.idv_attempt_window_in_hours) +.mb1.sm-m0.center.pb1 + = image_tag(asset_url('no-verify.svg'), + alt: '', + class: 'align-bottom', + width: 170) +h1.h3.mt0.center.px6 + = t('idv.titles.hardfail') = render decorated_session.idv_hardfail4_partial - -.mt4.p3.col-12.center.border-box.border.border-teal.rounded-xl - p.mb3.fs-20p = t('idv.messages.help_center') - = link_to t('idv.buttons.help'), MarketingSite.help_url, class: 'btn btn-primary btn-wide' diff --git a/config/locales/idv/en.yml b/config/locales/idv/en.yml index cc820cbd789..e1b80ec4fc7 100644 --- a/config/locales/idv/en.yml +++ b/config/locales/idv/en.yml @@ -6,7 +6,7 @@ en: activate_by_phone: Activate by phone cancel: Cancel and return to your profile continue: Continue identity verification - help: Continue to Help Center + continue_plain: Continue mail: resend: Send another letter send: Send a letter @@ -109,6 +109,9 @@ en: an account, but with a different email address. dupe_ssn2_html: Please %{link} with the email address you originally used. dupe_ssn2_link: sign out now and sign back in + hardfail: We can't log you in right now, but you can try verifying your identity + again in %{hours} hours. + hardfail4_html: Go to %{sp} for help accessing your services. finance: disclaimer: By continuing, you agree to let %{app_name} compare the account information you provide with third-party sources in order to verify your @@ -122,8 +125,6 @@ en: no_account: Want to use a credit card instead? no_account_info: Help us verify your identity by providing the last 8 digits of your credit card. - hardfail: We can’t verify your identity right now. - hardfail4: You can also go to %{sp} for more help in accessing services. help_center: Visit our Help Center to learn more about verifying your account. loading: Verifying your identity mail_sent: Your letter is on its way @@ -142,6 +143,7 @@ en: same_as_2fa: This phone number can be the same one you used to set up your one-time password as long as it meets the criteria above. us_country_code: have a U.S. country code to accept phone calls + return_to_profile: "‹ Return to your login.gov profile" review: financial_info: Where is my financial account information? info_verified_html: We found records matching your %{phone_message} @@ -203,7 +205,7 @@ en: expectations: Next, help us identify you fail: We were unable to verify your identity financials: Provide a financial account number - hardfail: We were unable to verify your identity + hardfail: We weren't able to verify your identity intro: Help us identify you mail: resend: Want another letter? diff --git a/config/locales/idv/es.yml b/config/locales/idv/es.yml index 6c0226d64e4..f5b467f9a83 100644 --- a/config/locales/idv/es.yml +++ b/config/locales/idv/es.yml @@ -6,7 +6,7 @@ es: activate_by_phone: Active por teléfono cancel: Cancele y regrese a su perfil continue: Continúe la verificación de identidad - help: Continúe con el Centro de Ayuda + continue_plain: Continúe mail: resend: Enviar otra carta send: Enviar una carta @@ -123,8 +123,8 @@ es: no_account: "¿Desea usar una tarjeta de crédito?" no_account_info: Ayúdenos a verificar su identidad proporcionando los últimos 8 dígitos de su tarjeta de crédito. - hardfail: No podemos verificar su identidad en este momento. - hardfail4: También puede ir a %{sp} para obtener más ayuda y acceder a los servicios. + hardfail: NOT TRANSLATED YET + hardfail4_html: NOT TRANSLATED YET help_center: Visite nuestro Centro de Ayuda para obtener más información sobre la verificación de su cuenta. loading: NOT TRANSLATED YET @@ -145,6 +145,7 @@ es: su contraseña de un uso único, siempre y cuando cumpla con los criterios anteriores. us_country_code: NOT TRANSLATED YET + return_to_profile: NOT TRANSLATED YET review: financial_info: "¿Dónde está la información de mi cuenta financiera?" info_verified_html: Encontramos registros que coinciden con su %{teléfono_mensaje} diff --git a/config/locales/idv/fr.yml b/config/locales/idv/fr.yml index 01ac0d13123..b0a5e2a5761 100644 --- a/config/locales/idv/fr.yml +++ b/config/locales/idv/fr.yml @@ -6,7 +6,7 @@ fr: activate_by_phone: Activer par téléphone cancel: Annuler et retourner à votre profil continue: Continuer la vérification d'identité - help: Continuer jusqu'au Centre d'aide + continue_plain: Continuer mail: resend: Envoyer une autre lettre send: Envoyer une lettre @@ -108,8 +108,8 @@ fr: quelques informations personnelles de base ainsi que certaines informations financières pour compléter ce processus. Si vous n'avez pas cette information sous la main, vous pouvez continuer plus tard. - confirm: Vous avez crypté vos données vérifiées come_back_later: NOT TRANSLATED YET + confirm: Vous avez crypté vos données vérifiées dupe_ssn1: Si vous recevez ce message d'erreur, il est possible que vous ayez déjà créé et vérifié un compte, mais avec une adresse courriel différente. dupe_ssn2_html: Veuillez %{link} avec l'adresse courriel que vous avez utilisée @@ -130,9 +130,8 @@ fr: no_account: Vous préférez utiliser une carte de crédit? no_account_info: Aidez-nous à vérifier votre identité en fournissant les 8 derniers chiffres de votre carte de crédit. - hardfail: Nous ne pouvons pas vérifier votre identité pour le moment. - hardfail4: Vous pouvez également aller sur %{sp} où vous trouverez davantage - d'aide pour accéder à nos services. + hardfail: NOT TRANSLATED YET + hardfail4_html: NOT TRANSLATED YET help_center: Visitez notre Centre d'aide pour en apprendre davantage sur la façon dont nous vérifions votre compte. loading: NOT TRANSLATED YET @@ -154,6 +153,7 @@ fr: pour configurer votre mot de passe à usage unique, tant et aussi longtemps qu'il respecte les critères mentionnés plus haut. us_country_code: NOT TRANSLATED YET + return_to_profile: NOT TRANSLATED YET review: financial_info: Où se trouve l'information sur mon compte bancaire? info_verified_html: Nous avons trouvé des données qui correspondent à votre diff --git a/spec/decorators/session_decorator_spec.rb b/spec/decorators/session_decorator_spec.rb index 7ad3e2c2fa3..02f2020ea62 100644 --- a/spec/decorators/session_decorator_spec.rb +++ b/spec/decorators/session_decorator_spec.rb @@ -45,7 +45,7 @@ describe '#idv_hardfail4_partial' do it 'returns the correct partial' do - expect(subject.idv_hardfail4_partial).to eq 'shared/null' + expect(subject.idv_hardfail4_partial).to eq 'verify/no_sp_hardfail' end end diff --git a/spec/support/idv_examples/max_attempts.rb b/spec/support/idv_examples/max_attempts.rb index 278b487e32c..f7cd417c184 100644 --- a/spec/support/idv_examples/max_attempts.rb +++ b/spec/support/idv_examples/max_attempts.rb @@ -20,7 +20,9 @@ expect(page).to have_css('.alert-error', text: t('idv.modal.sessions.heading')) visit_idp_from_sp_with_loa3(sp) - expect(page).to have_content(t('idv.messages.hardfail')) + expect(page).to have_content( + t('idv.messages.hardfail', hours: Figaro.env.idv_attempt_window_in_hours) + ) expect(current_url).to eq verify_fail_url visit verify_session_path diff --git a/spec/views/verify/_hardfail4.html.slim_spec.rb b/spec/views/verify/_hardfail4.html.slim_spec.rb new file mode 100644 index 00000000000..24901339489 --- /dev/null +++ b/spec/views/verify/_hardfail4.html.slim_spec.rb @@ -0,0 +1,20 @@ +require 'rails_helper' + +RSpec.describe 'verify/_hardfail4.html.slim' do + let(:decorated_session) do + instance_double('SessionDecorator', sp_name: 'Example SP', sp_return_url: 'test.host') + end + + before do + allow(view).to receive(:decorated_session).and_return(decorated_session) + end + + it 'links to the profile' do + render + + expect(rendered).to have_link( + t('idv.messages.return_to_profile', app: APP_NAME), + href: profile_path + ) + end +end diff --git a/spec/views/verify/_no_sp_hardfail.html.slim_spec.rb b/spec/views/verify/_no_sp_hardfail.html.slim_spec.rb new file mode 100644 index 00000000000..53311875071 --- /dev/null +++ b/spec/views/verify/_no_sp_hardfail.html.slim_spec.rb @@ -0,0 +1,12 @@ +require 'rails_helper' + +RSpec.describe 'verify/_no_sp_hardfail.html.slim' do + it 'links to the profile' do + render + + expect(rendered).to have_link( + t('idv.messages.return_to_profile', app: APP_NAME), + href: profile_path + ) + end +end diff --git a/spec/views/verify/fail.html.slim_spec.rb b/spec/views/verify/fail.html.slim_spec.rb index 404a7ea0d0d..bccc5ff6f29 100644 --- a/spec/views/verify/fail.html.slim_spec.rb +++ b/spec/views/verify/fail.html.slim_spec.rb @@ -17,7 +17,7 @@ expect(view).to render_template(partial: 'verify/_hardfail4') expect(rendered).to have_content( - t('idv.messages.hardfail4', sp: @decorated_session.sp_name) + strip_tags(t('idv.messages.hardfail4_html', sp: @decorated_session.sp_name)) ) end end @@ -30,7 +30,7 @@ it 'displays the null partial' do render - expect(view).to render_template(partial: 'shared/_null') + expect(view).to render_template(partial: 'verify/_no_sp_hardfail') end end end