Skip to content

LG-11318 unify SsnController templates#9547

Merged
soniaconnolly merged 13 commits intomainfrom
sonia-lg-11318-unify-ssn-controllers
Nov 6, 2023
Merged

LG-11318 unify SsnController templates#9547
soniaconnolly merged 13 commits intomainfrom
sonia-lg-11318-unify-ssn-controllers

Conversation

@soniaconnolly
Copy link
Contributor

@soniaconnolly soniaconnolly commented Nov 3, 2023

🎫 Ticket

LG-11318

🛠 Summary of changes

Both the remote and in person identity verification flows have an SsnController, and they look and behave the same. This PR gives them a shared template, and makes the controller code more alike.

Other changes:

  • The controllers now use flash[:error] instead of an @error_message instance variable.
  • The in person SsnController incidentally now displays the previously entered SSN when updating the SSN.

Differences still include:

  • before_actions confirming the previous step
  • the url that follows successful submission of this step (idv_verify_info_url or idv_in_person_verify_info_url)
  • analytics_id ('Doc Auth' or 'In Person Proofing') and extra analytics properties that are specific to the in person flow

We could pull out the common code into an SsnConcern similar to the shared VerifyInfoConcern, but in this case the shared code is short enough that the benefit doesn't outweigh the lost readability. We can revisit after implementing the browser back button and FlowPolicy for this step, since that will simplify the code further and make it more similar.

📜 Testing Plan

  • Create account, start IdV
  • Upload documents and continue with remote flow
  • On Ssn step, try to continue with invalid Ssn
  • Expect remote step indicator
  • Expect error message
  • Try to continue with "failure" Ssn (not starting with 666- or 900- )
  • Expect VerifyInfo to get an error
  • "Try Again"
  • Click Update next to Ssn on VerifyInfo
  • Expect "Update your Social Security number" title and previous Ssn to be present
  • Update to something starting with 666- or 900-
  • Continue and expect to successfully submit VerifyInfo
  • Cancel and start over
  • Upload yaml that fails DocumentCapture to enter In Person flow
  • Proceed to Ssn step
  • Expect in person step indicator
  • Same steps as above

Copy link
Contributor

Choose a reason for hiding this comment

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

This is in the comments on both templates. It looks like you have refactored this into a lie.

@jmhooper jmhooper mentioned this pull request Nov 6, 2023
@jmhooper jmhooper force-pushed the sonia-lg-11318-unify-ssn-controllers branch from 7f40487 to 6ee1999 Compare November 6, 2023 19:16
@soniaconnolly soniaconnolly requested review from a team and gina-yamada November 6, 2023 19:21
Copy link
Contributor

@gina-yamada gina-yamada left a comment

Choose a reason for hiding this comment

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

Walked through code changes with Sonia. IPP and remote flow both working as expected.

@soniaconnolly soniaconnolly merged commit 1ca89b5 into main Nov 6, 2023
@soniaconnolly soniaconnolly deleted the sonia-lg-11318-unify-ssn-controllers branch November 6, 2023 22:38
@matthinz matthinz mentioned this pull request Nov 6, 2023
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.

3 participants