LG-3207: incorporate selfie in document capture step#3929
Conversation
97d20cf to
3a26dfe
Compare
|
@solipet Including two mockups here with design suggestions: 1 with just my two biggest priority changes, and 1 with two more revisions if you have time: At minimum:
If possible (if you don't have time to do this now, no worries - we can revisit later):
Let me know if you have any questions or if any of these are a pain. Thanks so much! |
| selfie_response = post_selfie(image: selfie_image, instance_id: instance_id) | ||
| [selfie_response, pii] | ||
| else | ||
| results |
There was a problem hiding this comment.
Looks like this line is uncovered. I think it makes sense for us to drop in a unit test for what happens if posting the selfie fails.
@anniehirshman-gsa Implemented all - here's a new screenshot: |
|
It looks perfect! Thank you @solipet! |
1d1e20e to
11479f4
Compare
d7afb03 to
c7a78bb
Compare
There was a problem hiding this comment.
this ===== looks like a merge error?
c7a78bb to
753d2fa
Compare
| let(:facial_match_url) { URI.join(Figaro.env.acuant_facial_match_url, '/api/v1/facematch') } | ||
| let(:liveness_url) { URI.join(Figaro.env.acuant_passlive_url, '/api/v1/liveness') } | ||
|
|
||
| it 'sends an upload image request for the front, back, and selfie images' do |
There was a problem hiding this comment.
Do we need to enable liveness for this spec? It looks like otherwise it ignores the selfie.
I noticed the gap in the coverage above. Maybe a test case for this w/ selfie enabled and selfie disabled?
| ) | ||
|
|
||
| result = subject.post_images( | ||
| result, _pii = subject.post_images( |
There was a problem hiding this comment.
This doesn't return PII anymore, right?
95c2c51 to
4bc7b00
Compare
f1cc396 to
3d5b1d4
Compare
| end | ||
|
|
||
| # rubocop:disable Metrics/AbcSize | ||
| def post_images(front_image:, back_image:, selfie_image:, |
There was a problem hiding this comment.
I think we can drop the instance ID here, right?
config/locales/errors/es.yml
Outdated
| token_missing: falta el token | ||
| confirm_password_incorrect: La contraseña es incorrecta. | ||
| doc_auth: | ||
| document_capture_info_html: |- |
There was a problem hiding this comment.
We need to remember to translate these before we merge
|
|
||
| # making a new method to avoid breaking the existing flow | ||
| def save_pii_in_session(pii) | ||
| flow_session[:pii_from_doc] = pii.merge( |
There was a problem hiding this comment.
Looks like this is uncovered, but I also can't find where it is used. I think if we pulled this out we'd fix our coverage woes.
| <%= render 'idv/doc_auth/start_over_or_cancel' %> | ||
| <%= javascript_pack_tag 'image-preview' %> | ||
| </div> | ||
| <%= javascript_pack_tag 'document-capture' %> |
There was a problem hiding this comment.
I think this may have been the artifact of a rebase after #3922 was merged. I don't think this change should be here. In #3922, it was moved higher in the file, and now there's two script tags that unfortunately conflict with one another 😬
**Why**: So the React component renders in the page See: #3929 (comment)
* Disable prop type validation for test files **Why**: These restrictions are useful for runtime components, but unnecessary overhead for written tests. * Create stub React submission upload component flow **Why**: While the API endpoints for submitting the document upload form values does not yet exist, it can be abstracted as a function which receives a payload object and returns a Promise resolving or rejecting by the result of an attempt to upload. This implements Suspense-based asynchronous component handling, and introduces an optional upload context used in tests to replace the submission handler with a mock value. * Remove duplicate script pack tag **Why**: So the React component renders in the page See: #3929 (comment)
|
|
||
| <%= f.input :selfie_image_data_url, as: :hidden %> | ||
| <%= f.input :selfie_image, label: false, as: :file, required: true, wrapper_class: 'mt3 sm-col-8' %> | ||
| <div class='my2' id='selfie_target'> |
There was a problem hiding this comment.
Just noting that this tag is unclosed.
| <div class='my2' id='selfie_target'> | |
| <div class='my2' id='selfie_target'></div> |
I encountered it in #3986. Not sure it's the cause of the errors there, but it was the source of some confusion in trying to keep the static rendered "Start over" and "Cancel" buttons, and them not showing 😅 I'll plan to include a fix for it with those changes.



As a user, I want to complete all of my doc_auth image uploads in one form so I can proof with a vendor that doesn't allow staggered uploads.
This PR adds the selfie upload to the document_capture_step. It's now one big long form with input fields to allow uploading the front/back of the DL and the selfie image.