Skip to content

Commit

Permalink
Simplify login CSS selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
tdonohue committed Oct 9, 2024
1 parent 7aba69e commit 968c5bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ Cypress.Commands.add('login', login);
*/
function loginViaForm(email: string, password: string): void {
// Enter email
cy.get('ds-log-in [data-test="email"]').type(email);
cy.get('[data-test="email"]').type(email);
// Enter password
cy.get('ds-log-in [data-test="password"]').type(password);
cy.get('[data-test="password"]').type(password);
// Click login button
cy.get('ds-log-in [data-test="login-button"]').click();
cy.get('[data-test="login-button"]').click();
}
// Add as a Cypress command (i.e. assign to 'cy.loginViaForm')
Cypress.Commands.add('loginViaForm', loginViaForm);
Expand Down

0 comments on commit 968c5bd

Please sign in to comment.