LG-11667: Add FE Tests for Selfie Feature#9676
Conversation
app/javascript/packages/document-capture/components/acuant-selfie-capture-canvas.jsx
Outdated
Show resolved
Hide resolved
| }); | ||
|
|
||
| context('mobile selfie', () => { | ||
| it('renders the selfie capture loading div in acuant-capture', async () => { |
There was a problem hiding this comment.
I have a hard time believing that this is the only test that needs to be added in this file, but I couldn't come up with any additional tests that made sense to me. Really, I want to test the full "user click the input, then closes" type flow, but that doesn't seem to be possible here.
There was a problem hiding this comment.
Do you think that's covered by https://github.com/18F/identity-idp/pull/9677/files?
One thing I thought my test was missing was looking at the SDK...but it seems your tests cover that, and maybe the one I wrote covers the click flow.
As I type that "out loud" though, I'm not sure, since my test just attaches the file and doesn't cover actually clicking.
spec/javascript/packages/document-capture/components/acuant-selfie-capture-canvas-spec.jsx
Outdated
Show resolved
Hide resolved
spec/javascript/packages/document-capture/components/acuant-selfie-capture-canvas-spec.jsx
Outdated
Show resolved
Hide resolved
night-jellyfish
left a comment
There was a problem hiding this comment.
I put a couple of comments with nonblocking suggestions.
I can't think of more tests to add, especially without being able to test the SDK behavior itself in the code. Perhaps manual testing and finding edge cases before release will lead us to think of more tests.
* changelog: Internal, Doc Auth, Add feature test for selfie ## 🎫 Ticket [LG-11670](https://cm-jira.usa.gov/browse/LG-11670) ## 🛠 Summary of changes Adding a small feature test for the selfie flow, now that we have a selfie back end and front end. ## 🎶 Technical notes This ticket was more about manual testing and writing tickets and less about changing code, but I did find myself writing this test as part of the work, and figured it might be worth keeping. Given the tests that were added in #9561 and #9676, I also wasn't able to come up with many other tests that might be needed. It seems like maybe there's another place for a front / back end integration spec that I'm missing. I'm open to feedback if folks think there are other tests that might be needed.
Co-authored-by: Brittany Greaner <35475380+night-jellyfish@users.noreply.github.com>
Co-authored-by: Brittany Greaner <35475380+night-jellyfish@users.noreply.github.com>
🎫 Ticket
https://cm-jira.usa.gov/browse/LG-11667
🛠 Summary of changes
This PR adds tests for the selfie feature added in LG-11377 (PR #9580)
📜 Testing Plan
This PR only adds automated tests on the FE so the testing plan is
yarn testand make sure everything passes. However, I'm more interested in whether these tests provide us with good coverage. Specifically around thedocument-capturecomponent.