From d0555a1122da26c3365ee0a67642a2a3cd42c157 Mon Sep 17 00:00:00 2001 From: KateChuen <45409515+KateChuen@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:31:07 -0400 Subject: [PATCH] fixing password-visibility e2e test (#18673) --- .../password-visibility.e2e.cy.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/password-visibility/password-visibility.e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/password-visibility/password-visibility.e2e.cy.ts index 7e902247d5b..8e201c69af0 100644 --- a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/password-visibility/password-visibility.e2e.cy.ts +++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/password-visibility/password-visibility.e2e.cy.ts @@ -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'); });