diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/discover.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/discover.spec.js index 57bbfd1fa..9fccc0265 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/discover.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/discover.spec.js @@ -279,15 +279,12 @@ describe('discover app', { scrollBehavior: false }, () => { .should('be.visible') .clear() .type('2'); - - cy.makeDatePickerMenuOpen(); cy.getElementByTestId('superDatePickerToggleRefreshButton').click(); // Let auto refresh run cy.wait(100); // Close the auto refresh - cy.makeDatePickerMenuOpen(); cy.getElementByTestId('superDatePickerToggleRefreshButton').click(); // Check the timestamp of the last request, it should be different than the first timestamp diff --git a/cypress/utils/dashboards/data_explorer/commands.js b/cypress/utils/dashboards/data_explorer/commands.js index b33ed750e..a0ccff2e2 100644 --- a/cypress/utils/dashboards/data_explorer/commands.js +++ b/cypress/utils/dashboards/data_explorer/commands.js @@ -156,18 +156,6 @@ Cypress.Commands.add('switchDiscoverTable', (name) => { }); }); -Cypress.Commands.add('makeDatePickerMenuOpen', () => { - cy.get( - '[class="euiFormControlLayout euiFormControlLayout--group euiSuperDatePicker"]' - ).then(($popover) => { - // Check if the popover does not have the 'euiPopover-isOpen' class - if (!$popover.hasClass('euiPopover-isOpen')) { - // If not open, click the button to open the quick menu - cy.getElementByTestId('superDatePickerToggleQuickMenuButton').click(); - } - }); -}); - function checkForElementVisibility() { cy.getElementsByTestIds('queryInput') .should('be.visible') diff --git a/cypress/utils/dashboards/data_explorer/index.d.ts b/cypress/utils/dashboards/data_explorer/index.d.ts index bc71c6ade..703906af3 100644 --- a/cypress/utils/dashboards/data_explorer/index.d.ts +++ b/cypress/utils/dashboards/data_explorer/index.d.ts @@ -17,6 +17,5 @@ declare namespace Cypress { clearSaveQuery(): Chainable; deleteSaveQuery(name: string): Chainable; switchDiscoverTable(name: string): Chainable; - makeDatePickerMenuOpen(): Chainable; } } \ No newline at end of file