From 5a9fc214150e74c4d7a599c416d35e59dc8c247f Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Mon, 12 Apr 2021 11:22:07 +0200 Subject: [PATCH] [Discover] Unskip histogram hiding test (#95759) - improves the test to be no longer flaky --- test/functional/apps/discover/_discover_histogram.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/functional/apps/discover/_discover_histogram.ts b/test/functional/apps/discover/_discover_histogram.ts index 72deb74459ab9..e41422555f81d 100644 --- a/test/functional/apps/discover/_discover_histogram.ts +++ b/test/functional/apps/discover/_discover_histogram.ts @@ -21,9 +21,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }; const testSubjects = getService('testSubjects'); const browser = getService('browser'); + const retry = getService('retry'); - // FLAKY: https://github.com/elastic/kibana/issues/94532 - describe.skip('discover histogram', function describeIndexTests() { + describe('discover histogram', function describeIndexTests() { before(async () => { await esArchiver.loadIfNeeded('logstash_functional'); await esArchiver.load('long_window_logstash'); @@ -107,8 +107,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { canvasExists = await elasticChart.canvasExists(); expect(canvasExists).to.be(false); await testSubjects.click('discoverChartToggle'); - canvasExists = await elasticChart.canvasExists(); - expect(canvasExists).to.be(true); + await retry.waitFor(`Discover histogram to be displayed`, async () => { + canvasExists = await elasticChart.canvasExists(); + return canvasExists; + }); + await PageObjects.discover.saveSearch('persisted hidden histogram'); await PageObjects.header.waitUntilLoadingHasFinished();