Skip to content

Commit

Permalink
[Discover] Improve functional testing searchOnPageLoad (#107181)
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal authored Aug 2, 2021
1 parent 63ec458 commit 33bc6f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/functional/apps/discover/_discover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await kibanaServer.uiSettings.replace({ 'discover:searchOnPageLoad': true });
await PageObjects.common.navigateToApp('discover');
await PageObjects.header.awaitKibanaChrome();

expect(await PageObjects.discover.getNrOfFetches()).to.be(1);
await retry.waitFor('number of fetches to be 1', async () => {
const nrOfFetches = await PageObjects.discover.getNrOfFetches();
return nrOfFetches === 1;
});
});
});

Expand Down

0 comments on commit 33bc6f1

Please sign in to comment.