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
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def show

@selfie_check_required = resolved_authn_context_result.facial_match?
@hybrid_flow = true
@passport_requested = document_capture_session.passport_requested?

if document_capture_session.socure_docv_capture_app_url.present?
@url = document_capture_session.socure_docv_capture_app_url
Expand Down
1 change: 1 addition & 0 deletions app/controllers/idv/socure/document_capture_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def show

@selfie_check_required = resolved_authn_context_result.facial_match?
@hybrid_flow = false
@passport_requested = document_capture_session.passport_requested?

if document_capture_session.socure_docv_capture_app_url.present?
@url = document_capture_session.socure_docv_capture_app_url
Expand Down
25 changes: 17 additions & 8 deletions app/views/idv/shared/_doc_capture_interstitial.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,35 @@
</div>

<%= render PageHeadingComponent.new do %>
<%= t('doc_auth.headings.document_capture') %>
<% if @passport_requested %>
<%= t('doc_auth.headings.passport_capture') %>
<% else %>
<%= t('doc_auth.headings.document_capture') %>
<% end %>
<% end %>

<% if @hybrid_flow %>
<% if decorated_sp_session.sp_name.present? %>
<% if @passport_requested %>
<% if @selfie_check_required %>
<p>
<%= t('doc_auth.info.socure_hybrid_flow_html', app_name: APP_NAME, sp_name: decorated_sp_session.sp_name) %>
<%= t('doc_auth.info.socure_passport_ial2', app_name: APP_NAME) %>
</p>
<% else %>
<p>
<%= t('doc_auth.info.socure_hybrid_flow_html', app_name: APP_NAME, sp_name: APP_NAME) %>
<%= t('doc_auth.info.socure_passport', app_name: APP_NAME) %>
</p>
<% end %>
<% else %>
<p>
<%= t('doc_auth.info.socure_basic_idv', app_name: APP_NAME) %>
</p>
<% end %>

<p>
<%= t('doc_auth.info.socure_basic_idv', app_name: APP_NAME) %>
</p>
<p>
<% if @passport_requested %>
<%= t('doc_auth.info.socure_ial2_idv_finish_passport', app_name: APP_NAME) %>
<% else %>
<%= t('doc_auth.info.socure_ial2_idv_finish', app_name: APP_NAME) %>
<% end %>
</p>

<%= link_to t('forms.buttons.continue'), @url, class: 'usa-button usa-button--big usa-button--wide margin-top-4 margin-bottom-4' %>
Expand Down
4 changes: 3 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,10 @@ doc_auth.info.selfie_capture.action.retake: retake
doc_auth.info.selfie_capture.action.submit: Photo taken. Submit photo.
doc_auth.info.selfie_capture.intro: Camera is on, ready for selfie
doc_auth.info.socure_basic_idv: '%{app_name} will verify your ID using a trusted service provider, Socure. When you continue, you’ll be asked to take photos of your ID with Socure.'
doc_auth.info.socure_hybrid_flow_html: You are using %{app_name} to verify your identity and access <strong>%{sp_name}</strong>.
doc_auth.info.socure_ial2_idv_finish: When you are done taking photos, %{app_name} will finish verifying your information.
doc_auth.info.socure_ial2_idv_finish_passport: When you are done taking a photo, %{app_name} will finish verifying your information.
doc_auth.info.socure_passport: '%{app_name} will verify a photo of your passport using a trusted service provider, Socure. When you continue, you’ll be asked to take a photo of your passport with Socure.'
doc_auth.info.socure_passport_ial2: '%{app_name} will verify your passport using a trusted service provider, Socure. When you continue, you’ll be asked to take a photo of your passport and a photo of yourself with Socure.'
doc_auth.info.ssn: We need your Social Security number to verify your name, date of birth and address.
doc_auth.info.stepping_up_html: Verify your identity again to access this service. %{link_html}
doc_auth.info.upload_from_computer: Don’t have a phone? Upload photos of your ID from this computer.
Expand Down
4 changes: 3 additions & 1 deletion config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,10 @@ doc_auth.info.selfie_capture.action.retake: Volver a tomar foto
doc_auth.info.selfie_capture.action.submit: Se tomó la foto. Enviar la foto.
doc_auth.info.selfie_capture.intro: Cámara encendida, lista para tomar selfie
doc_auth.info.socure_basic_idv: '%{app_name} verificará su identificación por medio de Socure, un proveedor de servicios de confianza. Al continuar, se le pedirá que tome las fotografías de su identificación con Socure.'
doc_auth.info.socure_hybrid_flow_html: Está usando %{app_name} para verificar su identidad y acceder a <strong>%{sp_name}</strong>.
doc_auth.info.socure_ial2_idv_finish: Cuando acabe de tomar las fotos, %{app_name} terminará de verificar su información.
doc_auth.info.socure_ial2_idv_finish_passport: Cuando acabe de tomar la foto, %{app_name} terminará de verificar su información.
doc_auth.info.socure_passport: '%{app_name} verificará su pasaporte por medio de Socure, un proveedor de servicios de confianza. Al continuar, se le pedirá que tome una fotografía de su pasaporte con Socure.'
doc_auth.info.socure_passport_ial2: '%{app_name} verificará su pasaporte por medio de Socure, un proveedor de servicios de confianza. Al continuar, se le pedirá que tome una fotografía de su pasaporte y una foto suya con Socure.'
doc_auth.info.ssn: Necesitamos su número de Seguro Social para verificar su nombre, fecha de nacimiento y dirección.
doc_auth.info.stepping_up_html: Verifique de nuevo su identidad para acceder a este servicio. %{link_html}
doc_auth.info.upload_from_computer: '¿No tiene un teléfono? Cargue fotos de su identificación desde esta computadora.'
Expand Down
4 changes: 3 additions & 1 deletion config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,10 @@ doc_auth.info.selfie_capture.action.retake: nouvelle photo
doc_auth.info.selfie_capture.action.submit: Photo prise. Envoyer la photo.
doc_auth.info.selfie_capture.intro: Caméra prête à prendre la photo
doc_auth.info.socure_basic_idv: '%{app_name} vérifiera votre pièce d’identité en faisant appel à Socure, un prestataire de confiance. Il va vous être demandé de prendre des photos de votre pièce d’identité avec Socure.'
doc_auth.info.socure_hybrid_flow_html: Vous utilisez %{app_name} pour vérifier votre identité et accéder à <strong>%{sp_name}</strong>.
doc_auth.info.socure_ial2_idv_finish: Quand vous aurez terminé de prendre les photos, %{app_name} finira de vérifier vos renseignements.
doc_auth.info.socure_ial2_idv_finish_passport: Quand vous aurez terminé de prendre la photo, %{app_name} finira de vérifier vos renseignements.
doc_auth.info.socure_passport: '%{app_name} vérifiera votre passeport en faisant appel à Socure, un prestataire de confiance. Il va vous être demandé de prendre une photo de votre passeport avec Socure.'
doc_auth.info.socure_passport_ial2: '%{app_name} vérifiera votre passeport en faisant appel à Socure, un prestataire de confiance. Il va vous être demandé de prendre une photo de votre passeport et de vous prendre en photo avec Socure.'
doc_auth.info.ssn: Nous avons besoin de votre numéro de sécurité sociale pour confirmer vos nom, date de naissance et adresse.
doc_auth.info.stepping_up_html: Veuillez confirmer à nouveau votre identité pour accéder à ce service. %{link_html}
doc_auth.info.upload_from_computer: Vous n’avez pas de téléphone ? Téléchargez les photos de votre pièce d’identité depuis cet ordinateur.
Expand Down
4 changes: 3 additions & 1 deletion config/locales/zh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,10 @@ doc_auth.info.selfie_capture.action.retake: 重拍
doc_auth.info.selfie_capture.action.submit: 照片拍摄完毕。提交照片。
doc_auth.info.selfie_capture.intro: 相机已打开,准备自拍
doc_auth.info.socure_basic_idv: '%{app_name}会使用一家受信任的服务提供商 - Socure – 来验证你的ID。如果你继续,系统会要求你使用 Socure 拍摄你的ID的照片。'
doc_auth.info.socure_hybrid_flow_html: 你正在使用 %{app_name} 验证你的身份并访问 <strong>%{sp_name}</strong>。
doc_auth.info.socure_ial2_idv_finish: 拍完照片后,%{app_name} 会完成你的信息验证。
doc_auth.info.socure_ial2_idv_finish_passport: 你拍完照片后,%{app_name} 会完成你的信息验证。
doc_auth.info.socure_passport: '%{app_name} 会使用一家受信任的服务提供商 - Socure - 来验证你的护照。如果你继续,系统会要求你使用 Socure 拍摄你的护照的照片。'
doc_auth.info.socure_passport_ial2: '%{app_name} 会使用一家受信任的服务提供商 - Socure - 来验证你的护照。如果你继续,系统会要求你使用 Socure 拍摄你的护照以及自己的照片。'
doc_auth.info.ssn: 我们需要你的社会保障号码来证实你的姓名、生日和地址。
doc_auth.info.stepping_up_html: 再次验证你的身份以使用这项服务。 %{link_html}
doc_auth.info.upload_from_computer: 没有手机?从该电脑上传你身份证件的照片。
Expand Down
14 changes: 14 additions & 0 deletions spec/features/idv/doc_auth/socure_document_capture_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,20 @@
click_on t('idv.failure.button.warning')
expect(page).to have_current_path(idv_socure_document_capture_path)
expect(page).to have_content(t('doc_auth.headings.document_capture'))

# Go to the wait page
visit idv_socure_document_capture_update_path
expect(page).to have_current_path(idv_socure_document_capture_update_path)

# Correct intertitial with passport content
visit idv_socure_document_capture_update_path
document_capture_session = DocumentCaptureSession.find_by(user_id: user.id)
document_capture_session.update(passport_status: 'requested')
document_capture_session.save!
click_on t('idv.failure.button.warning')
expect(page).to have_current_path(idv_socure_document_capture_path)
expect(page).to have_content(t('doc_auth.headings.passport_capture'))
expect(page).to have_content(t('doc_auth.info.socure_passport', app_name: APP_NAME))
end
end

Expand Down
14 changes: 14 additions & 0 deletions spec/features/idv/hybrid_mobile/hybrid_socure_mobile_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,20 @@
click_on t('idv.failure.button.warning')
expect(page).to have_current_path(idv_hybrid_mobile_socure_document_capture_path)
expect(page).to have_content(t('doc_auth.headings.document_capture'))

# Correct intertitial with passport content
visit idv_hybrid_mobile_socure_document_capture_update_url
expect(page).to have_current_path(idv_hybrid_mobile_socure_document_capture_update_url)

# Correct intertitial with passport content
visit idv_hybrid_mobile_socure_document_capture_update_url
document_capture_session = DocumentCaptureSession.find_by(user_id: user.id)
document_capture_session.update(passport_status: 'requested')
document_capture_session.save!
click_on t('idv.failure.button.warning')
expect(page).to have_current_path(idv_hybrid_mobile_socure_document_capture_path)
expect(page).to have_content(t('doc_auth.headings.passport_capture'))
expect(page).to have_content(t('doc_auth.info.socure_passport', app_name: APP_NAME))
end
end
end
Expand Down