Skip to content

Commit

Permalink
Merge pull request #27 from kanopi/feature/login
Browse files Browse the repository at this point in the history
Make login selectors more specific
  • Loading branch information
thejimbirch authored Mar 24, 2024
2 parents 0d96f0d + f7b9118 commit 18d2838
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions login.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ Cypress.Commands.add('login', (usernameParam = '', password = '') => {
}

if (default_user) {
cy.get('#edit-name').type(username);
cy.get('#edit-pass').type('cypress');
cy.get('form.user-login-form #edit-name').type(username);
cy.get('form.user-login-form #edit-pass').type('cypress');
}
else {
cy.get('#edit-name').type(username);
cy.get('#edit-pass').type(password);
cy.get('form.user-login-form #edit-name').type(username);
cy.get('form.user-login-form #edit-pass').type(password);
}

// Login.
cy.get('.form-submit').click();
cy.get('form.user-login-form .form-submit').click();
cy.wait(500) // Wait for the UI to catch up.

// Check user page loads.
Expand Down

0 comments on commit 18d2838

Please sign in to comment.