Skip to content

Commit 3efc574

Browse files
Adding wait on login
1 parent 4755af2 commit 3efc574

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cypress/support/commands/login.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Cypress.Commands.add('login', (user = 'admin', password = 'smartvm') => {
77

88
cy.get('#user_name').type(user);
99
cy.get('#user_password').type(password);
10-
return cy.get('#login').click();
10+
cy.interceptApi({
11+
alias: 'invokeLogin',
12+
urlPattern: '/dashboard/authenticate?button=login',
13+
triggerFn: () => cy.get('#login').click(),
14+
});
1115
});
12-

0 commit comments

Comments
 (0)