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
2 changes: 1 addition & 1 deletion app/views/idv/phone_errors/warning.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</p>

<p>
<strong><%= t('idv.failure.phone.warning.attempts', count: @remaining_attempts) %></strong>
<%= t('idv.failure.phone.warning.attempts_html', count: @remaining_attempts) %>
</p>

<div class="margin-y-5">
Expand Down
2 changes: 1 addition & 1 deletion app/views/idv/session_errors/warning.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<% c.with_header { t('idv.warning.sessions.heading') } %>

<p><%= t('idv.failure.sessions.warning') %></p>
<p><strong><%= t('idv.warning.attempts', count: @remaining_attempts) %></strong></p>
<p><%= t('idv.warning.attempts_html', count: @remaining_attempts) %></p>

<% c.with_action_button(
action: ->(**tag_options, &block) { link_to(@try_again_path, **tag_options, &block) },
Expand Down
14 changes: 8 additions & 6 deletions config/locales/idv/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ en:
heading: 'We couldn’t verify your identity by phone'
timeout: Our request to verify your information timed out. Please try again.
warning:
attempts:
one: For security reasons, you have one attempt remaining.
other: For security reasons, you have %{count} attempts remaining.
attempts_html:
one: For security reasons, you have <strong>one attempt</strong> remaining.
other: For security reasons, you have <strong>%{count} attempts</strong>
remaining.
gpo:
button: Verify by mail
explanation: If you don’t have another phone number to try, verify by mail
Expand Down Expand Up @@ -277,9 +278,10 @@ en:
technical_difficulties: Unfortunately, we are having technical difficulties and
cannot verify your identity at this time.
warning:
attempts:
one: For security reasons, you have one attempt remaining.
other: For security reasons, you have %{count} attempts remaining.
attempts_html:
one: For security reasons, you have <strong>one attempt</strong> remaining.
other: For security reasons, you have <strong>%{count} attempts</strong>
remaining.
sessions:
heading: We couldn’t find records matching your personal information
state_id:
Expand Down
12 changes: 6 additions & 6 deletions config/locales/idv/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ es:
timeout: Nuestra solicitud para verificar tu información ha caducado. Vuelve a
intentarlo.
warning:
attempts:
one: Por razones de seguridad, dispone de un solo intento.
other: Por razones de seguridad, le quedan %{count} intentos.
attempts_html:
one: Por razones de seguridad, le queda <strong>un solo intento</strong>.
other: Por razones de seguridad, le quedan <strong>%{count} intentos</strong>.
gpo:
button: Verificar por correo
explanation: Si no dispones de otro número de teléfono para intentarlo,
Expand Down Expand Up @@ -292,9 +292,9 @@ es:
technical_difficulties: Lamentablemente, debido a problemas técnicos por nuestra
parte, tal vez no podamos verificar su identidad en estos momentos.
warning:
attempts:
one: Por motivos de seguridad, le quedan un intento.
other: Por motivos de seguridad, le quedan %{count} intentos.
attempts_html:
one: Por motivos de seguridad, le queda <strong>un intento</strong>.
other: Por motivos de seguridad, le quedan <strong>%{count} intentos</strong>.
sessions:
heading: No encontramos registros que coincidan con sus datos personales
state_id:
Expand Down
14 changes: 8 additions & 6 deletions config/locales/idv/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ fr:
timeout: Notre demande de vérification de vos renseignements a expiré. Veuillez
réessayer.
warning:
attempts:
one: Pour des raisons de sécurité, il vous reste une tentative.
other: Pour des raisons de sécurité, il vous reste %{count} tentatives.
attempts_html:
one: Pour des raisons de sécurité, il vous reste <strong>une tentative</strong>.
other: Pour des raisons de sécurité, il vous reste <strong>%{count}
tentatives</strong>.
gpo:
button: Vérifier par courrier
explanation: Si vous n’avez pas d’autre numéro de téléphone à essayer, vérifiez
Expand Down Expand Up @@ -307,9 +308,10 @@ fr:
technical_difficulties: Malheureusement, nous rencontrons des difficultés
techniques et ne pouvons pas vérifier votre identité pour le moment.
warning:
attempts:
one: Pour des raisons de sécurité, il vous reste une tentative.
other: Pour des raisons de sécurité, il vous reste %{count} tentatives.
attempts_html:
one: Pour des raisons de sécurité, il vous reste <strong>une tentative</strong>.
other: Pour des raisons de sécurité, il vous reste <strong>%{count}
tentatives</strong>.
sessions:
heading: Nous n’avons pas trouvé de dossiers correspondant à vos informations
personnelles
Expand Down
6 changes: 5 additions & 1 deletion spec/features/idv/doc_auth/verify_info_step_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@
# Check that last attempt shows correct warning text
click_idv_continue
expect(page).to have_current_path(idv_session_errors_warning_path)
expect(page).to have_content(t('idv.warning.attempts.one'))
expect(page).to have_content(
strip_tags(
t('idv.warning.attempts_html.one'),
),
)
click_try_again

click_idv_continue
Expand Down
8 changes: 5 additions & 3 deletions spec/views/idv/phone_errors/warning.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@

it 'shows remaining attempts' do
expect(rendered).to have_text(
t(
'idv.failure.phone.warning.attempts',
count: remaining_attempts,
strip_tags(
t(
'idv.failure.phone.warning.attempts_html',
count: remaining_attempts,
),
),
)
end
Expand Down
12 changes: 10 additions & 2 deletions spec/views/idv/session_errors/warning.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
end

it 'shows remaining attempts' do
expect(rendered).to have_text(t('idv.warning.attempts', count: remaining_attempts))
expect(rendered).to have_text(
strip_tags(
t('idv.warning.attempts_html', count: remaining_attempts),
),
)
end

it 'shows a cancel link' do
Expand All @@ -34,7 +38,11 @@

it 'does not render troubleshooting option to retake photos' do
expect(rendered).to have_link(t('idv.failure.button.warning'), href: try_again_path)
expect(rendered).to have_text(t('idv.warning.attempts', count: remaining_attempts))
expect(rendered).to have_text(
strip_tags(
t('idv.warning.attempts_html', count: remaining_attempts),
),
)
expect(rendered).to have_link(t('links.cancel'), href: idv_cancel_path)
end
end
Expand Down