diff --git a/app/views/idv/in_person/ready_to_verify/show.html.erb b/app/views/idv/in_person/ready_to_verify/show.html.erb index 6cc213c8a91..dbab09167b8 100644 --- a/app/views/idv/in_person/ready_to_verify/show.html.erb +++ b/app/views/idv/in_person/ready_to_verify/show.html.erb @@ -44,7 +44,7 @@ <%# Alert %> <%= render AlertComponent.new(type: :info, class: 'margin-y-4', text_tag: :div) do %> -

<%= t('in_person_proofing.body.barcode.deadline', deadline: @presenter.formatted_due_date) %>

+

<%= t('in_person_proofing.body.barcode.deadline', deadline: @presenter.formatted_due_date, sp_name: @presenter.sp_name) %>

<%= t('in_person_proofing.body.barcode.deadline_restart') %>

<% end %> @@ -89,7 +89,7 @@

<%= t('in_person_proofing.process.real_id_and_supporting_docs.info') %>

@@ -130,7 +130,7 @@

<%= t('in_person_proofing.process.eipp_state_id_military_id.heading') %>

<%= t('in_person_proofing.process.eipp_state_id_military_id.info') %>

-
+
@@ -149,7 +149,7 @@

<%= t('in_person_proofing.process.eipp_state_id_supporting_docs.info') %>

@@ -248,7 +248,7 @@

<%= t('in_person_proofing.body.expect.info') %>

- <% if @presenter.service_provider_homepage_url.blank? %> + <% if @presenter.service_provider_homepage_url.blank? %> <%= t('in_person_proofing.body.barcode.close_window') %> <% end %>

diff --git a/app/views/user_mailer/shared/_in_person_ready_to_verify.html.erb b/app/views/user_mailer/shared/_in_person_ready_to_verify.html.erb index 679959c85da..3b8f2db026d 100644 --- a/app/views/user_mailer/shared/_in_person_ready_to_verify.html.erb +++ b/app/views/user_mailer/shared/_in_person_ready_to_verify.html.erb @@ -41,7 +41,7 @@ <%= image_tag('email/info@4x.png', width: 16, height: 16, alt: '', style: 'margin-top: 4px;') %> -

<%= t('in_person_proofing.body.barcode.deadline', deadline: @presenter.formatted_due_date) %>

+

<%= t('in_person_proofing.body.barcode.deadline', deadline: @presenter.formatted_due_date, sp_name: @presenter.sp_name) %>

<%= t('in_person_proofing.body.barcode.deadline_restart') %>

diff --git a/config/locales/en.yml b/config/locales/en.yml index 4525adfc6e5..4473fc1e5bd 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1233,7 +1233,7 @@ image_description.us_flag: US flag image_description.warning: Yellow caution sign in_person_proofing.body.barcode.cancel_link_text: Cancel your barcode in_person_proofing.body.barcode.close_window: You may now close this window. -in_person_proofing.body.barcode.deadline: You must visit any participating Post Office by %{deadline}. +in_person_proofing.body.barcode.deadline: You must visit any participating Post Office by %{deadline}. Complete this step to access %{sp_name}. in_person_proofing.body.barcode.deadline_restart: If you go after this deadline, your barcode will not work. You will need to restart the process. in_person_proofing.body.barcode.eipp_tag: GSA Enhanced Pilot Barcode in_person_proofing.body.barcode.eipp_what_to_bring: 'Depending on your ID, you may need to show supporting documents. Review the following options carefully:' diff --git a/config/locales/es.yml b/config/locales/es.yml index 78a46750568..09982581f2f 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1244,7 +1244,7 @@ image_description.us_flag: Bandera de los EE. UU. image_description.warning: Señal amarilla de precaución in_person_proofing.body.barcode.cancel_link_text: Cancele su código de barras in_person_proofing.body.barcode.close_window: Ya puede cerrar esta ventana. -in_person_proofing.body.barcode.deadline: Debe acudir a cualquier oficina de correos participante antes del %{deadline}. +in_person_proofing.body.barcode.deadline: Debe acudir a cualquier oficina de correos participante antes del %{deadline}. Siga este paso para acceder a %{sp_name}. in_person_proofing.body.barcode.deadline_restart: Si acude después de esta fecha límite, su código de barras ya no funcionará y tendrá que reiniciar el proceso. in_person_proofing.body.barcode.eipp_tag: Código de barras piloto mejorado GSA in_person_proofing.body.barcode.eipp_what_to_bring: 'Según el tipo de identificación que tenga, es posible que deba presentar documentos comprobatorios. Lea con atención las opciones siguientes:' diff --git a/config/locales/fr.yml b/config/locales/fr.yml index bf205ac8262..84d76274c13 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -1233,7 +1233,7 @@ image_description.us_flag: Drapeau des États-Unis image_description.warning: Panneau d’avertissement jaune in_person_proofing.body.barcode.cancel_link_text: Annuler votre code-barres in_person_proofing.body.barcode.close_window: Vous pouvez maintenant fermer cette fenêtre -in_person_proofing.body.barcode.deadline: Vous devez vous rendre dans un bureau de poste participant avant le %{deadline}. +in_person_proofing.body.barcode.deadline: Vous devez vous rendre dans un bureau de poste participant avant le %{deadline}. Effectuez cette étape pour accéder à %{sp_name}. in_person_proofing.body.barcode.deadline_restart: Si vous laissez passer la date limite, votre code-barres ne fonctionnera pas. Vous devrez recommencer toute la procédure. in_person_proofing.body.barcode.eipp_tag: Code-barres pilote amélioré de la GSA in_person_proofing.body.barcode.eipp_what_to_bring: 'Selon la pièce d’identité dont vous disposez, il pourra vous être demandé de présenter des documents complémentaires. Étudiez attentivement les options suivantes:' diff --git a/config/locales/zh.yml b/config/locales/zh.yml index dd475a5ea24..b8dd185eff0 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1246,7 +1246,7 @@ image_description.us_flag: 美国国旗 image_description.warning: 黄色警告标志 in_person_proofing.body.barcode.cancel_link_text: 取消你的条形码 in_person_proofing.body.barcode.close_window: 你现在可以关闭这一窗口。 -in_person_proofing.body.barcode.deadline: 你必须在 %{deadline}之前去任何参与邮局。 +in_person_proofing.body.barcode.deadline: 你必须在 %{deadline}之前去任何参与邮局。完成这个步骤以访问%{sp_name}。 in_person_proofing.body.barcode.deadline_restart: 如果你过了截止日期才去邮局,那你的条形码将无法使用。你将需要重新开始这一流程。 in_person_proofing.body.barcode.eipp_tag: GSA 增强型试行条形码 in_person_proofing.body.barcode.eipp_what_to_bring: 取决于您身份证件类型,您也许需要显示支持文件。请仔细阅读以下选项: diff --git a/spec/features/idv/in_person_spec.rb b/spec/features/idv/in_person_spec.rb index a625b6bf9ed..ec1f5ab121b 100644 --- a/spec/features/idv/in_person_spec.rb +++ b/spec/features/idv/in_person_spec.rb @@ -19,6 +19,7 @@ it 'works for a happy path', allow_browser_log: true do user = user_with_2fa + visit_idp_from_sp_with_ial2(:oidc, **{ client_id: ipp_service_provider.issuer }) sign_in_and_2fa_user(user) begin_in_person_proofing(user) @@ -138,7 +139,13 @@ expect(page).to have_css("img[alt='#{APP_NAME}']") expect(page).to have_content(strip_nbsp(t('in_person_proofing.headings.barcode'))) expect(page).to have_content(Idv::InPerson::EnrollmentCodeFormatter.format(enrollment_code)) - expect(page).to have_content(t('in_person_proofing.body.barcode.deadline', deadline: deadline)) + expect(page).to have_content( + t( + 'in_person_proofing.body.barcode.deadline', + deadline: deadline, + sp_name: ipp_service_provider.friendly_name, + ), + ) expect(page).to have_content('MILWAUKEE') expect(page).to have_content('Sunday: Closed') @@ -579,6 +586,7 @@ let(:user) { user_with_2fa } it 'allows the user to search by full address', allow_browser_log: true do + visit_idp_from_sp_with_ial2(:oidc, **{ client_id: ipp_service_provider.issuer }) sign_in_and_2fa_user(user) begin_in_person_proofing(user) # prepare page @@ -664,7 +672,11 @@ expect(page).to have_content(strip_nbsp(t('in_person_proofing.headings.barcode'))) expect(page).to have_content(Idv::InPerson::EnrollmentCodeFormatter.format(enrollment_code)) expect(page).to have_content( - t('in_person_proofing.body.barcode.deadline', deadline: deadline), + t( + 'in_person_proofing.body.barcode.deadline', + deadline: deadline, + sp_name: ipp_service_provider.friendly_name, + ), ) expect(page).to have_content('MILWAUKEE') expect(page).to have_content('Sunday: Closed') diff --git a/spec/features/idv/in_person_threatmetrix_spec.rb b/spec/features/idv/in_person_threatmetrix_spec.rb index 2e3ec70ce93..e201f38f660 100644 --- a/spec/features/idv/in_person_threatmetrix_spec.rb +++ b/spec/features/idv/in_person_threatmetrix_spec.rb @@ -22,12 +22,12 @@ let(:config) { ScriptBase::Config.new(include_missing:, reason: 'INV1234') } let(:enrollment) { InPersonEnrollment.last } let(:profile) { enrollment.profile } + let(:service_provider) { ServiceProvider.find_by(issuer: service_provider_issuer(sp)) } before do allow(IdentityConfig.store).to receive(:in_person_proofing_enabled).and_return(true) allow(IdentityConfig.store).to receive(:in_person_proofing_enforce_tmx).and_return(true) - ServiceProvider.find_by(issuer: service_provider_issuer(sp)) - .update(in_person_proofing_enabled: true) + service_provider.update(in_person_proofing_enabled: true) end def deactivate_profile_update_enrollment(status:) @@ -73,6 +73,7 @@ def deactivate_profile_update_enrollment(status:) let(:tmx_status) { 'Review' } it 'allows the user to continue down the happy path', allow_browser_log: true do + visit_idp_from_sp_with_ial2(:oidc, **{ client_id: service_provider.issuer }) sign_in_and_2fa_user(user) begin_in_person_proofing(user) # prepare page @@ -157,7 +158,11 @@ def deactivate_profile_update_enrollment(status:) expect(page).to have_content(strip_nbsp(t('in_person_proofing.headings.barcode'))) expect(page).to have_content(Idv::InPerson::EnrollmentCodeFormatter.format(enrollment_code)) expect(page).to have_content( - t('in_person_proofing.body.barcode.deadline', deadline: deadline), + t( + 'in_person_proofing.body.barcode.deadline', + deadline: deadline, + sp_name: service_provider.friendly_name, + ), ) expect(page).to have_content('MILWAUKEE') expect(page).to have_content('Sunday: Closed') diff --git a/spec/features/idv/steps/in_person_opt_in_ipp_spec.rb b/spec/features/idv/steps/in_person_opt_in_ipp_spec.rb index 5eb11e2e7d3..2e6c2be2dcb 100644 --- a/spec/features/idv/steps/in_person_opt_in_ipp_spec.rb +++ b/spec/features/idv/steps/in_person_opt_in_ipp_spec.rb @@ -118,7 +118,11 @@ expect(page).to have_content(strip_nbsp(t('in_person_proofing.headings.barcode'))) expect(page).to have_content(Idv::InPerson::EnrollmentCodeFormatter.format(enrollment_code)) expect(page).to have_content( - t('in_person_proofing.body.barcode.deadline', deadline: deadline), + t( + 'in_person_proofing.body.barcode.deadline', + deadline: deadline, + sp_name: ipp_service_provider.friendly_name, + ), ) expect(page).to have_content('MILWAUKEE') expect(page).to have_content('Sunday: Closed') @@ -264,6 +268,7 @@ t( 'in_person_proofing.body.barcode.deadline', deadline: deadline, + sp_name: ipp_service_provider.friendly_name, ), ) expect(page).to have_content('MILWAUKEE') @@ -430,6 +435,7 @@ t( 'in_person_proofing.body.barcode.deadline', deadline: deadline, + sp_name: ipp_service_provider.friendly_name, ), ) expect(page).to have_content('MILWAUKEE') diff --git a/spec/mailers/user_mailer_spec.rb b/spec/mailers/user_mailer_spec.rb index 9e22363362e..4bb24bcbe0b 100644 --- a/spec/mailers/user_mailer_spec.rb +++ b/spec/mailers/user_mailer_spec.rb @@ -938,6 +938,7 @@ def expect_email_body_to_have_help_and_contact_links ) end end + context 'when Enhanced IPP is enabled' do let(:is_enhanced_ipp) { true } let(:mail) do @@ -966,6 +967,15 @@ def expect_email_body_to_have_help_and_contact_links end context 'For Informed Delivery In-Person Proofing (ID-IPP)' do + let(:usps_time_zone) { ActiveSupport::TimeZone['America/New_York'].dup.freeze } + let(:formatted_date) do + I18n.l( + enrollment.due_date.in_time_zone(usps_time_zone), + format: :event_date, + ) + end + let(:sp_name) { enrollment.service_provider.friendly_name } + context 'template displays modified content' do it 'conditionally renders content in the what to expect section applicable to IPP' do aggregate_failures do @@ -982,6 +992,19 @@ def expect_email_body_to_have_help_and_contact_links end end + it 'renders the barcode deadline banner' do + expect(mail.html_part.body).to have_content( + t( + 'in_person_proofing.body.barcode.deadline', + deadline: formatted_date, + sp_name: sp_name, + ), + ) + expect(mail.html_part.body).to have_content( + t('in_person_proofing.body.barcode.deadline_restart'), + ) + end + it 'renders Questions? and Learn more link only once' do expect(mail.html_part.body).to have_content( t('in_person_proofing.body.barcode.questions'), @@ -1031,6 +1054,14 @@ def expect_email_body_to_have_help_and_contact_links end context 'For Enhanced In-Person Proofing (Enhanced IPP)' do + let(:usps_time_zone) { ActiveSupport::TimeZone['America/New_York'].dup.freeze } + let(:formatted_date) do + I18n.l( + enhanced_ipp_enrollment.due_date.in_time_zone(usps_time_zone), + format: :event_date, + ) + end + let(:sp_name) { enhanced_ipp_enrollment.service_provider.friendly_name } let(:is_enhanced_ipp) { true } let(:mail) do UserMailer.with(user: user, email_address: email_address).in_person_ready_to_verify( @@ -1056,6 +1087,19 @@ def expect_email_body_to_have_help_and_contact_links end end + it 'renders the barcode deadline banner' do + expect(mail.html_part.body).to have_content( + t( + 'in_person_proofing.body.barcode.deadline', + deadline: formatted_date, + sp_name: sp_name, + ), + ) + expect(mail.html_part.body).to have_content( + t('in_person_proofing.body.barcode.deadline_restart'), + ) + end + it 'renders Questions? and Learn more link only once' do expect(mail.html_part.body).to have_content( t('in_person_proofing.body.barcode.questions'), diff --git a/spec/views/idv/in_person/ready_to_verify/show.html.erb_spec.rb b/spec/views/idv/in_person/ready_to_verify/show.html.erb_spec.rb index 04bccd8e056..9dc6b5057bf 100644 --- a/spec/views/idv/in_person/ready_to_verify/show.html.erb_spec.rb +++ b/spec/views/idv/in_person/ready_to_verify/show.html.erb_spec.rb @@ -52,6 +52,19 @@ ) end + it 'renders the barcode deadline banner' do + render + + expect(rendered).to have_content( + t( + 'in_person_proofing.body.barcode.deadline', + deadline: presenter.formatted_due_date, + sp_name: presenter.sp_name, + ), + ) + expect(rendered).to have_content(t('in_person_proofing.body.barcode.deadline_restart')) + end + it 'renders a cancel link' do render