-
Notifications
You must be signed in to change notification settings - Fork 166
LG-11666 Add Post Office search link to barcode page and emails #11520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -275,5 +275,22 @@ | |
| </div> | ||
| <% end %> | ||
|
|
||
| <% if !@is_enhanced_ipp %> | ||
|
||
| <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> | ||
| 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' } | ||
|
|
@@ -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 | ||
|
||
| 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 | ||
|
|
||
|
||
| 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 | ||
|
|
||
There was a problem hiding this comment.
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
unlessoverif !, but I know unless is controversial. It be would nice if we could change this toif @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 !versusunless?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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
unlesshatred!😱
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
unlessvsif !but I stuck withif !here because it was being used that way earlier in the same file. I kind of like the idiomatic feel ofunlessbut now I wonder if I should avoid it in the future so as not to upset reviewers 😛There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh. I slightly prefer
unlessbecause 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 theif !syntax into this template and found that I approved it. 🙃 I guess my past self didn't feel strongly, either!