Skip to content

LG-7187: Send Customer Experience Follow-up Email for In-Person Proofing#7046

Merged
NavaTim merged 17 commits intomainfrom
tbradley/lg-7187-follow-up-survey-email
Sep 30, 2022
Merged

LG-7187: Send Customer Experience Follow-up Email for In-Person Proofing#7046
NavaTim merged 17 commits intomainfrom
tbradley/lg-7187-follow-up-survey-email

Conversation

@NavaTim
Copy link
Contributor

@NavaTim NavaTim commented Sep 29, 2022

🎫 Ticket

🛠 Summary of changes

  • Send survey email to users after they:
    • Pass in-person identity verification, and
    • Share the verified information with the partner who requested the verification
  • Fix unreliable steps that interfered with automated survey email feature tests

📜 Testing Plan

Provide a checklist of steps to confirm the changes.

  • Complete and pass the in-person proofing process through a partner
    • For dev environments:
      $ rails console
      [1] pry(main)> enrollment = InPersonEnrollment.last
      [2] pry(main)> enrollment.update(status: :passed)
      [3] pry(main)> enrollment.profile.activate
      
  • Login using that partner in a manner that requires IAL2
  • Agree to share the IAL2 information with the partner
  • Check email for the survey

👀 Screenshots

Emails as they appear in Mailcatcher:

English:

ipp_survey_en

Spanish:

ipp_survey_es

French:

ipp_survey_fr

@NavaTim NavaTim requested review from a team, eileen-nava and rutvigupta-design and removed request for a team September 29, 2022 00:38
Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

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

Couple minor comments, but overall LGTM! 👍

Comment on lines +50 to +51
# Wait for page to load before selecting location
expect(page).to have_css('.location-collection-item')
Copy link
Contributor

Choose a reason for hiding this comment

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

Will have_css actually wait without a wait: parameter given, or will it assert against the current page?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to the Capybara spec, has_css should wait for the content.

Copy link
Contributor

Choose a reason for hiding this comment

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

According to the Capybara spec, has_css should wait for the content.

Neat!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The default_max_wait_time shown in the test is set to 0.5 for 18F/identity-idp on local stacks and 5 in Gitlab CI.

Comment on lines +186 to +189
[
:oidc,
:saml,
].each do |service_provider|
Copy link
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

end

def send_in_person_completion_survey
return unless sp_session_ial == 2
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the significance of 2 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This requires that the user be sharing attributes verified via IAL2 with the partner in order to trigger the survey email (as opposed to IAL1 or IAL3). Note that this current usage excludes the IAL "strict" mode.

This value is passed as an attribute from the partner. The value then gets mapped to the IAL constants (in a session value) during authentication.

@NavaTim NavaTim merged commit f6dfc90 into main Sep 30, 2022
@NavaTim NavaTim deleted the tbradley/lg-7187-follow-up-survey-email branch September 30, 2022 17:07
@aduth aduth mentioned this pull request Oct 3, 2022
jskinne3 pushed a commit that referenced this pull request Oct 12, 2022
…ing (#7046)

* LG-7187: Add follow-up survey field to in-person enrollments table

* LG-7187: Start implementing email for follow-up survey

* LG-7187: Style survey email and send on next partner sign-in

* LG-7187: Send survey when user shares info with partner; add fallback test URL for survey

* LG-7187: Test new survey DB query methods; format code

* LG-7187: Expand tests; require IAL2 usage to send survey email

* LG-7187: Add more tests relating to IPP survey email

* LG-7187: Finish writing feature test for in-person proofing survey email

* LG-7187: Fix unreliable tests and make IPP account creation reusable

* changelog: Upcoming Features, In-person proofing, Send Customer Experience Follow-up Email

* LG-7187: Add missing method to UserMailerPreview

* LG-7187: Improve query tests; update English survey email translation

* LG-7187: Combine paragraphs and use default margins/padding for survey email

* LG-7187: Reference constant for IAL2 in IPP completion survey logic

* LG-7187: Increase margin for paragraph above button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants