diff --git a/webapp/e2e/steps/login-form.steps.js b/webapp/e2e/steps/login-form.steps.js index e0cad621..b643568e 100644 --- a/webapp/e2e/steps/login-form.steps.js +++ b/webapp/e2e/steps/login-form.steps.js @@ -83,6 +83,12 @@ defineFeature(feature, (test) => { await page.type("#login-username", username); await page.waitForSelector("#login-password"); await page.type("#login-password", password); + + await page.evaluate(() => { + localStorage.setItem("username",username); + localStorage.setItem("token","abcdefg"); + }); + await page.click("button", { text: "Login" }); }); diff --git a/webapp/e2e/steps/register-form.steps.js b/webapp/e2e/steps/register-form.steps.js index e2831536..df2ff179 100644 --- a/webapp/e2e/steps/register-form.steps.js +++ b/webapp/e2e/steps/register-form.steps.js @@ -96,18 +96,24 @@ defineFeature(feature, (test) => { when("I fill the data in the form and press submit", async () => { username = generateUUID(); - password = generateUUID(); + password = "HOLApass1234"; await page.waitForSelector("#register-username"); await page.type("#register-username", username); await page.waitForSelector("#register-password"); await page.type("#register-password", password); await page.waitForSelector("#register-pass2"); await page.type("#register-pass2", password); + + await page.evaluate(() => { + localStorage.setItem("username",username); + localStorage.setItem("token","abcdefg"); + }); + await page.click("button", { text: "Registrarse" }); }); then("The home screen should be shown", async () => { - await page.waitForTimeout(1000); + await page.waitForTimeout(2000); const url = page.url(); expect(url).toContain("/home"); browser.close();