From 86f21de0a640f5f168dd66b6b391c03a0d433091 Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Fri, 6 Sep 2024 16:32:10 -0500 Subject: [PATCH] Minor changes to login-modal.cy.ts to cleanup CSS selectors --- cypress/e2e/login-modal.cy.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cypress/e2e/login-modal.cy.ts b/cypress/e2e/login-modal.cy.ts index 3d978dfaca..3fe4658602 100644 --- a/cypress/e2e/login-modal.cy.ts +++ b/cypress/e2e/login-modal.cy.ts @@ -3,31 +3,31 @@ import { testA11y } from 'cypress/support/utils'; const page = { openLoginMenu() { // Click the "Log In" dropdown menu in header - cy.get('ds-header [data-test="login-menu"]').click(); + cy.get('[data-test="login-menu"]').click(); }, openUserMenu() { // Once logged in, click the User menu in header - cy.get('ds-header [data-test="user-menu"]').click(); + cy.get('[data-test="user-menu"]').click(); }, submitLoginAndPasswordByPressingButton(email, password) { // Enter email - cy.get('ds-header [data-test="email"]').type(email); + cy.get('[data-test="email"]').type(email); // Enter password - cy.get('ds-header [data-test="password"]').type(password); + cy.get('[data-test="password"]').type(password); // Click login button - cy.get('ds-header [data-test="login-button"]').click(); + cy.get('[data-test="login-button"]').click(); }, submitLoginAndPasswordByPressingEnter(email, password) { // In opened Login modal, fill out email & password, then click Enter - cy.get('ds-header [data-test="email"]').type(email); - cy.get('ds-header [data-test="password"]').type(password); - cy.get('ds-header [data-test="password"]').type('{enter}'); + cy.get('[data-test="email"]').type(email); + cy.get('[data-test="password"]').type(password); + cy.get('[data-test="password"]').type('{enter}'); }, submitLogoutByPressingButton() { // This is the POST command that will actually log us out cy.intercept('POST', '/server/api/authn/logout').as('logout'); // Click logout button - cy.get('ds-header [data-test="logout-button"]').click(); + cy.get('[data-test="logout-button"]').click(); // Wait until above POST command responds before continuing // (This ensures next action waits until logout completes) cy.wait('@logout');