[test] Await retry.waitFor (#90456) (#90541)

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
This commit is contained in:
Tyler Smalley 2021-02-05 18:56:52 -08:00 committed by GitHub
parent 3ad7814934
commit f7d50e5daf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -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()
);
});
});
}

View file

@ -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');
});
@ -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;
});
}