Conversation
|
Not blocking this, but could be worth flagging this with Acuant support folks, due to the inconsistency in the documentation. It looks like they have at least one internal reference to the wrong property name in their own code as well, which might be similarly broken: |
| const ACUANT_CAPTURE_CARDTYPE_ERROR = { ...ACUANT_CAPTURE_SUCCESS_RESULT }; | ||
|
|
||
| delete ACUANT_CAPTURE_CARDTYPE_ERROR.cardtype; | ||
| ACUANT_CAPTURE_CARDTYPE_ERROR.cardType = 2; |
There was a problem hiding this comment.
I'm not entirely clear why we're setting the casing here this way, since the code never references it. To exercise the new default case, would we want to use the correct casing on the property, but a value that's not accounted for (e.g. 3, 4, or undefined explicitly?).
| const ACUANT_CAPTURE_CARDTYPE_ERROR = { ...ACUANT_CAPTURE_SUCCESS_RESULT }; | |
| delete ACUANT_CAPTURE_CARDTYPE_ERROR.cardtype; | |
| ACUANT_CAPTURE_CARDTYPE_ERROR.cardType = 2; | |
| const ACUANT_CAPTURE_CARDTYPE_ERROR = { ...ACUANT_CAPTURE_SUCCESS_RESULT, cardtype: undefined }; |
There was a problem hiding this comment.
Sure, that works! I changed this and did the setup in the test itself.
Yeah, I agree that it would be good to flag to Acuant support folks. Should I reach out to a specific person at Acuant who works with GSA? Or post an issue in the acuant repo? |
I'll follow-up on Slack! |
🎫 Ticket
Check ID 'card type' when using SDK
🛠 Summary of changes
📜 Testing Plan
👀 Screenshots
Here's a screenshot debugger, which shows the cardType/cardtype bug.
Screenshot:
P.S. This seems like it might be a bug in the Acuant SDK, because their documentation indicates that the response from the
onCroppedcallback should usecardType, notcardtype.