Skip to content

Commit

Permalink
[test] Await retry.waitFor (#90456) (#90541)
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Smalley <[email protected]>
  • Loading branch information
Tyler Smalley authored Feb 6, 2021
1 parent 3ad7814 commit f7d50e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion test/functional/apps/console/_console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.console.dismissTutorial();
expect(await PageObjects.console.hasAutocompleter()).to.be(false);
await PageObjects.console.promptAutocomplete();
retry.waitFor('autocomplete to be visible', () => PageObjects.console.hasAutocompleter());
await retry.waitFor('autocomplete to be visible', () =>
PageObjects.console.hasAutocompleter()
);
});
});
}
4 changes: 2 additions & 2 deletions x-pack/test/functional/page_objects/upgrade_assistant_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function UpgradeAssistantPageProvider({ getPageObjects, getService }: Ftr
return await retry.try(async () => {
await common.navigateToApp('settings');
await testSubjects.click('upgrade_assistant');
retry.waitFor('url to contain /upgrade_assistant', async () => {
await retry.waitFor('url to contain /upgrade_assistant', async () => {
const url = await browser.getCurrentUrl();
return url.includes('/upgrade_assistant');
});
Expand Down Expand Up @@ -61,7 +61,7 @@ export function UpgradeAssistantPageProvider({ getPageObjects, getService }: Ftr

async waitForTelemetryHidden() {
const self = this;
retry.waitFor('Telemetry to disappear.', async () => {
await retry.waitFor('Telemetry to disappear.', async () => {
return (await self.isTelemetryExists()) === false;
});
}
Expand Down

0 comments on commit f7d50e5

Please sign in to comment.