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
1 change: 1 addition & 0 deletions app/services/marketing_site.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class UnknownArticleException < StandardError; end
verify-your-identity/phone-number
verify-your-identity/verify-your-address-by-mail
verify-your-identity/overview
verify-your-identity/verify-your-identity-in-person/find-a-participating-post-office
].to_set.freeze

def self.locale_segment
Expand Down
17 changes: 17 additions & 0 deletions app/views/idv/in_person/ready_to_verify/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,23 @@
</section>
<% end %>


<% if !@is_enhanced_ipp %>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ruby style guidelines vote for unless over if !, but I know unless is controversial. It be would nice if we could change this to if @is_id_ipp, but that would require introducing a new instance variable. I don't think the change is worth that.

What are your thoughts on if ! versus unless?

Copy link
Copy Markdown
Contributor Author

@jennyverdeyen jennyverdeyen Nov 18, 2024

Choose a reason for hiding this comment

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

Ooooh I was not hip to the unless hatred!

kill unless with fire

😱

I agree if @is_id_ipp would be the most readable but also agree it isn't particularly worth the squeeze here. I don't have strong feelings about unless vs if ! but I stuck with if ! here because it was being used that way earlier in the same file. I kind of like the idiomatic feel of unless but now I wonder if I should avoid it in the future so as not to upset reviewers 😛

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Eh. I slightly prefer unless because it's in the Ruby style guidelines, but I also am not going to die on this hill. I also found the PR that introduced the if ! syntax into this template and found that I approved it. 🙃 I guess my past self didn't feel strongly, either!

<h3><%= t('in_person_proofing.body.location.change_location_heading') %></h3>
<p class="margin-bottom-4">
<%= t(
'in_person_proofing.body.location.change_location_info_html',
find_other_locations_link_html: link_to(
t('in_person_proofing.body.location.change_location_find_other_locations'),
help_center_redirect_url(
category: 'verify-your-identity',
article: 'verify-your-identity-in-person/find-a-participating-post-office',
),
),
) %>
</p>
<% end %>

<h2 class="margin-bottom-2"><%= t('in_person_proofing.body.expect.heading') %></h2>
<p><%= t('in_person_proofing.body.expect.info') %></p>

Expand Down
17 changes: 17 additions & 0 deletions app/views/user_mailer/shared/_in_person_ready_to_verify.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -275,5 +275,22 @@
</div>
<% end %>

<% if !@is_enhanced_ipp %>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The comment I left on L232 of app/views/idv/in_person/ready_to_verify/show.html.erb is relevant here, too.

<h3><%= t('in_person_proofing.body.location.change_location_heading') %></h3>
<p class="margin-bottom-4">
<%= t(
'in_person_proofing.body.location.change_location_info_html',
find_other_locations_link_html: link_to(
t('in_person_proofing.body.location.change_location_find_other_locations'),
help_center_redirect_url(
category: 'verify-your-identity',
article: 'verify-your-identity-in-person/find-a-participating-post-office',
),
),
).html_safe %>
</p>
<% end %>


<h2 class="font-heading-lg text-bold margin-bottom-2"><%= t('in_person_proofing.body.expect.heading') %></h2>
<p class="margin-bottom-0"><%= t('in_person_proofing.body.expect.info') %></p>
5 changes: 4 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1211,10 +1211,13 @@ in_person_proofing.body.cta.button: Try in person
in_person_proofing.body.cta.prompt_detail: Most people who are unable to complete this step online are successful in verifying their identity at a participating Post Office. No appointment needed. Locations are available nationwide.
in_person_proofing.body.expect.heading: What to expect after your visit
in_person_proofing.body.expect.info: We’ll send you an email to let you know if your identity verification was successful or unsuccessful within 24 hours of your visit to the Post Office.
in_person_proofing.body.location.change_location_find_other_locations: Find other participating Post Office locations.
in_person_proofing.body.location.change_location_heading: Need to change your Post Office location?
in_person_proofing.body.location.change_location_info_html: You don’t need to create a new barcode, you can bring this barcode to any participating Post Office location. %{find_other_locations_link_html}
in_person_proofing.body.location.distance.one: '%{count} mile away'
in_person_proofing.body.location.distance.other: '%{count} miles away'
in_person_proofing.body.location.heading: Post Office information
in_person_proofing.body.location.info: No appointment is needed to verify your identity. You can visit any participating Post Office location.
in_person_proofing.body.location.info: No appointment is needed to verify your identity.
in_person_proofing.body.location.inline_error: Enter a valid address with city, state, and ZIP code
in_person_proofing.body.location.location_button: Select
in_person_proofing.body.location.po_search.address_label: Address
Expand Down
5 changes: 4 additions & 1 deletion config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1222,10 +1222,13 @@ in_person_proofing.body.cta.button: Intentar en persona
in_person_proofing.body.cta.prompt_detail: La mayoría de las personas que no pueden hacer la verificación de su identidad en línea logran verificarla en una oficina de correos participante. No es necesario hacer cita para ello, y hay oficinas en todo el país.
in_person_proofing.body.expect.heading: Qué esperar después de la visita
in_person_proofing.body.expect.info: En las 24 horas siguientes a su visita a la oficina de correos, recibirá un correo electrónico para informarle si se logró o no su verificación de identidad.
in_person_proofing.body.location.change_location_find_other_locations: Busque otras oficinas de correos participantes.
in_person_proofing.body.location.change_location_heading: ¿Necesita cambiar su oficina de correos?
in_person_proofing.body.location.change_location_info_html: No necesita crear un nuevo código de barras, puede llevar este código de barras a cualquier oficina de correos participante. %{find_other_locations_link_html}
in_person_proofing.body.location.distance.one: A %{count} milla de distancia
in_person_proofing.body.location.distance.other: A %{count} millas de distancia
in_person_proofing.body.location.heading: Información de la oficina de correos
in_person_proofing.body.location.info: No necesita hacer una cita para verificar su identidad. Puede acudir a cualquier oficina de correos participante.
in_person_proofing.body.location.info: No necesita hacer una cita para verificar su identidad.
in_person_proofing.body.location.inline_error: Ingrese una dirección válida que incluya ciudad, estado y código postal
in_person_proofing.body.location.location_button: Seleccionar
in_person_proofing.body.location.po_search.address_label: Dirección
Expand Down
5 changes: 4 additions & 1 deletion config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1211,10 +1211,13 @@ in_person_proofing.body.cta.button: Essayer en personne
in_person_proofing.body.cta.prompt_detail: La plupart des personnes qui ne parviennent pas à effectuer cette étape en ligne réussissent à confirmer leur identité dans un bureau de poste participant. Sans rendez-vous. Il existe des sites dans l’ensemble du pays.
in_person_proofing.body.expect.heading: Que faire après votre visite
in_person_proofing.body.expect.info: Nous vous enverrons un e-mail pour vous informer de la réussite ou de l’échec de la vérification de votre identité dans les 24 heures suivant votre visite au bureau de poste.
in_person_proofing.body.location.change_location_find_other_locations: Trouvez d’autres bureaux de poste participants.
in_person_proofing.body.location.change_location_heading: Vous devez changer de bureau de poste ?
in_person_proofing.body.location.change_location_info_html: Pas besoin de créer un nouveau code-barres. Vous pouvez apporter le vôtre à n’importe quel bureau de poste participant. %{find_other_locations_link_html}
in_person_proofing.body.location.distance.one: à %{count} mile
in_person_proofing.body.location.distance.other: à %{count} miles
in_person_proofing.body.location.heading: Informations sur les bureaux de poste
in_person_proofing.body.location.info: Aucun rendez-vous n’est nécessaire pour vérifier votre identité. Vous pouvez vous rendre dans n’importe quel bureau de poste participant.
in_person_proofing.body.location.info: Aucun rendez-vous n’est nécessaire pour vérifier votre identité.
in_person_proofing.body.location.inline_error: Saisissez une adresse valide avec la ville, l’État et le code postal
in_person_proofing.body.location.location_button: Sélectionner
in_person_proofing.body.location.po_search.address_label: Adresse
Expand Down
5 changes: 4 additions & 1 deletion config/locales/zh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1224,10 +1224,13 @@ in_person_proofing.body.cta.button: 尝试亲身去
in_person_proofing.body.cta.prompt_detail: 无法在网上完成这一步骤的大多数人都能在一个参与本项目的邮局成功地证实身份。去邮局无需预约。全国各地都有参与本项目的邮局。
in_person_proofing.body.expect.heading: 去邮局后会发生什么
in_person_proofing.body.expect.info: 你去邮局后 24 小时内,我们会给你发电邮,告诉你是否成功验证了身份。
in_person_proofing.body.location.change_location_find_other_locations: 查找其他参与本项目的邮局地点。
in_person_proofing.body.location.change_location_heading: 需要更改你的邮局地点吗?
in_person_proofing.body.location.change_location_info_html: 你不需要创建新的条形码,你可以将这个条形码带到任何参与本项目的邮局。 %{find_other_locations_link_html}
in_person_proofing.body.location.distance.one: 距离你 %{count} 英里
in_person_proofing.body.location.distance.other: 距离你 %{count} 英里
in_person_proofing.body.location.heading: 邮局信息
in_person_proofing.body.location.info: 验证你的身份无需做预约。你可以去任何参与邮局。
in_person_proofing.body.location.info: 验证你的身份无需做预约。
in_person_proofing.body.location.inline_error: 请输入正确地址,包括城市、州和邮编
in_person_proofing.body.location.location_button: 选择
in_person_proofing.body.location.po_search.address_label: 地址
Expand Down
56 changes: 55 additions & 1 deletion spec/mailers/user_mailer_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
require 'rails_helper'

RSpec.describe UserMailer, type: :mailer do
include ActionView::Helpers::UrlHelper

let(:user) { create(:user) }
let(:email_address) { user.email_addresses.first }
let(:banned_email) { 'banned_email+123abc@gmail.com' }
Expand Down Expand Up @@ -762,7 +764,59 @@ def expect_email_body_to_have_help_and_contact_links
end
end

context 'For In-Person Proofing (IPP)' do
context 'Need to change location section' do
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I appreciate how readable these specs are.

context 'when Enhanced IPP is not enabled' do
let(:is_enhanced_ipp) { false }
let(:mail) do
UserMailer.with(user: user, email_address: email_address).in_person_ready_to_verify(
enrollment: enhanced_ipp_enrollment,
is_enhanced_ipp: is_enhanced_ipp,
)
end
it 'renders the change location heading' do
expect(mail.html_part.body).to have_content(
t('in_person_proofing.body.location.change_location_heading'),
)
end

it 'renders the change location info' do
expect(mail.html_part.body).to have_content(
t(
'in_person_proofing.body.location.change_location_info_html',
find_other_locations_link_html:
t('in_person_proofing.body.location.change_location_find_other_locations'),
),
)
end
end
context 'when Enhanced IPP is enabled' do
let(:is_enhanced_ipp) { true }
let(:mail) do
UserMailer.with(user: user, email_address: email_address).in_person_ready_to_verify(
enrollment: enhanced_ipp_enrollment,
is_enhanced_ipp: is_enhanced_ipp,
)
end

it 'does not render the change location heading' do
expect(mail.html_part.body).not_to have_content(
t('in_person_proofing.body.location.change_location_heading'),
)
end

it 'does not render the change location info' do
expect(mail.html_part.body).not_to have_content(
t(
'in_person_proofing.body.location.change_location_info_html',
find_other_locations_link_html:
t('in_person_proofing.body.location.change_location_find_other_locations'),
),
)
end
end
end

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Non-blocking nit request: While you're in this file, could you please change line 819 to specify that it's Informed Delivery IPP (ID-IPP)?

context 'For Informed Delivery In-Person Proofing (ID-IPP)' do
context 'template displays modified content' do
it 'conditionally renders content in the what to expect section applicable to IPP' do
aggregate_failures do
Expand Down
Loading