Skip to content
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

LG-15294: Integrate Flow Policy with IPP steps - State ID and Address #11815

Merged
merged 10 commits into from
Feb 7, 2025

Conversation

jennyverdeyen
Copy link
Contributor

@jennyverdeyen jennyverdeyen commented Jan 28, 2025

🎫 Ticket

Link to the relevant ticket:
LG-15294

🛠 Summary of changes

During FSM clean-up we discovered that the flow policy was not yet being fully used within the in_person/state_id_controller and in_person/address_controller. The step_info was included but it wasn't yet being called. These changes address that by adding the confirm_step_allowed before_action and refactoring the undo_step lambdas in both the state_id_controller and address_controller, so they could be properly called in the clear_future_steps! Flow Policy step.

📜 Testing Plan

There is no new or changed functionality for manual testing - you will want to test the IPP flow to make sure everything is working as usual.

  • Enter through sinatra, choosing identity-verified for level of service
  • Begin through the in-person flow, stopping at document_capture
  • Try to change the url to /verify/in_person/state_id - there is no establishing enrollment yet so the precondition should fail and you should be redirected to document_capture.
  • Continue through /document_capture and arrive at /in_person/state_id. Do not submit state id yet.
  • Try to change the url to /verify/in_person/address. Because the state id step is not completed yet, the precondition should fail and you should be redirected to state_id.
  • Continue through the in-person flow and successfully create an enrollment.

@jennyverdeyen jennyverdeyen requested review from a team and KeithNava January 28, 2025 17:23
@jennyverdeyen jennyverdeyen force-pushed the jverdeyen/LG-15294-integrate-flow-policy-ipp branch from 395e2cc to 43e41ef Compare January 30, 2025 20:31
@jennyverdeyen jennyverdeyen removed the request for review from KeithNava January 30, 2025 20:35
@eileen-nava eileen-nava self-requested a review February 5, 2025 16:04
Copy link
Contributor

@eileen-nava eileen-nava left a comment

Choose a reason for hiding this comment

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

Approved! I did leave feedback about specs, and would be curious to see your response.

expect(subject).to have_actions(
:before,
:confirm_in_person_state_id_step_complete,
)
expect(subject).to have_actions(
Copy link
Contributor

Choose a reason for hiding this comment

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

Since you added before_action :confirm_step_allowed to the address_controller, would you be up for adding a related expectation? (I was also going to say that the separate expect statements here could be combined. However, I looked through the codebase, and it doesn't look like we have a set pattern of having one expect statement for multiple before actions, or having separate expect statements for each before action. Either way is fine by me.)

@@ -26,7 +26,7 @@
)
Copy link
Contributor

Choose a reason for hiding this comment

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

I left a similar comment on another controller spec: what are your thoughts on adding an expectation to check for the before_action confirm_step_allowed?

@jennyverdeyen jennyverdeyen force-pushed the jverdeyen/LG-15294-integrate-flow-policy-ipp branch from 7e58171 to 8f36dfc Compare February 7, 2025 15:05
@jennyverdeyen jennyverdeyen force-pushed the jverdeyen/LG-15294-integrate-flow-policy-ipp branch from 8f36dfc to bcc109b Compare February 7, 2025 15:13
@jennyverdeyen jennyverdeyen merged commit 910c5f0 into main Feb 7, 2025
2 checks passed
@jennyverdeyen jennyverdeyen deleted the jverdeyen/LG-15294-integrate-flow-policy-ipp branch February 7, 2025 15:45
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