Skip to content

Commit 33bc6f1

Browse files
authored
[Discover] Improve functional testing searchOnPageLoad (#107181)
1 parent 63ec458 commit 33bc6f1

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
@@ -268,8 +268,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
268268
await kibanaServer.uiSettings.replace({ 'discover:searchOnPageLoad': true });
269269
await PageObjects.common.navigateToApp('discover');
270270
await PageObjects.header.awaitKibanaChrome();
271-
272-
expect(await PageObjects.discover.getNrOfFetches()).to.be(1);
271+
await retry.waitFor('number of fetches to be 1', async () => {
272+
const nrOfFetches = await PageObjects.discover.getNrOfFetches();
273+
return nrOfFetches === 1;
274+
});
273275
});
274276
});
275277

0 commit comments

Comments
 (0)