This commit is contained in:
2022-05-26 23:47:41 +00:00
parent 16201c399f
commit 33b57bcdcb

View File

@@ -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);