Skip to content

Commit

Permalink
Update verify hard fail screens
Browse files Browse the repository at this point in the history
**Why**:
After a user fails to verify based on supplied info
the user is redirected to help pages if logging in
directly on the app. If coming from an SP, they
are instructed to visit the SP for more help.
  • Loading branch information
Nick Bristow authored and Nick Bristow committed Aug 28, 2017
1 parent 2b4a862 commit 2a80678
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 23 deletions.
1 change: 1 addition & 0 deletions app/assets/images/no-verify.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/decorators/session_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def verification_method_choice
end

def idv_hardfail4_partial
'shared/null'
'verify/no_sp_hardfail'
end

def sp_name; end
Expand Down
12 changes: 11 additions & 1 deletion app/views/verify/_hardfail4.html.slim
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
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', sp: decorated_session.sp_name).html_safe
= 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 ' Return to your login.gov profile', profile_path
10 changes: 10 additions & 0 deletions app/views/verify/_no_sp_hardfail.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.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 ' Return to your login.gov profile', profile_path
13 changes: 7 additions & 6 deletions app/views/verify/fail.html.slim
Original file line number Diff line number Diff line change
@@ -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'
9 changes: 5 additions & 4 deletions config/locales/idv/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: Go to <strong>%{sp}</strong> 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
Expand All @@ -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
Expand Down Expand Up @@ -203,7 +204,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?
Expand Down
6 changes: 3 additions & 3 deletions config/locales/idv/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: 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
Expand Down
7 changes: 3 additions & 4 deletions config/locales/idv/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: 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
Expand Down
2 changes: 1 addition & 1 deletion spec/decorators/session_decorator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion spec/support/idv_examples/max_attempts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/views/verify/fail.html.slim_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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', sp: @decorated_session.sp_name))
)
end
end
Expand All @@ -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

0 comments on commit 2a80678

Please sign in to comment.