From c6d3cfa654e4c648a1ad1f296624818acddb818d Mon Sep 17 00:00:00 2001 From: CANCI0 Date: Fri, 26 Apr 2024 17:34:20 +0200 Subject: [PATCH] =?UTF-8?q?M=C3=A1s=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webapp/e2e/steps/add-friend.steps.js | 6 ++++-- webapp/e2e/steps/play-calculator.steps.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/webapp/e2e/steps/add-friend.steps.js b/webapp/e2e/steps/add-friend.steps.js index 36e6d6e5..6575d2f6 100644 --- a/webapp/e2e/steps/add-friend.steps.js +++ b/webapp/e2e/steps/add-friend.steps.js @@ -101,8 +101,10 @@ defineFeature(feature, (test) => { when("I add the user as a friend", async () => { await page.waitForTimeout(1000); - localStorage.setItem("username", "testuser"); - localStorage.setItem("token", "testtoken"); + await page.evaluate(() => { + localStorage.setItem("username", "testuser"); + localStorage.setItem("token", "testtoken"); + }); await page.goto("http://localhost:3000/social/usuarios", { waitUntil: "networkidle0", diff --git a/webapp/e2e/steps/play-calculator.steps.js b/webapp/e2e/steps/play-calculator.steps.js index 3758a1cf..fc4a0c4f 100644 --- a/webapp/e2e/steps/play-calculator.steps.js +++ b/webapp/e2e/steps/play-calculator.steps.js @@ -25,7 +25,7 @@ defineFeature(feature, (test) => { localStorage.setItem("token","abcdefg"); }); - await page.goto("http://localhost:3000/home/calculadora", { + await page.goto("http://localhost:3000/home/", { waitUntil: "networkidle0", });