Skip to content

Commit

Permalink
fixing password-visibility e2e test (#18673)
Browse files Browse the repository at this point in the history
  • Loading branch information
KateChuen authored Mar 26, 2024
1 parent da1efb4 commit d0555a1
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,27 @@ context('Password Visibility', () => {
cy.get('button[aria-label="Show password"]').should('be.visible');

//type password and assert
cy.get('input[aria-label="Password"]').should(
cy.get('input[aria-label="Enter Your Password"]').should(
'have.attr',
'type',
'password'
);
cy.get('input[aria-label="Password"]').type('abc');
cy.get('input[aria-label="Password"]').should('have.value', 'abc');
cy.get('input[aria-label="Enter Your Password"]').type('abc');
cy.get('input[aria-label="Enter Your Password"]').should(
'have.value',
'abc'
);

cy.get('button[aria-label="Show password"]').click();
cy.get('input[aria-label="Password"]').should(
cy.get('input[aria-label="Enter Your Password"]').should(
'have.attr',
'type',
'text'
);
cy.get('input[aria-label="Password"]').should('have.value', 'abc');
cy.get('input[aria-label="Enter Your Password"]').should(
'have.value',
'abc'
);
cy.get('button[aria-label="Hide password"]').should('be.visible');
});

Expand Down

0 comments on commit d0555a1

Please sign in to comment.