diff --git a/test/functional/apps/dashboard/dashboard_query_bar.js b/test/functional/apps/dashboard/dashboard_query_bar.js index dc4c6a9a63d4d..13dea27f606f6 100644 --- a/test/functional/apps/dashboard/dashboard_query_bar.js +++ b/test/functional/apps/dashboard/dashboard_query_bar.js @@ -24,6 +24,7 @@ export default function({ getService, getPageObjects }) { const kibanaServer = getService('kibanaServer'); const pieChart = getService('pieChart'); const queryBar = getService('queryBar'); + const retry = getService('retry'); const PageObjects = getPageObjects(['common', 'dashboard', 'discover']); describe('dashboard query bar', () => { @@ -41,10 +42,11 @@ export default function({ getService, getPageObjects }) { await esArchiver.unload('dashboard/current/data'); await queryBar.clickQuerySubmitButton(); - const headers = await PageObjects.discover.getColumnHeaders(); - expect(headers.length).to.be(0); - - await pieChart.expectPieSliceCount(0); + await retry.tryForTime(5000, async () => { + const headers = await PageObjects.discover.getColumnHeaders(); + expect(headers.length).to.be(0); + await pieChart.expectPieSliceCount(0); + }); }); }); }