-
Notifications
You must be signed in to change notification settings - Fork 167
LG-12393: barcode attention should only be shown when image upload is successful #10099
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -78,6 +78,7 @@ def attention_with_barcode? | |||||||||
| end | ||||||||||
|
|
||||||||||
| def ocr_pii | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought we only did anything with this if it was unsuccessful? Noting how the use of it... identity-idp/app/javascript/packages/document-capture/services/upload.ts Lines 119 to 121 in 4926cdd
...is within a block to check for unsuccessful:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👋🏿 @aduth ... for the BarcodeAttentionWarning screen to appear, the barcode attention should be the only reason why the result is failed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like I should probably know this...but what is OCR? I tried doing a quick search but came across references that seemed to range from a concept to a specific org, so I wanted to clarify.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @night-jellyfish , I think OCR here means optical character recognization? |
||||||||||
| return unless success? | ||||||||||
| return unless attention_with_barcode? && @form_response.respond_to?(:pii_from_doc) | ||||||||||
| @form_response.pii_from_doc&.slice(:first_name, :last_name, :dob) | ||||||||||
| end | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,16 +58,15 @@ | |
| attach_images( | ||
| Rails.root.join( | ||
| 'spec', 'fixtures', | ||
| 'ial2_test_credential_barcode_attention_no_dob.yml' | ||
| 'ial2_test_credential_barcode_attention_no_address.yml' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is curious to me, especially given my note above - is there a reason you changed from no dob to no address? I would have thought all pii would behave the same.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also found that this is the only place we use the If we are switching to
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. while debugging this and trying to understand the issue, there was a period where I thought the underlying issue was something different and had created the address file along the way. Having gotten to the bottom of the issue, I understand that it doesn't matter whether it's dob or address. I left the address as because I figured it'd be good to have more test files. |
||
| ), | ||
| ) | ||
| submit_images | ||
|
|
||
| expect(page).to have_content(t('doc_auth.errors.barcode_attention.heading')) | ||
| click_idv_continue | ||
|
|
||
| # should show try again | ||
| expect(page).to have_content(t('doc_auth.errors.alerts.address_check')) | ||
| expect(page).to have_current_path(idv_document_capture_path) | ||
|
|
||
| click_try_again | ||
| attach_images | ||
| submit_images | ||
| expect(page).to have_current_path(idv_ssn_path) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| document: | ||
| first_name: Jane | ||
| last_name: Doe | ||
| middle_name: Q | ||
| city: Bayside | ||
| state: NY | ||
| zipcode: '11364' | ||
| dob: 10/06/1938 | ||
| phone: +1 314-555-1212 | ||
| state_id_jurisdiction: 'NY' | ||
| state_id_number: 'S59397998' | ||
| failed_alerts: | ||
| - name: 2D Barcode Read | ||
| result: Attention |
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 probably doesn't matter too much - but I tried out your testing plan. On your branch it worked perfectly, just as described!
On
main, I did see a little bit of different behavior than your "before" screenshot, so I just wanted to note it here. Instead of seeing the "technical difficulties" message, I got a "barcode" warning screen showing me the pii from the yml, including that the dob was missing, but no dob message.On both
mainand your branch I used a yml file that had an attention with barcode message and a missing DOB.Ultimately since the end result was the same as expected, it's probably not too important, but wanted to note it.
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.
@night-jellyfish , i think there is some front end logic check attention with barcode to display it or not.
Uh oh!
There was an error while loading. Please reload this page.
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.
@night-jellyfish
On front end, we have error and pii(which is the ocr_pii from backend).
identity-idp/app/javascript/packages/document-capture/components/review-issues-step.tsx
Lines 112 to 114 in e479616
Based on LG-5918, it seems suggesting that these ocr_pii fields missing/error can come with Attention with barcode read as the only error(Attention), while other pii errors should cause some cross checking errors too(meaning barcode read is not the only error).
So I am wondering whether we are testing some pii scenarios(not related firstname, lastname and dob, OCRed fileds, like missing address) that were thought not realistic from LG-5918.
@aduth, do you have any insight or memory on this part?