-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enh: improve document capture, fix icon buttons, add capture tips (#36)
* redesign: change back button icon / font color * redesign: switch close icon * redesign: reinstate tips for back of document capture * redesign: remove auto margin for actions on id entry screens * enh: add "Skip this step" button for back of id photo this shows up only when a document-type does not exist * 1.0.0-beta.23 * redesign: use image-frame to crop id image
- Loading branch information
1 parent
6fab3f2
commit 1e3896e
Showing
4 changed files
with
295 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
context('SmartCameraWeb - Skip Back of ID Document Capture', () => { | ||
beforeEach(() => { | ||
cy.visit('/capture-back-of-id'); | ||
}); | ||
|
||
context('when a document type does not exist', () => { | ||
it('should switch from the back of ID entry screen to the thanks screen on clicking the "Skip this step" button', () => { | ||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#request-camera-access') | ||
.click(); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#start-image-capture') | ||
.click(); | ||
|
||
cy | ||
.wait(8000); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#select-selfie') | ||
.click(); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#id-entry-screen') | ||
.should('be.visible'); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#id-entry-screen #take-photo') | ||
.click(); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#id-entry-screen') | ||
.should('not.be.visible'); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#capture-id-image') | ||
.click(); | ||
|
||
cy | ||
.wait(2000); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#select-id-image') | ||
.click(); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#back-of-id-entry-screen') | ||
.should('be.visible'); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#back-of-id-entry-screen #skip-this-step') | ||
.click(); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#back-of-id-entry-screen') | ||
.should('not.be.visible'); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#thanks-screen') | ||
.should('be.visible'); | ||
}); | ||
}); | ||
|
||
context('when a document-type exists', () => { | ||
beforeEach(() => { | ||
cy | ||
.get('smart-camera-web') | ||
.invoke('attr', 'document-type', 'GREEN_BOOK'); | ||
}); | ||
|
||
it('should not show the "skip this step" button', () => { | ||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#request-camera-access') | ||
.click(); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#start-image-capture') | ||
.click(); | ||
|
||
cy | ||
.wait(8000); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#select-selfie') | ||
.click(); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#id-entry-screen') | ||
.should('be.visible'); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#id-entry-screen #take-photo') | ||
.click(); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#id-entry-screen') | ||
.should('not.be.visible'); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#capture-id-image') | ||
.click(); | ||
|
||
cy | ||
.wait(2000); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#select-id-image') | ||
.click(); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#back-of-id-entry-screen') | ||
.should('be.visible'); | ||
|
||
cy | ||
.get('smart-camera-web') | ||
.shadow() | ||
.find('#back-of-id-entry-screen #skip-this-step') | ||
.should('not.exist'); | ||
}); | ||
}); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.