Skip to content

LG-10337: Update error message when doc classification ≠ state ID#8977

Merged
dawei-nava merged 5 commits intomainfrom
dwang/LG-10337-doc-type-error-trueid
Aug 14, 2023
Merged

LG-10337: Update error message when doc classification ≠ state ID#8977
dawei-nava merged 5 commits intomainfrom
dwang/LG-10337-doc-type-error-trueid

Conversation

@dawei-nava
Copy link
Contributor

@dawei-nava dawei-nava commented Aug 10, 2023

🎫 Ticket

LG-10337:Update error message when doc classification is not state ID

🛠 Summary of changes

Check TrueId response.

@dawei-nava dawei-nava requested review from a team, eileen-nava and night-jellyfish and removed request for a team August 10, 2023 18:19
end

def doc_type_supported?
!doc_class_name.present? || ID_TYPE_SLUGS.key?(doc_class_name) || doc_class_name == 'Unknown'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is unknown what's returned if it's a passport or a type of ID that's not a state ID?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@night-jellyfish , if it's a passport or something else, it should be identified if the document image quality is good.

We can only really say it's not supported if it's clearly identified as an unsupported type.

expect(response.to_h).to include(address_line2_present: true)
end

it 'mark doc type as supported' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a plan to add a test for when a non-supported doc type is submitted (or maybe it exists already)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@night-jellyfish, the same logic tested somewhere else, but adding the test anyway.

@eileen-nava eileen-nava marked this pull request as ready for review August 11, 2023 21:43
@eileen-nava eileen-nava requested a review from kellular August 11, 2023 21:43
@eileen-nava
Copy link
Contributor

The changes you made to the true_id_response and its associated spec look good.

The inline error message only shows up now for the front image, which looks out of sync with the screenshots from the other PR for LG-10337. I attached a video.

InlineErrorOnlyShowsForTopImage.mov

Could you please update this so that it matches the screenshots from the other PR for LG-10337? (I am also tagging @kellular for a design review. Let me know if you disagree about the inline error messages.)

@dawei-nava
Copy link
Contributor Author

The changes you made to the true_id_response and its associated spec look good.

The inline error message only shows up now for the front image, which looks out of sync with the screenshots from the other PR for LG-10337. I attached a video.

InlineErrorOnlyShowsForTopImage.mov
Could you please update this so that it matches the screenshots from the other PR for LG-10337? (I am also tagging @kellular for a design review. Let me know if you disagree about the inline error messages.)

@eileen-nava, is your test file only contains one side of classification info? I was wondering what's the acuant behavior of submitting two sides of different documents. (My request for aws ssm access still pending).

@eileen-nava
Copy link
Contributor

@eileen-nava, is your test file only contains one side of classification info?

Hi! You're correct, that was the issue. I submitted it with a test file that contained both sides' classification info and saw two inline errors. LGTM. 👍🏻

Copy link
Contributor

@eileen-nava eileen-nava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved!

end

def classification_info
# Acuent response has both sides info, here simulate that
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Acuant.

@dawei-nava dawei-nava merged commit 6418466 into main Aug 14, 2023
@dawei-nava dawei-nava deleted the dwang/LG-10337-doc-type-error-trueid branch August 14, 2023 16:56
@jmdembe jmdembe mentioned this pull request Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants