From a32169dd468fecb54e88581307f78d1593b45de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Su=C3=A1rez=20Losada?= Date: Wed, 1 May 2024 14:11:54 +0200 Subject: [PATCH] fix: missing timeouts for ensuring web pages are fully loaded. Co-authored-by: Dario G.Mori --- webapp/e2e/steps/seeing_rules_negative_non_logged_user.steps.js | 1 + webapp/e2e/steps/seeing_rules_positive.steps.js | 1 + 2 files changed, 2 insertions(+) diff --git a/webapp/e2e/steps/seeing_rules_negative_non_logged_user.steps.js b/webapp/e2e/steps/seeing_rules_negative_non_logged_user.steps.js index 56b48c53..69a57232 100644 --- a/webapp/e2e/steps/seeing_rules_negative_non_logged_user.steps.js +++ b/webapp/e2e/steps/seeing_rules_negative_non_logged_user.steps.js @@ -31,6 +31,7 @@ defineFeature(feature, test => { let gameURL = "http://localhost:3000/dashboard/game"; given('A non-logged user in main menu', async () => { + await new Promise(resolve => setTimeout(resolve, 6000)); let header = await page.$eval("button[data-testid='Login']", (element) => { return element.innerHTML }) diff --git a/webapp/e2e/steps/seeing_rules_positive.steps.js b/webapp/e2e/steps/seeing_rules_positive.steps.js index cc7d38d2..980a9e67 100644 --- a/webapp/e2e/steps/seeing_rules_positive.steps.js +++ b/webapp/e2e/steps/seeing_rules_positive.steps.js @@ -42,6 +42,7 @@ defineFeature(feature, test => { await expect(page).toClick("button[data-testid='Login'"); // Checking user is in main screen + await new Promise(resolve => setTimeout(resolve, 6000)); let header = await page.$eval("h2[class='chakra-heading css-79qjat']", (element) => { return element.innerHTML })