From 1e12be11fed89efc2b08f53c05636986f3de1240 Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Mon, 10 Jan 2022 12:57:47 +0100 Subject: [PATCH] [Discover] Unskip flaky histogram time range test (#122324) (#122518) --- test/functional/apps/discover/_discover.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/functional/apps/discover/_discover.ts b/test/functional/apps/discover/_discover.ts index 036522ed77e6..857b1ebc6519 100644 --- a/test/functional/apps/discover/_discover.ts +++ b/test/functional/apps/discover/_discover.ts @@ -38,8 +38,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); }); - // FLAKY: https://github.com/elastic/kibana/issues/86602 - describe.skip('query', function () { + describe('query', function () { const queryName1 = 'Query # 1'; it('should show correct time range string by timepicker', async function () { @@ -121,8 +120,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); return actualCount === expectedCount; }); - const prevRowData = await PageObjects.discover.getDocTableField(1); - log.debug(`The first timestamp value in doc table before brushing: ${prevRowData}`); + let prevRowData = ''; + // to make sure the table is already rendered + await retry.try(async () => { + prevRowData = await PageObjects.discover.getDocTableField(1); + log.debug(`The first timestamp value in doc table before brushing: ${prevRowData}`); + }); + await PageObjects.discover.brushHistogram(); await PageObjects.discover.waitUntilSearchingHasFinished(); await retry.waitFor('chart rendering complete after being brushed', async () => {