From b407a3c1a9c02ff4824f631214c33e2f2b9bec4f Mon Sep 17 00:00:00 2001 From: "Dario G. Mori" Date: Sun, 5 May 2024 17:32:23 +0200 Subject: [PATCH] test: added timeout --- webapp/e2e/steps/login_positive.steps.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webapp/e2e/steps/login_positive.steps.js b/webapp/e2e/steps/login_positive.steps.js index 7d59fe4d..9243ede9 100644 --- a/webapp/e2e/steps/login_positive.steps.js +++ b/webapp/e2e/steps/login_positive.steps.js @@ -26,7 +26,7 @@ defineFeature(feature, test => { .catch(() => {}); // Registering the user before the tests - await registerUserFromRootDirectory(username, page); + await registerUserFromRootDirectory(username, page); // Logging it out await logOutUser(page); @@ -113,6 +113,7 @@ async function registerUserFromRootDirectory(username, page) { async function logOutUser(page) { // Logging out await expect(page).toClick("#lateralMenuButton"); + await new Promise(resolve => setTimeout(resolve, 5000)); // Waiting for page to fully load await expect(page).toClick("button[data-testid='LogOut']"); // Checking for the log out to be sucessful