Skip to content

Commit

Permalink
Cypress - Event Analytics flaky test fix (#2332) (#2335)
Browse files Browse the repository at this point in the history
* fix flaky cypress test for event_analyics



* fix flaky cypress test for event_analyics



---------



(cherry picked from commit 3bb49bf)

Signed-off-by: Adam Tackett <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Adam Tackett <[email protected]>
  • Loading branch information
3 people authored Feb 3, 2025
1 parent 1be01df commit 64679de
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,15 @@ describe('Override timestamp for an index', () => {
clearQuerySearchBoxText('searchAutocompleteTextArea');
cy.get('[data-test-subj="searchAutocompleteTextArea"]').type(TEST_QUERIES[2].query);
cy.get('[data-test-subj="superDatePickerApplyTimeButton"]').click();
cy.get('[data-test-subj="globalLoadingIndicator"]').should('not.exist');
cy.get('.tab-title').contains('Events').click();
cy.get('[data-test-subj="eventExplorer__overrideDefaultTimestamp"]').click({ force: true });
cy.get('[data-test-subj="globalLoadingIndicator"]').should('not.exist');
cy.get('[data-test-subj="eventExplorer__overrideDefaultTimestamp"]')
.then(($elements) => {
// Handle redux state bug in main not setting default timestamp for cypress
const indexToClick = $elements.length > 1 ? 1 : 0;
cy.wrap($elements.eq(indexToClick)).click({ force: true });
});

cy.get('[data-attr-field="utc_time"] [data-test-subj="eventFields__default-timestamp-mark"')
.contains('Default Timestamp')
Expand Down

0 comments on commit 64679de

Please sign in to comment.