Skip to content

LG-11458 Redirect users who choose Opt-in IPP to the beginning of the IPP flow#9598

Merged
gina-yamada merged 41 commits intomainfrom
yamada/LG-11458-OptInIppRedirect
Nov 28, 2023
Merged

LG-11458 Redirect users who choose Opt-in IPP to the beginning of the IPP flow#9598
gina-yamada merged 41 commits intomainfrom
yamada/LG-11458-OptInIppRedirect

Conversation

@gina-yamada
Copy link
Contributor

@gina-yamada gina-yamada commented Nov 15, 2023

🎫 Ticket

LG-11458 Redirect users who choose Opt-in IPP to the beginning of the IPP flow

🛠 Summary of changes

  • No changes in the flow when the in_person_proofing_opt_in_enabled flag is not enabled
  • When the in_person_proofing_opt_in_enabled flag is enabled, ensure you are taken to Verify you identity at a Post Office /verify/document_capture#prepare after picking Verify you identity at a Post Office on /verify/how_to_verify

📜 Testing Plan

Confirm existing behavior is not affected

  • Step 1 Create an account, and get started verifying your identify by going to /verify/welcome. Click continue. Secure your account by checking the radio button on /verify/agreement and clicking continue. Confirm the next url is /verify/hybrid_handoff and the title is How would you like to add your ID? Also confirm the first step of the step indicator is Getting started.
  • Step 2 Click upload your ID. Fail proofing. Confirm you should be taken to /verify/document_capture and the title is We couldn't verify your ID. Click on Try at a Post Office. You should be take to /verify/document_capature#prepare. Confirm title is Verify your identity at a Post Office. Confirm the first step of the step indicator is Find a Post Office.
  • Step 3 Click continue. Confirm you are taken to /verify/document_capture#location. Fill out the form, click search, and select one location. Confirm you are taken to /verify/in_person/state_id.
  • Step 4 Repeat step 1-3 by testing other flows (remote, barcode failure, use your phone to take photos)
  • Step 5 Confirm you cannot change the url to verify/how_to_verify

Confirm existing and new behavior is working as expected

  • Step 1 Add in_person_proofing_opt_in_enabled to application.yml file and set it to true.
  • Step 2 Create an account, and get started verifying your identify by going to /verify/welcome. Click continue. Secure your account by checking the radio button on /verify/agreement and clicking continue. Confirm the next url is /verify/how_to_verify and the title reads Choose how you want to verify your identity.
  • Step 3 Do not make a selection. Click Continue. Confirm you do move forward in the view and that an error message is displayed on the page. (Changing the url is handled in another issue.) This is existing behavior. We are just making sure it is not broke.
  • Step 4 Select Verify your identity online and click continue. Confirm you are taken to verify/hybrid_handoff and the title read How would you like to add your ID? Also confirm that the selected step in the step indicator is Verify your ID. Pick Upload photos. Confirm you are taken to /verify/document_capture. Add two photos to fail proofing and click submit. Confirm the url is /verify/document_capture and pick Try at a Post Office. Confirm you are taken to /verify/document_capature#prepare, the title reads Verify your identity at a Post Office and the first step (and selected) step in the step indicator is Find a Post Office. Clicking continues takes you to /verify/document_capture#location. Ensure we can get to /verify/document_capture#location and the page is working as expected.
  • Step 5 Repeat step step 1-4 but with different flows (remote, barcode error, etc)
  • Step 6 Repeat step 1-2 and select Verify you identity at a Post Office and continue. Confirm you are taken to /verify/document_capture#prepare. Confirm the title reads Verify your identity at a Post Office and the first and selected step in the step indicator is Find a Post Office. Click continue. Confirm you are taken to /verify/document_capture#location
  • Step 7 Repeat step 6 checking the back button

🎥 Videos

Before:
Screen.Recording.2023-11-20.at.3.46.37.PM.mov
After:
Screen.Recording.2023-11-20.at.3.40.31.PM.mov

Sheldon Bachstein and others added 7 commits November 7, 2023 09:52
Pull in partial changes from prototype branch

Finish wiring up opt-in IPP

Add conditional back button on IPP prepare
Still need to delete the now-unused opt_in_ipp page
@gina-yamada gina-yamada marked this pull request as ready for review November 20, 2023 22:53
@gina-yamada gina-yamada requested review from a team and n1zyy November 20, 2023 23:09
@gina-yamada
Copy link
Contributor Author

gina-yamada commented Nov 21, 2023

ℹ️ I am talking with my team to stand up an issue to handle when in_person_proofing_enabled is set to false. This has not been handled. Currently, we would hit the how to verify view and can select IPP. Then the app breaks. It is out of scope for this issue - it is preventing this flow. See slack thread here

Copy link
Contributor

@n1zyy n1zyy left a comment

Choose a reason for hiding this comment

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

This code looks good to me. I have a handful of questions and comments below, some just on account of my being new.

Leaving a comment vs. approval only because I haven't had a chance to run this yet. (Soon, I hope!)

Copy link
Contributor

@soniaconnolly soniaconnolly left a comment

Choose a reason for hiding this comment

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

Overall looks great! Some code cleanup comments. Happy to pair with you on testing to approve if no one else gets to it.

Copy link
Contributor

@soniaconnolly soniaconnolly left a comment

Choose a reason for hiding this comment

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

LGTM, really nice work. One comment still needs addressing, but I'm approving now.

include RenderConditionConcern

before_action :confirm_step_allowed
before_action :confirm_document_capture_not_complete
Copy link
Contributor

Choose a reason for hiding this comment

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

Now that we merged #9589, this needs to be updated again. Sorry we missed setting it for you.

Suggested change
before_action :confirm_document_capture_not_complete
before_action :confirm_verify_info_step_needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@soniaconnolly Done. See commit 4854b8e
At first I was not sure about this. I just reviewed PR#9589 and I now see why this is needed. Thanks for letting me know to add it.

Comment on lines 13 to 19
if idv_session.skip_doc_auth == false
@selection = Idv::HowToVerifyForm::REMOTE
elsif idv_session.skip_doc_auth == true
@selection = Idv::HowToVerifyForm::IPP
else
@selection = nil
end
Copy link
Contributor

Choose a reason for hiding this comment

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

if we wanted to DRY a bit we could assign from the if statement

Suggested change
if idv_session.skip_doc_auth == false
@selection = Idv::HowToVerifyForm::REMOTE
elsif idv_session.skip_doc_auth == true
@selection = Idv::HowToVerifyForm::IPP
else
@selection = nil
end
@selection = if idv_session.skip_doc_auth == false
Idv::HowToVerifyForm::REMOTE
elsif idv_session.skip_doc_auth == true
Idv::HowToVerifyForm::IPP
end

and then we can drop the else block entirely because the result of not matching either branch is that it evaluates to nil

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! I started a refactor on this with commit 655af88 and then saw your comment. I cleaned it up even more with commit ba889ef
Thanks for the suggestion!!

@gina-yamada gina-yamada merged commit c52c381 into main Nov 28, 2023
@gina-yamada gina-yamada deleted the yamada/LG-11458-OptInIppRedirect branch November 28, 2023 20:09
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.

6 participants