Skip to content

LG-10289: Change Error Message for Image Cropping (On Document Upload)#8860

Merged
charleyf merged 8 commits intomainfrom
charley/lg-10289/change-cropping-error-message
Aug 25, 2023
Merged

LG-10289: Change Error Message for Image Cropping (On Document Upload)#8860
charleyf merged 8 commits intomainfrom
charley/lg-10289/change-cropping-error-message

Conversation

@charleyf
Copy link
Contributor

@charleyf charleyf commented Jul 25, 2023

🎫 Ticket

https://cm-jira.usa.gov/browse/LG-10289

🛠 Summary of changes

This PR is a replacement for #8849 with some logic revisions. It changes the onImageCaptureFailure callback to show a more generic error message when cropping fails.

📜 Testing Plan

This testing can only be done by engineers with local environments. Unfortunately, it's not currently possible to reliably reproduce a cropping error in any other env.

  1. Checkout this branch
    • git checkout charley/lg-10289/change-cropping-error-message
  2. Apply the cropping-reproduction changes:
    • git checkout charley/messy-cropping-error-trigger -- public/acuant/11.8.2/AcuantCamera.min.js
  3. Set up your local environment for mobile dev and run your local env with HOST=0.0.0.0 make run-https
  4. On your mobile app, get to the page with the "FRONT" and "BACK" uploading targets.
  5. Click "FRONT" and note that you see the words "TAP TO CAPTURE" instead of the yellow-auto-capture box and countdown.
  6. Aim your camera at your desktop (or cover the lens with a finger) and tap the screen to capture an image with no ID in it.
  7. After capturing the image, on the same upload page you should see an error that says "Oops, something went wrong. Please try again."
  8. You should not see the error that says "Camera failed to start, please try again."

👀 Screenshots

Before:

IMG_0091

After:

IMG_0092

@charleyf charleyf changed the title LB-10289: Change Error Message for Image Cropping (On Document Upload) LG-10289: Change Error Message for Image Cropping (On Document Upload) Jul 26, 2023
@charleyf charleyf closed this Aug 1, 2023
@charleyf charleyf reopened this Aug 24, 2023
@charleyf charleyf marked this pull request as ready for review August 24, 2023 18:27
Copy link
Contributor

@night-jellyfish night-jellyfish left a comment

Choose a reason for hiding this comment

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

I walked through the testing plan and it worked! 🎉

I posted a couple of comments about testing, but otherwise it looks great so I am approving.

@charleyf charleyf merged commit 64e3a36 into main Aug 25, 2023
@charleyf charleyf deleted the charley/lg-10289/change-cropping-error-message branch August 25, 2023 15:29
@mdiarra3 mdiarra3 mentioned this pull request Aug 29, 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.

2 participants