Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.x] Don't need to force DatePickerMenu open #1367

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 0 additions & 12 deletions cypress/utils/dashboards/data_explorer/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
1 change: 0 additions & 1 deletion cypress/utils/dashboards/data_explorer/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ declare namespace Cypress {
clearSaveQuery(): Chainable<any>;
deleteSaveQuery(name: string): Chainable<any>;
switchDiscoverTable(name: string): Chainable<any>;
makeDatePickerMenuOpen(): Chainable<any>;
}
}
Loading