-
Notifications
You must be signed in to change notification settings - Fork 115
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-10465 Add update route for address controller #9489
Conversation
|
||
analytics.idv_in_person_proofing_residential_address_submitted(**form_result.to_h) | ||
|
||
if updating_address? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@soniaconnolly since I'm doing this check here and redirecting to verify_info do I still need the check mentioned in this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll have to test it out to make sure, but I believe that you do, because the before_action will redirect away from the Ssn step if the user already has an address in the session, the way they do when they're editing from VerifyInfo. It looks like you did add it below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If i manually change the url to in_person/state_id when on the in_person_proofing/address page it redirects to in_person/address. Any thoughts on how I might fix that @soniaconnolly ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re: redirecting to the FSM step from the previous step, let's make a failing spec and look at the redirects and see if we can figure this out. (I think we started on that.)
|
||
analytics.idv_in_person_proofing_residential_address_submitted(**form_result.to_h) | ||
|
||
if updating_address? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll have to test it out to make sure, but I believe that you do, because the before_action will redirect away from the Ssn step if the user already has an address in the session, the way they do when they're editing from VerifyInfo. It looks like you did add it below.
redirect_to idv_in_person_ssn_url | ||
return if request.referer == idv_in_person_verify_info_url | ||
redirect_to idv_in_person_verify_info_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The referer check looks good (although I've been discovering lately that relying on the referer is not ideal). Why are you redirecting to verify_info instead of ssn at the end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm using confirm_ssn_step_needed
instead to redirect to ssn. Line 99 will redirect us to verify info in case a user changes the url to in_person_proofing/address
after having completed all the steps.
def confirm_ssn_step_needed | ||
if pii_from_user&.has_key?(:address1) && !idv_session.ssn | ||
redirect_to idv_in_person_ssn_url | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need this check here? I would think the SsnController would do this check if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i added it in to handle someone manually entering in_person_proofing/address
on the ssn pg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re: redirecting to the FSM step from the previous step, let's make a failing spec and look at the redirects and see if we can figure this out. (I think we started on that.)
FormValidation is not working for this page on input fields (other than zipcode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks like good stuff to me! I left a couple small questions/suggestions below, but certainly nothing blocking.
I think I would prefer to let another teammate approve this, just because I'm new to this flow and it's probably best if someone with more familiarity with it could give this a once-over.
@svalexander Everything I have tested is working as I'd expect except for the back button. When I click back I see this page and then get directed to phone. (Cancel- initial page visit is working as I'd expect) ✅ UI Is accurate for update (link/button/header) |
Worked through code changes & tests with Shannon and Sonia. Back button is now working! Shannon and Sonia are still working through some changes so not going to approve at this time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We reviewed this together in detail along with @gina-yamada, looks great!
👋 hi this PR didn't have have a changelog entry in the commit message after it was merged, please make sure to add one next time |
@zachmargolis My mistake. I didn't get a ci/cd error due to the changelog to catch the mistake. How do I make sure the changelog message is present for this pr for the next deploy? |
When you click "Squash and Merge" just make sure to preserve the |
Looking back at my commit history it looks like i never added a changelog message :-( . |
🎫 Ticket
LG-10465
🛠 Summary of changes
Add update route for the new address controller. Also add more before actions to ensure user who manually changes url is routed to the correct page.
📜 Testing Plan
Provide a checklist of steps to confirm the changes.
in_person_proofing/address
in_person_proofing/address
in_person/address
in_person/state_id
in_person/ssn
in_person/address
in_person_proofing/address