LG-7943: Avoid showing in-person option for field validation errors#7254
LG-7943: Avoid showing in-person option for field validation errors#7254
Conversation
changelog: Bug Fixes, In-person proofing, Show in-person option at intended troubleshooting scenarios
| ))} | ||
| {isLastStep ? <FormStepsButton.Submit /> : <FormStepsButton.Continue />} | ||
| <DocumentCaptureTroubleshootingOptions hasErrors={!!errors.length} /> | ||
| <DocumentCaptureTroubleshootingOptions /> |
There was a problem hiding this comment.
I wonder if hasErrors should be renamed to something more specific to IPP hasDocCaptureErrors or something
There was a problem hiding this comment.
I wonder if
hasErrorsshould be renamed to something more specific to IPPhasDocCaptureErrorsor something
I was on the fence about making some further revisions to the props, because I also think there's some redundancy between showInPersonOption and hasErrors, at least in how they're both currently used exclusively in determining whether to show in-person troubleshooting options.
For example, we could collapse them to a single prop, and maybe name it in such a way that allows for future off-ramp alternative proofing options to use (e.g. showAlternativeProofingOptions), especially since we're also still considering inPersonURL to control whether the feature is available for the current service provider.
There was a problem hiding this comment.
I wonder if
hasErrorsshould be renamed to something more specific to IPPhasDocCaptureErrorsor somethingI was on the fence about making some further revisions to the props [...]
I gave this a shot in dfad071.
There was a problem hiding this comment.
Love it! Way more semantic. Ty.
| expect(queryByText('idv.troubleshooting.options.verify_in_person')).not.to.exist(); | ||
| await userEvent.click(getByText('forms.buttons.submit.default')); | ||
| expect(queryByText('idv.troubleshooting.options.verify_in_person')).not.to.exist(); |
There was a problem hiding this comment.
Test expanded to capture bug
There was a problem hiding this comment.
Test expanded to capture bug
I'd contemplated not including any spec coverage here, since the way it had been implemented was as as additive feature of the documents step, and ideally I'd be removing whichever spec had asserted its presence, but one did not exist. But with all the different conditions involved in rendering troubleshooting options, I figured it wouldn't hurt to check that it's not visible when we're not expecting it to be.
🎫 Ticket
LG-7943
🛠 Summary of changes
Updates display of document capture troubleshooting option to avoid rendering in-person call-to-action when field validation errors exist.
📜 Testing Plan
yarn testpasses👀 Screenshots
Before:
After: