From c1695a075d5a05aba7c8a04fe1f3dbda2a26fd0e Mon Sep 17 00:00:00 2001 From: CANCI0 Date: Fri, 26 Apr 2024 15:31:20 +0200 Subject: [PATCH] A ver ahora --- webapp/e2e/steps/logout.steps.js | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/webapp/e2e/steps/logout.steps.js b/webapp/e2e/steps/logout.steps.js index 0243868b..4867df57 100644 --- a/webapp/e2e/steps/logout.steps.js +++ b/webapp/e2e/steps/logout.steps.js @@ -23,19 +23,21 @@ defineFeature(feature, (test) => { }) .catch(() => {}); - await page.setRequestInterception(true); - page.on('request', (req) => { - if (req.method() === 'OPTIONS'){ - req.respond({ - status: 200, - headers: { - 'Access-Control-Allow-Origin': '*', - 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS', - 'Access-Control-Allow-Headers': '*' - } - }); - } else {req.continue();} - }); + await page.setRequestInterception(true); + page.on("request", (req) => { + if (req.method() === "OPTIONS") { + req.respond({ + status: 200, + headers: { + "Access-Control-Allow-Origin": "*", + "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS", + "Access-Control-Allow-Headers": "*", + }, + }); + } else { + req.continue(); + } + }); }); let username; @@ -50,7 +52,7 @@ defineFeature(feature, (test) => { await page.waitForSelector("#login-password"); await page.type("#login-password", password); await page.click("button", { text: "Login" }); - //await page.waitForNavigation({ waitUntil: "networkidle0" }); + await page.waitForNavigation({ waitUntil: "networkidle0" }); }); when("I click on the Logout link", async () => {