Skip to content

Commit dbb4870

Browse files
[Discover] Improve functional testing searchOnPageLoad (#107181) (#107362)
Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
1 parent d919a64 commit dbb4870

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/functional/apps/discover/_discover.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
298298
await kibanaServer.uiSettings.replace({ 'discover:searchOnPageLoad': true });
299299
await PageObjects.common.navigateToApp('discover');
300300
await PageObjects.header.awaitKibanaChrome();
301-
302-
expect(await PageObjects.discover.getNrOfFetches()).to.be(1);
301+
await retry.waitFor('number of fetches to be 1', async () => {
302+
const nrOfFetches = await PageObjects.discover.getNrOfFetches();
303+
return nrOfFetches === 1;
304+
});
303305
});
304306
});
305307

0 commit comments

Comments
 (0)