-
Notifications
You must be signed in to change notification settings - Fork 166
LG-7187: Send Customer Experience Follow-up Email for In-Person Proofing #7046
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
b72147a
44b903c
ed5d48c
7ed9379
7e019a0
65e9a8f
f00702a
b648e0c
f8cee4c
9901546
49ebd45
7e3a060
ec79ee8
2ddaecb
09a5fd0
9fc5791
b5601ad
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 |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| module Idv | ||
| module InPerson | ||
| class CompletionSurveySender | ||
| ## | ||
| # @param [User] user | ||
| # @param [String] issuer | ||
| def self.send_completion_survey(user, issuer) | ||
svalexander marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| return unless user.should_receive_in_person_completion_survey?(issuer) | ||
|
|
||
| user.confirmed_email_addresses.each do |email_address| | ||
| UserMailer.in_person_completion_survey( | ||
| user, | ||
| email_address, | ||
| ).deliver_now_or_later | ||
| end | ||
|
|
||
| user.mark_in_person_completion_survey_sent(issuer) | ||
| end | ||
| end | ||
| end | ||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| <p><%= t('user_mailer.in_person_completion_survey.body.greeting') %></p> | ||
| <p><%= t('user_mailer.in_person_completion_survey.body.thanks', app_name: APP_NAME) %></p> | ||
| <p> | ||
| <%= t('user_mailer.in_person_completion_survey.body.intent') %> | ||
| <%= t('user_mailer.in_person_completion_survey.body.request_description') %> | ||
| <%= t( | ||
| 'user_mailer.in_person_completion_survey.body.privacy_html', | ||
| url: @privacy_url, | ||
| ) %> | ||
| </p> | ||
| <p class="margin-bottom-4"><%= t('user_mailer.in_person_completion_survey.body.cta.callout') %></p> | ||
|
|
||
| <table class="button expanded large radius"> | ||
| <tbody> | ||
| <tr> | ||
| <td> | ||
| <table> | ||
| <tbody> | ||
| <tr> | ||
| <td> | ||
| <center> | ||
| <%= link_to t('user_mailer.in_person_completion_survey.body.cta.label'), | ||
| @survey_url, | ||
| target: '_blank', | ||
| class: 'float-center', | ||
| align: 'center', | ||
| rel: 'noopener' %> | ||
| </center> | ||
| </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| </td> | ||
| <td class="expander"> | ||
| </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| class AddFollowUpSurveySentToInPersonEnrollment < ActiveRecord::Migration[7.0] | ||
| def change | ||
| add_column :in_person_enrollments, :follow_up_survey_sent, :boolean, default: false | ||
| end | ||
| end |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
|
|
||
| RSpec.describe 'In Person Proofing', js: true do | ||
| include IdvStepHelper | ||
| include SpAuthHelper | ||
| include InPersonHelper | ||
|
|
||
| before do | ||
|
|
@@ -176,6 +177,29 @@ | |
| end | ||
| end | ||
|
|
||
| context 'after in-person proofing is completed and passed for a partner' do | ||
| let(:sp) { nil } | ||
| before do | ||
| create_in_person_ial2_account_go_back_to_sp_and_sign_out(sp) | ||
| end | ||
|
|
||
| [ | ||
| :oidc, | ||
| :saml, | ||
| ].each do |service_provider| | ||
|
Comment on lines
+186
to
+189
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you think there's value in exercising this for both SP protocols, or could we just do one? Reason I ask is that these tests can be quite slow to run.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's valuable to have at least one IPP feature test covering both SP protocols, and to my knowledge this is the only one. |
||
| context "using #{service_provider}" do | ||
| let(:sp) { service_provider } | ||
| it 'sends a survey when they share information with that partner', | ||
| allow_browser_log: true do | ||
| expect(last_email.html_part.body). | ||
| to have_selector( | ||
| "a[href='#{IdentityConfig.store.in_person_completion_survey_url}']", | ||
| ) | ||
| end | ||
| end | ||
| end | ||
| end | ||
|
|
||
| context 'with hybrid document capture' do | ||
| before do | ||
| allow(FeatureManagement).to receive(:doc_capture_polling_enabled?).and_return(true) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.