Skip to content

Commit

Permalink
Merge branch 'main' into tsvb-ft-pr
Browse files Browse the repository at this point in the history
  • Loading branch information
yujin-emma committed Jun 7, 2024
2 parents 40736ea + 2881c0f commit 45b4515
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
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>;
}
}

0 comments on commit 45b4515

Please sign in to comment.