Skip to content

Commit

Permalink
Merge branch 'e2e-fixes' of https://github.com/Arquisoft/wiq_es1a int…
Browse files Browse the repository at this point in the history
…o e2e-fixes
  • Loading branch information
CANCI0 committed Apr 26, 2024
2 parents baf6174 + b1bc9c7 commit 9df946f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 5 additions & 2 deletions webapp/e2e/steps/play-battery.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ defineFeature(feature, (test) => {
: await puppeteer.launch({ headless: 'new', slowMo: 100 });
page = await browser.newPage();
setDefaultOptions({ timeout: 10000 });

await page.goto("http://localhost:3000", {
await page.evaluate(() => {
localStorage.setItem("username","testuser");
localStorage.setItem("token","abcdefg");
});
await page.goto("http://localhost:3000/home/bateria", {
waitUntil: "networkidle0",
});
await page.setRequestInterception(true);
Expand Down
8 changes: 5 additions & 3 deletions webapp/e2e/steps/play-calculator.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ defineFeature(feature, (test) => {
: await puppeteer.launch({ headless: "new", slowMo: 100 });
page = await browser.newPage();
setDefaultOptions({ timeout: 10000 });

await page.evaluate(() => {
localStorage.setItem("username","testuser");
localStorage.setItem("token","abcdefg");
});

await page.goto("http://localhost:3000/home/calculadora", {
waitUntil: "networkidle0",
});
Expand Down Expand Up @@ -72,8 +76,6 @@ defineFeature(feature, (test) => {
then,
}) => {
given("A logged-in user", async () => {
localStorage.setItem("username","testuser");
localStorage.setItem("token","abcdefg");

await page.waitForTimeout(1000);
await page.waitForXPath(
Expand Down

0 comments on commit 9df946f

Please sign in to comment.