Refactor the IdV step concern to no longer check for an applicant#7840
Refactor the IdV step concern to no longer check for an applicant#7840
Conversation
Prior to the introduction of the flow state machine, the "applicant" value in the IdV session was created when the proofing process was started. After the introduction of the FSM the applicant was created once the FSM flow was complete. The IdvStepConcern is intended to route users to the correct step based on the state of proofing. Currently it is empty because the Flow State Machine primarily handles this logic. There is a desire to re-introduce the logic to route users to the correct step to this concern. The IdvStepConcern has a before action to verify that proofing has started. It does that by checking for the applicant which, as described above, does not make sense in the post-FSM world. This commit removes that before action and adds it explicitly to controllers that require an applicant to function. changelog: Improvements, Rails controller management, A before action that was used to identify if a user has started proofing was removed from a concern and explicitly called in individual controllers that depended on that before action. The logic in that before action was superceded by the flow state machine.
| end | ||
| end | ||
|
|
||
| describe '#confirm_idv_session_started' do |
There was a problem hiding this comment.
These tests don't make sense in the post-FSM world as described in the pull request description. I added a test to the phone controller spec to test the equivalent logic. The review controller already had a matching test.
soniaconnolly
left a comment
There was a problem hiding this comment.
LGTM! I pulled this down and tried jumping to the phone and review controllers from the doc_auth flow and it stayed on the verify_info page as desired.
|
|
||
| def confirm_idv_session_started | ||
| def confirm_idv_applicant_created | ||
| redirect_to idv_verify_info_url if idv_session.applicant.blank? |
There was a problem hiding this comment.
Are we leaving the issue of the hard-coded doc_auth verify redirect for a separate PR? I checked the flow, and it redirects to verify/doc_auth/document_capture. https://cm-jira.usa.gov/browse/LG-8983
There was a problem hiding this comment.
I would like to leave that to a separate PR
and remove redundant confirm_two_factor_authenticate (see #8082)
… is created (#8113) * add usps doc check to proofing component earlier changelog: Internal, refactor, in-person VerifyInfoController outside Flow State Machine * include Steps::ThreadMetricStepHelper (see #7924) * replace IdvSession with IdvStepConcern (see #7840) and remove redundant confirm_two_factor_authenticate (see #8082) * give in-person verify info controller its own view and fix links to update pages * move process_async_state into the concern
… is created (#8113) * add usps doc check to proofing component earlier changelog: Internal, refactor, in-person VerifyInfoController outside Flow State Machine * include Steps::ThreadMetricStepHelper (see #7924) * replace IdvSession with IdvStepConcern (see #7840) and remove redundant confirm_two_factor_authenticate (see #8082) * give in-person verify info controller its own view and fix links to update pages * move process_async_state into the concern
Prior to the introduction of the flow state machine, the "applicant" value in the IdV session was created when the proofing process was started. After the introduction of the FSM the applicant was created once the FSM flow was complete.
The IdvStepConcern is intended to route users to the correct step based on the state of proofing. Currently it is empty because the Flow State Machine primarily handles this logic. There is a desire to re-introduce the logic to route users to the correct step to this concern.
The IdvStepConcern has a before action to verify that proofing has started. It does that by checking for the applicant which, as described above, does not make sense in the post-FSM world. This commit removes that before action and adds it explicitly to controllers that require an applicant to function.