This commit is contained in:
@@ -43,12 +43,13 @@ Cypress.Commands.add("ayLogin", (user, urlAfterLogin) => {
|
||||
urlAfterLogin = "/ay-evaluate";
|
||||
}
|
||||
cy.visit("/login");
|
||||
cy.get("input[name=username]").clear();
|
||||
cy.get("input[name=password]").clear();
|
||||
|
||||
cy.get("input[name=username]").clear().type(Cypress.env(user).login);
|
||||
|
||||
// {enter} causes the form to submit
|
||||
cy.get("input[name=password]")
|
||||
.clear()
|
||||
cy.get("input[name=password]").clear()
|
||||
.type(`${Cypress.env(user).password}{enter}`);
|
||||
|
||||
cy.url().should("include", urlAfterLogin);
|
||||
|
||||
Reference in New Issue
Block a user