diff --git a/test/functional/page_objects/time_picker.ts b/test/functional/page_objects/time_picker.ts index 495d4089321b4..1566c15533810 100644 --- a/test/functional/page_objects/time_picker.ts +++ b/test/functional/page_objects/time_picker.ts @@ -57,6 +57,7 @@ export class TimePickerPageObject extends FtrService { }); if (isVisible) { await this.testSubjects.click('noDataPopoverDismissButton'); + await this.testSubjects.waitForDeleted('noDataPopoverDismissButton'); } } diff --git a/x-pack/test/functional/page_objects/lens_page.ts b/x-pack/test/functional/page_objects/lens_page.ts index 927e8710017ee..a08b582d98f12 100644 --- a/x-pack/test/functional/page_objects/lens_page.ts +++ b/x-pack/test/functional/page_objects/lens_page.ts @@ -67,12 +67,14 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont * a range that has data in our dataset. */ async goToTimeRange(fromTime?: string, toTime?: string) { - await PageObjects.timePicker.ensureHiddenNoDataPopover(); - fromTime = fromTime || PageObjects.timePicker.defaultStartTime; - toTime = toTime || PageObjects.timePicker.defaultEndTime; - await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime); - // give some time for the update button tooltip to close - await PageObjects.common.sleep(500); + const from = fromTime || PageObjects.timePicker.defaultStartTime; + const to = toTime || PageObjects.timePicker.defaultEndTime; + await retry.try(async () => { + await PageObjects.timePicker.ensureHiddenNoDataPopover(); + await PageObjects.timePicker.setAbsoluteRange(from, to); + // give some time for the update button tooltip to close + await PageObjects.common.sleep(500); + }); }, /**