Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update verify hard fail screens #1640

Merged
merged 2 commits into from
Aug 31, 2017
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/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
11 changes: 10 additions & 1 deletion app/views/verify/_hardfail4.html.slim
Original file line number Diff line number Diff line change
@@ -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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% convinced this is the right URL

  • for SAML, this URL will be the "The URL of the SP which login.gov provides to users when they wish to go directly to the SP site or cancel out of authentication."
  • for OIDC this will be the decline/cancel URL which will probably show an error

I believe our goal is to have SP register a new URL specifically as a help page, so we'll need to add a new migration, update fields in the dashboard, etc etc

I am OK with us merging this as-is but it's wrong and we'll need to plan to fix it in the short-term

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nickbristow let's talk about how to fix this when you get back

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zachmargolis you are correct, we don't have the SP's registering a help url atm, I think thats planned.

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
9 changes: 9 additions & 0 deletions app/views/verify/_no_sp_hardfail.html.slim
Original file line number Diff line number Diff line change
@@ -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
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'
10 changes: 6 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_html: 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 All @@ -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}
Expand Down Expand Up @@ -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?
Expand Down
7 changes: 4 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_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
Expand All @@ -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}
Expand Down
10 changes: 5 additions & 5 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 @@ -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
Expand All @@ -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
Expand All @@ -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
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
20 changes: 20 additions & 0 deletions spec/views/verify/_hardfail4.html.slim_spec.rb
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions spec/views/verify/_no_sp_hardfail.html.slim_spec.rb
Original file line number Diff line number Diff line change
@@ -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
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_html', 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