From e8aa6c28ddd405e0d4f261e5d50e40907cf41757 Mon Sep 17 00:00:00 2001 From: alokhyland Date: Fri, 10 Jan 2025 23:21:48 +0530 Subject: [PATCH] added driver pause --- .../nuxeo-web-ui-ftest/features/step_definitions/login.js | 3 ++- packages/nuxeo-web-ui-ftest/pages/login.js | 1 + packages/nuxeo-web-ui-ftest/pages/ui.js | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/nuxeo-web-ui-ftest/features/step_definitions/login.js b/packages/nuxeo-web-ui-ftest/features/step_definitions/login.js index 973d8f9eac..19ad1277c6 100644 --- a/packages/nuxeo-web-ui-ftest/features/step_definitions/login.js +++ b/packages/nuxeo-web-ui-ftest/features/step_definitions/login.js @@ -34,8 +34,9 @@ Given('user {string} exists', async (username) => { }); When('I login as {string}', async function(username) { - await driver.pause(1000); + await driver.pause(2000); const logIn = await Login.get(); + await driver.pause(2000); await logIn.username(username); const password = await users[username]; await logIn.password(password); diff --git a/packages/nuxeo-web-ui-ftest/pages/login.js b/packages/nuxeo-web-ui-ftest/pages/login.js index 3a5d8f570e..ee1c6dd48b 100644 --- a/packages/nuxeo-web-ui-ftest/pages/login.js +++ b/packages/nuxeo-web-ui-ftest/pages/login.js @@ -19,6 +19,7 @@ export default class Login { const baseUrl = process.env.NUXEO_URL || ''; await driver.pause(1000); await browser.url(baseUrl ? `${baseUrl}/logout` : 'logout'); + await driver.pause(4000); return new this(); })(); } diff --git a/packages/nuxeo-web-ui-ftest/pages/ui.js b/packages/nuxeo-web-ui-ftest/pages/ui.js index d22c27ba7d..02ae57cdc7 100644 --- a/packages/nuxeo-web-ui-ftest/pages/ui.js +++ b/packages/nuxeo-web-ui-ftest/pages/ui.js @@ -107,8 +107,9 @@ export default class UI extends BasePage { static get() { return (async () => { - url(process.env.NUXEO_URL ? '' : 'ui'); - if (!(await global.locale)) { + await url(process.env.NUXEO_URL ? '' : 'ui'); + const isGlobalLocaleAvailable = await global.locale; + if (!isGlobalLocaleAvailable) { await $('nuxeo-app:not([unresolved])').waitForVisible(); const locale = await browser.execute(async () => (await window.nuxeo.I18n.language) || 'en'); if (locale) {