Skip to content

Commit

Permalink
Increase timeouts and wait until loading is finished.
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneseymour committed Mar 21, 2024
1 parent f149155 commit 0b337a2
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions x-pack/test_serverless/functional/page_objects/svl_common_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProvide
const testSubjects = getService('testSubjects');
const find = getService('find');
const config = getService('config');
const pageObjects = getPageObjects(['security', 'common']);
const pageObjects = getPageObjects(['security', 'common', 'header']);
const retry = getService('retry');
const deployment = getService('deployment');
const log = getService('log');
Expand Down Expand Up @@ -229,15 +229,22 @@ export function SvlCommonPageProvider({ getService, getPageObjects }: FtrProvide
},

async clickUserAvatar() {
await testSubjects.click('userMenuAvatar');
await pageObjects.header.waitUntilLoadingHasFinished();
await testSubjects.click('userMenuAvatar', 10_000);
},

async assertUserAvatarExists() {
await testSubjects.existOrFail('userMenuAvatar');
await pageObjects.header.waitUntilLoadingHasFinished();
await testSubjects.existOrFail('userMenuAvatar', {
timeout: 10_000,
});
},

async assertUserMenuExists() {
await testSubjects.existOrFail('userMenu');
await pageObjects.header.waitUntilLoadingHasFinished();
await testSubjects.existOrFail('userMenu', {
timeout: 10_000,
});
},
};
}

0 comments on commit 0b337a2

Please sign in to comment.