From 2fb1a4713715f2a462849dd105c2e5f071d7bb8c Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Tue, 20 Jul 2021 10:30:54 +0200 Subject: [PATCH] [Reporting] Unskip flaky test when downloading CSV with "no data" (#105252) * unskipped test and added additional checks when using time picker * rather wait for the timepicker to close * set up test for flaky test runner * Additional .only * Remove .only Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- test/functional/page_objects/time_picker.ts | 5 +++++ x-pack/test/functional/apps/discover/reporting.ts | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/functional/page_objects/time_picker.ts b/test/functional/page_objects/time_picker.ts index e8f6afc365f5d1..00133d720d8842 100644 --- a/test/functional/page_objects/time_picker.ts +++ b/test/functional/page_objects/time_picker.ts @@ -132,6 +132,11 @@ export class TimePickerPageObject extends FtrService { await this.testSubjects.click('superDatePickerAbsoluteTab'); await this.testSubjects.click('superDatePickerAbsoluteDateInput'); await this.inputValue('superDatePickerAbsoluteDateInput', fromTime); + await this.browser.pressKeys(this.browser.keys.ESCAPE); + + await this.retry.waitFor('Timepicker popover to close', async () => { + return !(await this.testSubjects.exists('superDatePickerAbsoluteDateInput')); + }); const superDatePickerApplyButtonExists = await this.testSubjects.exists( 'superDatePickerApplyTimeButton' diff --git a/x-pack/test/functional/apps/discover/reporting.ts b/x-pack/test/functional/apps/discover/reporting.ts index 0b018b4428e1d0..3eb66204df5640 100644 --- a/x-pack/test/functional/apps/discover/reporting.ts +++ b/x-pack/test/functional/apps/discover/reporting.ts @@ -73,8 +73,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/104372 - describe.skip('Generate CSV: new search', () => { + describe('Generate CSV: new search', () => { beforeEach(async () => { await kibanaServer.importExport.load(ecommerceSOPath); await PageObjects.common.navigateToApp('discover');