Skip to content

Commit a34994a

Browse files
committed
update
1 parent fcd8fa9 commit a34994a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cypress/support/commands.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Cypress.Commands.add('adminLogIn', () => {
2-
const username = cy.openmage.login.admin.username.value;
3-
const password = cy.openmage.login.admin.password.value;
2+
const username = cy.openmage.login.admin.username;
3+
const password = cy.openmage.login.admin.password;
44

55
cy.visit('/admin');
66

7-
cy.log(`Logging in as ${username}`);
8-
cy.get('#username').clear().type(username).should('have.value', username);
9-
cy.get('#login').clear().type(password).should('have.value', password);
10-
cy.get('.form-button').click();
7+
cy.log(`Logging in as ${username.value}`);
8+
cy.get(username._id).clear().type(username.value).should('have.value', username.value);
9+
cy.get(password._id).clear().type(password.value).should('have.value', password.value);
10+
cy.get(cy.openmage.login.admin._submit.__selector).click();
1111

1212
cy.log('Checking for successful login');
1313
cy.url().should('include', '/dashboard/index');

0 commit comments

Comments
 (0)