Conversation
|
I think we also need add identity-idp/app/services/doc_auth/mock/result_response.rb Lines 21 to 27 in 436969d And also test for the value in spec. expect(response.extra[:liveness_enabled]).to eq(false/true) |
| attention_with_barcode: attention_with_barcode? || other.attention_with_barcode?, | ||
| doc_type_supported: doc_type_supported? || other.doc_type_supported?, | ||
| selfie_status: selfie_status, | ||
| selfie_live: selfie_live?, |
There was a problem hiding this comment.
Response to this:
I think that confusingly we already have selfie_status tests in various specs. Search for "xpect(response.selfie_status).to eq to find a few.
There was a problem hiding this comment.
@charleyf, my point is that expect(response.extra[:liveness_checking_required]).to eq(false/true) should work properly for result_response, unless we add it to extra of result_response , the following method in presenter will always be false for mock client
def show_selfie_failures?
@form_response.extra[:liveness_checking_required] == true
endI think variable name liveness_enabled changed to liveness_checking_required
There was a problem hiding this comment.
I could be wrong, but I think what @dawei-nava is saying in the linked comment is that extra hash in the mock proofer should match the extra in the real acuant response.
But, I might not quite be understanding that right. From what I can see the liveness_enabled is included in the Mock Proofer's response here. But I could see an argument for adding the selfie status.
Maybe I'm way off base here though.
There was a problem hiding this comment.
Oh and while I was typing out my response I see Dawei replied! I'm still wrapping my head around it but I think maybe my comment was wrong, and I misunderstood.
There was a problem hiding this comment.
Yes, this following basically is the contract between the presenter and response(mock or trueid etc). The presenter expects it can fetch @form_response.extra[:liveness_checking_required]
def show_selfie_failures?
@form_response.extra[:liveness_checking_required] == true
endThere was a problem hiding this comment.
To clarify what I meant, I just pushed a check to the result_response_spec.rb to show it does not contains the information the presenter expected.
There was a problem hiding this comment.
Thank you both for clarifying and thanks for adding that test Dawei.
I think variable name liveness_enabled changed to liveness_checking_required
I'm not sure what happened, but I do think that I'm going to address it by changing liveness_enabled to liveness_checking_required in the mock proofer.
dawei-nava
left a comment
There was a problem hiding this comment.
LGTM.
I assume that the selfie_status is already fetched in FE.
🎫 Ticket
https://cm-jira.usa.gov/browse/LG-12080
🛠 Summary of changes
This PR sends the
selfie_statusfrom the BE to the FE so we can show appropriate error messages (see this PR).📜 Testing Plan
test_selfie_with_face_match_fail.ymlfor all three of front/back/selfiemake watch_eventsmake watch_eventsor in cloudwatch)"name": "IdV: doc auth image upload vendor submitted"event