Skip to content

Commit

Permalink
Update e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arbulu89 committed Jun 6, 2024
1 parent 1e69c46 commit f9f8962
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/e2e/cypress/e2e/users.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ describe('Users', () => {

it('should display TOTP enrollment failure if the given code is invalid', () => {
cy.get('button[role="switch"]').click();
cy.get('h2').should('contain', 'Configure TOTP');
cy.get('div').should('contain', 'Your new TOTP secret is');

cy.get('input[placeholder="TOTP code"]').type('invalid');
cy.contains('button', 'Verify').click();
Expand All @@ -311,7 +311,8 @@ describe('Users', () => {

it('should complete TOTP enrollment properly', () => {
cy.get('input[placeholder="TOTP code"]').clear();
cy.get('div:contains("Your new TOTP secret is") > span')
cy.contains("Your new TOTP secret is")
.next()
.invoke('text')
.as('totpSecret');

Expand All @@ -337,7 +338,8 @@ describe('Users', () => {

it('should reconfigure TOTP authentication with a new secret', () => {
cy.get('button[role="switch"]').click();
cy.get('div:contains("Your new TOTP secret is") > span')
cy.contains("Your new TOTP secret is")
.next()
.invoke('text')
.as('totpSecret');

Expand Down

0 comments on commit f9f8962

Please sign in to comment.