Skip to content

New SSN Controller behind a feature flag#7810

Merged
soniaconnolly merged 25 commits intomainfrom
sonia-lg-8733-init-ssn-controller
Feb 15, 2023
Merged

New SSN Controller behind a feature flag#7810
soniaconnolly merged 25 commits intomainfrom
sonia-lg-8733-init-ssn-controller

Conversation

@soniaconnolly
Copy link
Contributor

@soniaconnolly soniaconnolly commented Feb 10, 2023

🎫 Ticket

LG-8733

🛠 Summary of changes

  • Add SsnController (and controller and feature tests) to replace Flow State Machine SsnStep and RedoSsnStep
  • Add ssn/show.html.erb view, copied from SsnStep view
  • VerifyInfoController redirects to new SsnController when feature flag is enabled, if no ssn present or if user clicks to edit ssn
  • DocumentCaptureStep redirects to new SsnController when feature flag is enabled, when step is complete
  • All changes behind feature flag doc_auth_ssn_controller_enabled, which defaults to false in prod
  • Add StepUtilitiesConcern to extract code common to SsnController and VerifyInfoController

📜 Testing Plan

  • Before setting feature flags, check that current behavior and urls are unchanged in /verify flow
  • Set doc_auth_ssn_controller_enabled to true in local application.yml
  • Also set doc_auth_verify_info_controller_enabled to true (until feature flag is removed on main and this branch is rebased)
  • Create an account
  • Navigate to /verify
  • Go through verify steps. Check that ssn step url is /verify/ssn (no doc_auth).
  • Ssn view itself should be unchanged (StepIndicator, text, etc.)
  • Enter invalid ssns, check for error catching behavior
  • Try editing ssn in Verify Info step and check url. Check view for changes.
  • Try skipping ahead to Verify Info (/verify/verify_info) from various places in the flow and check redirect url

soniaconnolly and others added 22 commits February 9, 2023 16:18
has show route
renders 404 if feature flag not set
Co-authored-by: Jonathan Hooper <jonathan.hooper@gsa.gov>
Co-authored-by: Eric Gade <eric.gade@gsa.gov>
To allow better naming for future standalone controllers extracted from the FSM

Co-authored-by: Eric Gade <eric.gade@gsa.gov>
Add feature test (which doesn't pass yet)
Correct :put url in ssn show template
Co-authored-by Doug Price <douglas.price@gsa.gov>
Co-authored-by Eric Gade <eric.gade@gsa.gov>
Change step count key not to be ssn to avoid triggering SensitiveKey exception on session

Co-authored-by: Doug Price <douglas.price@gsa.gov>
Co-authored-by: Alex Bradley <alexander.bradley@gsa.gov>
Add test in verify_info_step_spec for ssn redo action and analytics
changelog: Internal, refactor, remove ssn step from fsm (feature flagged)
Also rename VerifyInfoConcern to StepUtilitiesConcern
and redirects to SsnController if it is set.
@soniaconnolly soniaconnolly marked this pull request as ready for review February 10, 2023 21:37
@soniaconnolly soniaconnolly requested review from a team and jmhooper February 10, 2023 21:37
@soniaconnolly soniaconnolly merged commit f2c903b into main Feb 15, 2023
@soniaconnolly soniaconnolly deleted the sonia-lg-8733-init-ssn-controller branch February 15, 2023 19:45
Comment on lines +27 to +28
acuant_sdk_upgrade_ab_test_bucket:
AbTests::ACUANT_SDK.bucket(capture_session_uuid),
Copy link
Contributor

Choose a reason for hiding this comment

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

style nit, I'd indent this for clarity

Suggested change
acuant_sdk_upgrade_ab_test_bucket:
AbTests::ACUANT_SDK.bucket(capture_session_uuid),
acuant_sdk_upgrade_ab_test_bucket:
AbTests::ACUANT_SDK.bucket(capture_session_uuid),

Comment on lines +139 to +145
def ssn_updated!
# Guard against unvalidated attributes from in-person flow in review controller
session[:applicant] = nil

invalidate_verify_info_step!
invalidate_phone_step!
end
Copy link
Contributor

Choose a reason for hiding this comment

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

to me, the name was confusing here compared to what the method does, WDYT about invalidate_steps_before_ssn!?

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 can change it to invalidate_steps_after_ssn!

Comment on lines 104 to +105
</div>
<% if IdentityConfig.store.doc_auth_ssn_controller_enabled %>
Copy link
Contributor

Choose a reason for hiding this comment

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

I would indent this whole block and line it up with the </div> above? If the worry was about diff noise, we can always suggest reviews hide whitespace

Suggested change
</div>
<% if IdentityConfig.store.doc_auth_ssn_controller_enabled %>
</div>
<% if IdentityConfig.store.doc_auth_ssn_controller_enabled %>

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