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
12 changes: 9 additions & 3 deletions app/views/idv/welcome/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@
<h2><%= t('doc_auth.instructions.getting_started') %></h2>

<%= render ProcessListComponent.new(heading_level: :h3, class: 'margin-y-3') do |c| %>
<%= c.with_item(heading: t('doc_auth.instructions.bullet1')) do %>
<p><%= t('doc_auth.instructions.text1') %></p>
<% if decorated_sp_session.selfie_required? %>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note: selfie_required? not only checks that the SP requested a selfie, but also checks that the feature flag is enabled.

<%= c.with_item(heading: t('doc_auth.instructions.bullet1_with_selfie')) do %>
<p><%= t('doc_auth.instructions.text1_with_selfie') %></p>
<% end %>
<% else %>
<%= c.with_item(heading: t('doc_auth.instructions.bullet1')) do %>
<p><%= t('doc_auth.instructions.text1') %></p>
<% end %>
<% end %>
<%= c.with_item(heading: t('doc_auth.instructions.bullet2')) do %>
<p><%= t('doc_auth.instructions.text2') %></p>
Expand Down Expand Up @@ -58,4 +64,4 @@
<% end %>
<%= render 'shared/cancel', link: idv_cancel_path(step: 'welcome') %>
<% end %>
<%= javascript_packs_tag_once('document-capture-welcome') %>
<%= javascript_packs_tag_once('document-capture-welcome') %>
3 changes: 3 additions & 0 deletions config/locales/doc_auth/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ en:
you_entered: 'You entered:'
instructions:
bullet1: Take photos of your ID
bullet1_with_selfie: Take photos of yourself and your ID
bullet2: Enter your Social Security number
bullet3: Match to your phone number
bullet4: Re-enter your %{app_name} password
Expand All @@ -260,6 +261,8 @@ en:
considered valid. Do not enter real PII in this field.
text1: Use your driver’s license or state ID card. Other forms of ID are not
accepted.
text1_with_selfie: Take a photo of yourself and take photos of your driver’s
license or state ID card. Other forms of ID are not accepted.
text2: You will not need your physical SSN card.
text3: Your phone number matches you to your personal information. After you
match, we’ll send you a code.
Expand Down
4 changes: 4 additions & 0 deletions config/locales/doc_auth/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ es:
you_entered: 'Ud. entregó:'
instructions:
bullet1: Tomar fotos de tu identificación oficial
bullet1_with_selfie: Tomar fotos tuyas y de tu identificación oficial
bullet2: Ingresar tu Número de Seguro Social
bullet3: Confirmar tu número de teléfono
bullet4: Ingresar de nuevo tu contraseña de %{app_name}
Expand All @@ -303,6 +304,9 @@ es:
se consideran válidos. No ingrese PII real en este campo.
text1: Utiliza tu licencia de conducir o identificación oficial estatal. No
aceptamos ningún otro tipo de identificación.
text1_with_selfie: Tómate una foto y toma fotografías de tu licencia de conducir
o identificación oficial estatal. No aceptamos ningún otro tipo de
identificación.
text2: No necesitarás tu tarjeta física del seguro social.
text3: Tu número de teléfono te vincula con tu información personal. Luego de
confirmar tu información, te enviaremos un código.
Expand Down
4 changes: 4 additions & 0 deletions config/locales/doc_auth/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ fr:
you_entered: 'Tu as soumis:'
instructions:
bullet1: Prendre des photos de votre pièce d’identité
bullet1_with_selfie: Prenez des photos de vous et de vos pièces d’identité
bullet2: Saisissez votre numéro de sécurité sociale
bullet3: Faites correspondre votre numéro de téléphone
bullet4: Saisissez à nouveau votre mot de passe %{app_name}
Expand All @@ -313,6 +314,9 @@ fr:
champ.
text1: Utilisez votre permis de conduire ou votre carte d’identité nationale.
Les autres pièces d’identité ne sont pas acceptées.
text1_with_selfie: Prenez une photo de vous et une de votre permis de conduire
ou carte d’identité nationale. Les autres pièces d’identité ne sont pas
acceptées.
text2: Vous n’aurez pas besoin de votre carte de sécurité sociale.
text3: Votre numéro de téléphone correspond à vos informations personnelles. Une
fois la correspondance établie, nous vous enverrons un code.
Expand Down
11 changes: 11 additions & 0 deletions spec/views/idv/welcome/show.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
RSpec.describe 'idv/welcome/show.html.erb' do
let(:user_fully_authenticated) { true }
let(:sp_name) { nil }
let(:selfie_required) { false }
let(:user) { create(:user) }

before do
@decorated_sp_session = instance_double(ServiceProviderSession)
allow(@decorated_sp_session).to receive(:sp_name).and_return(sp_name)
allow(@decorated_sp_session).to receive(:selfie_required?).and_return(selfie_required)
@sp_name = @decorated_sp_session.sp_name || APP_NAME
@title = t('doc_auth.headings.welcome', sp_name: @sp_name)
allow(view).to receive(:decorated_sp_session).and_return(@decorated_sp_session)
Expand All @@ -33,6 +35,7 @@
it 'renders the welcome template' do
expect(rendered).to have_content(@title)
expect(rendered).to have_content(t('doc_auth.instructions.getting_started'))
expect(rendered).to have_content(t('doc_auth.instructions.bullet1'))
expect(rendered).to have_link(
t('doc_auth.info.getting_started_learn_more'),
href: help_center_redirect_path(
Expand All @@ -44,5 +47,13 @@
),
)
end

context 'when the SP requests IAL2 verification' do
let(:selfie_required) { true }

it 'renders a modified welcome template' do
expect(rendered).to have_content(t('doc_auth.instructions.bullet1_with_selfie'))
end
end
end
end