Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ayinloya committed Aug 9, 2024
1 parent ee0ee85 commit 5f98213
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ class SelfieCaptureScreen extends HTMLElement {

const supportAgentMode = await this.supportsAgentMode();

if (supportAgentMode && !this.hasAttribute('disable-for-tests')) {
if (supportAgentMode || this.hasAttribute('show-agent-mode-for-tests')) {
this.switchCamera.hidden = false;
} else {
this.switchCamera.hidden = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ context('SmartCameraWeb', () => {
cy.get('smart-camera-web')
.shadow()
.find('selfie-capture')
.invoke('attr', 'disable-for-tests', 'true');
.invoke('attr', 'show-agent-mode-for-tests', 'true');

cy.clock();
cy.get('smart-camera-web')
Expand All @@ -22,6 +22,19 @@ context('SmartCameraWeb', () => {
.find('selfie-capture')
.should('be.visible');

cy.get('smart-camera-web')
.shadow()
.find('selfie-capture')
.shadow()
.should('contain.text', 'Selfie Mode');

cy.get('smart-camera-web')
.shadow()
.find('selfie-capture')
.shadow()
.find('#switch-camera')
.click();

cy.get('smart-camera-web')
.shadow()
.find('selfie-capture')
Expand Down

0 comments on commit 5f98213

Please sign in to comment.