Skip to content

Commit

Permalink
added driver pause
Browse files Browse the repository at this point in the history
  • Loading branch information
alokhyland committed Jan 10, 2025
1 parent c06d53b commit e8aa6c2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions packages/nuxeo-web-ui-ftest/pages/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
})();
}
Expand Down
5 changes: 3 additions & 2 deletions packages/nuxeo-web-ui-ftest/pages/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e8aa6c2

Please sign in to comment.