-
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.
[Embed][WebComponent] Support both hide back and hide back to host (#376
) * Support both hide back and hide back to host Change from embed package to use web-components file dependency * Bump package version Update change log * Add test * fix lint
- Loading branch information
Showing
13 changed files
with
138 additions
and
72 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
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
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
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
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
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
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
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
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
61 changes: 61 additions & 0 deletions
61
packages/web-components/cypress/e2e/smart-camera-web-hide-back-to-host.cy.js
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,61 @@ | ||
describe('SmartCameraWeb', () => { | ||
beforeEach(() => { | ||
cy.visit('/capture-back-of-id-navigation'); | ||
}); | ||
|
||
it('shows attribution by default', () => { | ||
cy.get('smart-camera-web') | ||
.shadow() | ||
.find('selfie-capture-instructions') | ||
.should('be.visible'); | ||
cy.get('smart-camera-web') | ||
.shadow() | ||
.find('selfie-capture-instructions') | ||
.shadow() | ||
.should('contain.text', "Next, we'll take a quick selfie"); | ||
cy.get('smart-camera-web') | ||
.shadow() | ||
.find('selfie-capture-instructions') | ||
.shadow() | ||
.find('smileid-navigation') | ||
.shadow() | ||
.find('.back-button') | ||
.should('be.visible'); | ||
cy.get('smart-camera-web') | ||
.shadow() | ||
.find('selfie-capture-instructions') | ||
.shadow() | ||
.find('#cancel') | ||
.should('be.visible'); | ||
}); | ||
|
||
it('hides back exit and cancel button when `hide-back-to-host` attribute is passed', () => { | ||
cy.get('smart-camera-web') | ||
.invoke('attr', 'hide-back-to-host', 'true') | ||
.should('have.attr', 'hide-back-to-host', 'true'); | ||
|
||
cy.get('smart-camera-web') | ||
.shadow() | ||
.find('selfie-capture-instructions') | ||
.should('be.visible'); | ||
cy.get('smart-camera-web') | ||
.shadow() | ||
.find('selfie-capture-instructions') | ||
.shadow() | ||
.should('contain.text', "Next, we'll take a quick selfie"); | ||
cy.get('smart-camera-web') | ||
.shadow() | ||
.find('selfie-capture-instructions') | ||
.shadow() | ||
.find('smileid-navigation') | ||
.shadow() | ||
.get('.back-button') | ||
.should('not.exist'); | ||
cy.get('smart-camera-web') | ||
.shadow() | ||
.find('selfie-capture-instructions') | ||
.shadow() | ||
.get('#cancel') | ||
.should('not.exist'); | ||
}); | ||
}); |
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