LG-11012: redo document capture bug fixes#9256
Conversation
7786219 to
57c3528
Compare
14bf3e3 to
1ee42e3
Compare
soniaconnolly
left a comment
There was a problem hiding this comment.
Overall looks great. Thanks for digging into all this! Several comments, but the only blocking one is investigating whether memoization of @session_result is causing problems.
There was a problem hiding this comment.
I would not have thought of resetting that here! And I would have assumed that it would be too early, but if tests are passing my assumption would clearly be wrong.
There was a problem hiding this comment.
fair point. this is relatively consistent with resetting the redo flag in the standard flow. We also don't have use for this redo_document_capture after the link sent step in the hybrid flow
There was a problem hiding this comment.
you were correct ... moved appropriately to link_sent#update ... thanks! 👍🏿
There was a problem hiding this comment.
I like this definition, very practical. "Have we done this already?" I think it will be resilient as we enable the back button, too.
Would it make sense to define it as DocumentCaptureSession#redo?(captured_at:) to avoid repeating the definition in DocumentCaptureController ?
There was a problem hiding this comment.
yes i wanted to do that. however, this line is the blocker ... do you knowi is this load_async still necessary? 🤔
There was a problem hiding this comment.
Don't know off-hand. @aduth might know if it's part of the doc auth async code. Happy to dig in with you if that would be helpful.
There was a problem hiding this comment.
Yes, I think the load_doc_auth_async_result is related to the now-defunct (as of #8377) async document capture code. So it would probably be safe to remove all of that.
There was a problem hiding this comment.
thanks @aduth ... after briefly testing out the removal of load_doc_auth_async_result .. i think it'd be best to remove it in a follow up PR
app/controllers/idv/hybrid_mobile/document_capture_controller.rb
Outdated
Show resolved
Hide resolved
spec/controllers/idv/hybrid_mobile/document_capture_controller_spec.rb
Outdated
Show resolved
Hide resolved
b5a1026 to
4f5452b
Compare
soniaconnolly
left a comment
There was a problem hiding this comment.
Tested locally, and when I upload a yml file with a different name on the second DocumentCapture (used first standard, then hybrid), it doesn't update the name in VerifyInfo. It also still shows the warning at the top, even if I refresh the page.
Using standard and standard, VerifyInfo changes as expected.
There was a problem hiding this comment.
Don't know off-hand. @aduth might know if it's part of the doc auth async code. Happy to dig in with you if that would be helpful.
… in doc cap session
Co-authored-by: Sonia Connolly <sonia.connolly@gsa.gov>
4f5452b to
4f0ba64
Compare
f8496f2 to
bf1f93a
Compare
There was a problem hiding this comment.
Thanks for digging in to all this and sorting it out! LGTM, with a couple more small comments.
I tested standard/standard, standard/hybrid, and hybrid/hybrid, and they all work as expected.
Noticed that if someone enters a Puerto Rico address on a redo, they don't get prompted to edit their address (since the SSN step is skipped the second time), so entered LG-11201 for that.
| def new_session_result | ||
| DocumentCaptureSessionResult.new( | ||
| id: generate_result_id, | ||
| captured_at: Time.zone.now, | ||
| ) | ||
| end |
There was a problem hiding this comment.
It looks like you didn't end up using this method.
| :attention_with_barcode, | ||
| :failed_front_image_fingerprints, | ||
| :failed_back_image_fingerprints, | ||
| :captured_at, |
There was a problem hiding this comment.
Is there any issue with existing document_capture_sessions in redis not having this attribute?
There was a problem hiding this comment.
great catch ... added dig(:captured_at) to check if it exists before evaluating 👍🏿
Co-authored-by: Sonia Connolly <sonia.connolly@gsa.gov>
…ithub.com:18F/identity-idp into amirbey/sonia-hybrid-mobile-redo-document-capture
…d captured_at not yet stored in redis
🎫 Ticket
LG-11012
🛠 Summary of changes
📜 Testing Plan
Scenario1: Standard doc auth + hybrid redo doc auth
Scenario2: hybrid doc auth + hybrid redo doc auth