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] Cypress - Event Analytics flaky test fix #2335

Merged
merged 1 commit into from
Feb 3, 2025
Merged
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 @@ -199,10 +199,10 @@
cy.get('button[id="main-content-vis"]').contains('Visualizations').click();
cy.get('[data-test-subj="eventExplorer__saveManagementPopover"]').click();
cy.get('[data-test-subj="comboBoxToggleListButton"]').eq(2).click();
cy.get('[data-test-subj="eventExplorer__querySaveName"]')

Check warning on line 202 in .cypress/integration/event_analytics_test/event_analytics.spec.js

View workflow job for this annotation

GitHub Actions / Lint

Do not use force on click and type calls
.focus()
.type(SAVE_QUERY2, { force: true });
cy.get('[data-test-subj="eventExplorer__querySaveConfirm"]').click({ force: true });

Check warning on line 205 in .cypress/integration/event_analytics_test/event_analytics.spec.js

View workflow job for this annotation

GitHub Actions / Lint

Do not use force on click and type calls
cy.get('.euiToastHeader__title').contains('successfully').should('exist');
landOnEventHome();
cy.get('.euiFieldSearch').type(SAVE_QUERY2);
Expand All @@ -222,12 +222,12 @@
.contains('Visualizations')
.click();
cy.get('[data-test-subj="eventExplorer__saveManagementPopover"]').click();
cy.get('[data-test-subj="eventExplorer__querySaveName"]')

Check warning on line 225 in .cypress/integration/event_analytics_test/event_analytics.spec.js

View workflow job for this annotation

GitHub Actions / Lint

Do not use force on click and type calls
.focus()
.type(SAVE_QUERY3, { force: true });
cy.get('[data-test-subj="eventExplorer__querySaveComboBox"]').type(TESTING_PANEL);
cy.get(`input[value="${TESTING_PANEL}"]`).click();
cy.get('[data-test-subj="eventExplorer__querySaveConfirm"]').click({ force: true });

Check warning on line 230 in .cypress/integration/event_analytics_test/event_analytics.spec.js

View workflow job for this annotation

GitHub Actions / Lint

Do not use force on click and type calls
cy.get('.euiToastHeader__title').contains('successfully').should('exist');
});

Expand Down Expand Up @@ -281,8 +281,15 @@
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 });

Check warning on line 291 in .cypress/integration/event_analytics_test/event_analytics.spec.js

View workflow job for this annotation

GitHub Actions / Lint

Do not use force on click and type calls
});

cy.get('[data-attr-field="utc_time"] [data-test-subj="eventFields__default-timestamp-mark"')
.contains('Default Timestamp')
Expand Down Expand Up @@ -329,7 +336,7 @@
cy.get('button.euiButton--danger').should('be.disabled');
cy.get('input.euiFieldText[placeholder="delete"]').type('delete');
cy.get('button.euiButton--danger').should('not.be.disabled');
cy.get('.euiButton__text').contains('Delete').click({ force: true });

Check warning on line 339 in .cypress/integration/event_analytics_test/event_analytics.spec.js

View workflow job for this annotation

GitHub Actions / Lint

Do not use force on click and type calls
cy.get('.euiTextAlign').contains('No Queries or Visualizations').should('exist');
});
});
Expand Down
Loading