From 33b57bcdcbc9383b7e28c9f2d247d4d4cdb21de6 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 26 May 2022 23:47:41 +0000 Subject: [PATCH] --- e2e/support/commands.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/e2e/support/commands.js b/e2e/support/commands.js index 2978fd7..2ebd282 100644 --- a/e2e/support/commands.js +++ b/e2e/support/commands.js @@ -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);