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
7 changes: 6 additions & 1 deletion app/mailers/user_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,12 @@ def in_person_completion_survey
with_user_locale(user) do
@header = t('user_mailer.in_person_completion_survey.header')
@privacy_url = MarketingSite.security_and_privacy_practices_url
@survey_url = IdentityConfig.store.in_person_completion_survey_url
if locale == :en
@survey_url = IdentityConfig.store.in_person_opt_in_available_completion_survey_url
else
@survey_url = IdentityConfig.store.in_person_completion_survey_url
end

mail(
to: email_address.email,
subject: t('user_mailer.in_person_completion_survey.subject', app_name: APP_NAME),
Expand Down
1 change: 1 addition & 0 deletions config/application.yml.default
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ in_person_enrollments_ready_job_queue_url: ''
in_person_enrollments_ready_job_visibility_timeout_seconds: 30
in_person_enrollments_ready_job_wait_time_seconds: 20
in_person_full_address_entry_enabled: true
in_person_opt_in_available_completion_survey_url: 'https://handbook.login.gov'
Comment thread
eileen-nava marked this conversation as resolved.
in_person_outage_emailed_by_date: 'November 1, 2024'
# in_person_outage_expected_update_date and in_person_outage_emailed_by_date below
# are strings in the format 'Month day, year'
Expand Down
1 change: 1 addition & 0 deletions lib/identity_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ def self.store
config.add(:in_person_enrollments_ready_job_visibility_timeout_seconds, type: :integer)
config.add(:in_person_enrollments_ready_job_wait_time_seconds, type: :integer)
config.add(:in_person_full_address_entry_enabled, type: :boolean)
config.add(:in_person_opt_in_available_completion_survey_url, type: :string)
config.add(:in_person_outage_emailed_by_date, type: :string)
config.add(:in_person_outage_expected_update_date, type: :string)
config.add(:in_person_outage_message_enabled, type: :boolean)
Expand Down
2 changes: 1 addition & 1 deletion spec/features/idv/in_person_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
allow_browser_log: true do
expect(last_email.html_part.body).
to have_selector(
"a[href='#{IdentityConfig.store.in_person_completion_survey_url}']",
"a[href='#{IdentityConfig.store.in_person_opt_in_available_completion_survey_url}']",
)
end
end
Expand Down
31 changes: 27 additions & 4 deletions spec/mailers/user_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -975,10 +975,33 @@ def expect_email_body_to_have_help_and_contact_links
to have_selector(
"a[href='#{MarketingSite.security_and_privacy_practices_url}']",
)
expect(mail.html_part.body).
to have_selector(
"a[href='#{IdentityConfig.store.in_person_completion_survey_url}']",
)
end

context 'when the user locale is English' do
before do
user.email_language = 'en'
user.save!
end

it 'renders the post opt-in in person completion survey url' do
expect(mail.html_part.body).
to have_selector(
"a[href='#{IdentityConfig.store.in_person_opt_in_available_completion_survey_url}']",
)
end
end

context 'when the user locale is not English' do
before do
user.email_language = 'fr'
user.save!
end
it 'renders the pre opt-in in person completion survey url' do
expect(mail.html_part.body).
to have_selector(
"a[href='#{IdentityConfig.store.in_person_completion_survey_url}']",
)
end
end
end
end
Expand Down
3 changes: 3 additions & 0 deletions spec/support/features/doc_auth_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ def complete_doc_auth_steps_before_document_capture_step(expect_accessible: fals
complete_doc_auth_steps_before_hybrid_handoff_step(expect_accessible: expect_accessible)
# JavaScript-enabled mobile devices will skip directly to document capture, so stop as complete.
return if page.current_path == idv_document_capture_path
if IdentityConfig.store.in_person_proofing_opt_in_enabled
click_on t('forms.buttons.continue_remote')
end
complete_hybrid_handoff_step
expect_page_to_have_no_accessibility_violations(page) if expect_accessible
end
Expand Down
5 changes: 4 additions & 1 deletion spec/support/features/session_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,10 @@ def user_verified_with_gpo
end

def user_with_totp_2fa
create(:user, :fully_registered, :with_authentication_app, password: VALID_PASSWORD)
create(
:user, :fully_registered, :with_authentication_app, password: VALID_PASSWORD,
email_language: 'en'
)
end

def user_with_phishing_resistant_2fa
Expand Down