LG-9489 Hybrid mobile document capture controller#8243
Conversation
d564944 to
f4b66d7
Compare
app/controllers/concerns/idv/hybrid_mobile/hybrid_mobile_concern.rb
Outdated
Show resolved
Hide resolved
a27f9aa to
db6d479
Compare
Just need the session id for this.
Was resolving relative to /verify for pages in Idv module.
…mobile side of hybrid idv flow
(We only need the session uuid)
Don't need it
8139750 to
6a51160
Compare
Rather than a separate feature test for the capture complete step, incorporate its checks into the feature test for the full hybrid flow.
We don't have a flow_session to work with
|
|
||
| def page_with_trust? | ||
| return false if current_page?(controller: 'users/sessions', action: 'new') | ||
| return false if current_page?(controller: '/users/sessions', action: 'new') |
There was a problem hiding this comment.
When rendering layouts/base from idv/hybrid_mobile/document_capture_controller, rails would attempt to resolve users/session here as idv/users/sessions, which would error out. Prefixing this with a / fixed it (which, I did not realize directory-style controller references could do that), but there may be some tweaks to routing or something that could obviate the need for this.
Add a spec for the AcuantConcern
| @@ -0,0 +1,39 @@ | |||
| module Idv | |||
| module AcuantConcern | |||
There was a problem hiding this comment.
This concern shows how I'm thinking code sharing can work between hybrid and non-hybrid flows--it depends on the controller itself to implement document_capture_session_uuid, and does not contain references to e.g. flow_session
soniaconnolly
left a comment
There was a problem hiding this comment.
Looks great overall! Let me know if you want to sync up on the changes I made to desktop DocumentCaptureController while deleting the feature flag.
| document_capture_session_uuid: document_capture_session_uuid, | ||
| flow_path: 'hybrid', | ||
| sp_name: decorated_session.sp_name, | ||
| failure_to_proof_url: idv_doc_auth_return_to_sp_url, |
There was a problem hiding this comment.
Another recent change in the desktop DocumentCapture code, make this take a failure_to_proof_url variable that gets set directly rather than taking a detour through a route to DocAuthController#return_to_sp.
There was a problem hiding this comment.
It's used in the shared template. It's reachable when there's a barcode error or something like that, which I think could happen on mobile too.
spec/controllers/idv/hybrid_mobile/document_capture_controller_spec.rb
Outdated
Show resolved
Hide resolved
|
At some point we'll need to move the STEP_INDICATOR_STEPS out of CaptureDocFlow. Maybe when we delete the feature flag and delete that whole flow. |
…_spec.rb Co-authored-by: Sonia Connolly <sonia.connolly@gsa.gov>
soniaconnolly
left a comment
There was a problem hiding this comment.
Tested locally and it worked! LGTM.
|
Okey doke, I'm going to land in the interest of moving this forward! |
🎫 Ticket
LG-9489
🛠 Summary of changes
The current "hybrid" document capture flow (the thing where you text yourself a special link you can use to take pictures of your ID with your phone) relies on the flow state machine.
This PR adds the third of three new controllers to replace the flow state machine version of this codepath.
The hybrid flow was always a strange beast, since the user is not technically "logged in" while they are uploading their documents--they have the ability to upload documents related to a specific
DocumentCaptureSession.Most of this PR is copy/pasting document-capture related code and specs, and adapting it slightly to work in a hybrid flow context where none of the following are available:
user_sessionflow_sessionidv_sessionWhere code can be shared between the hybrid flow and other idv controllers, this sharing is done with concerns that depend on controllers implementing a
document_capture_session_uuidmethod. In the hybrid flow, that uuid is read fromsession, whereas in IdV, it comes out offlow_session. There will be more cleanup / refactoring work to do after this lands and we migrate production traffic to this route.📜 Testing Plan
Provide a checklist of steps to confirm the changes.
doc_auth_hybrid_mobile_controllers_enabledfeature flag in yourapplication.yml/verify/documents--that is the path for this new set of controllers