Skip to content

Commit

Permalink
[Discover] Fix dashboard time range flaky test (#179972)
Browse files Browse the repository at this point in the history
  • Loading branch information
jughosta authored Apr 5, 2024
1 parent beaf76f commit 63d5102
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion x-pack/test/functional/apps/discover/saved_searches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const queryBar = getService('queryBar');
const filterBar = getService('filterBar');
const testSubjects = getService('testSubjects');
const retry = getService('retry');
const ecommerceSOPath = 'x-pack/test/functional/fixtures/kbn_archiver/reporting/ecommerce.json';
const defaultSettings = {
defaultIndex: 'logstash-*',
Expand Down Expand Up @@ -55,7 +56,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

await panelActions.customizePanel();
await dashboardCustomizePanel.enableCustomTimeRange();
await dashboardCustomizePanel.openDatePickerQuickMenu();
await retry.waitFor('quick menu', async () => {
await dashboardCustomizePanel.openDatePickerQuickMenu();
return await testSubjects.exists('superDatePickerCommonlyUsed_Last_90 days');
});
await dashboardCustomizePanel.clickCommonlyUsedTimeRange('Last_90 days');
await dashboardCustomizePanel.clickSaveButton();

Expand Down

0 comments on commit 63d5102

Please sign in to comment.