diff --git a/cypress/integration/plugins/observability-dashboards/2_trace_analytics_services.spec.js b/cypress/integration/plugins/observability-dashboards/2_trace_analytics_services.spec.js index 80bae211c..57ae03624 100644 --- a/cypress/integration/plugins/observability-dashboards/2_trace_analytics_services.spec.js +++ b/cypress/integration/plugins/observability-dashboards/2_trace_analytics_services.spec.js @@ -27,9 +27,7 @@ describe('Testing services table', () => { .first() .focus() .type(`${SERVICE_NAME}{enter}`); - cy.get('[data-test-subj="superDatePickerApplyTimeButton"]', { - timeout: TIMEOUT_DELAY, - }).click(); + cy.get('[data-test-subj="superDatePickerApplyTimeButton"]').click(); cy.contains(' (1)').should('exist'); }); diff --git a/cypress/integration/plugins/observability-dashboards/3_trace_analytics_traces.spec.js b/cypress/integration/plugins/observability-dashboards/3_trace_analytics_traces.spec.js index 7c0e0b9ef..ab94cd83a 100644 --- a/cypress/integration/plugins/observability-dashboards/3_trace_analytics_traces.spec.js +++ b/cypress/integration/plugins/observability-dashboards/3_trace_analytics_traces.spec.js @@ -33,9 +33,7 @@ describe('Testing traces table', () => { it('Searches correctly', () => { cy.get('input[type="search"]').focus().type(`${TRACE_ID}{enter}`); - cy.get('[data-test-subj="superDatePickerApplyTimeButton"]', { - timeout: TIMEOUT_DELAY, - }).click(); + cy.get('[data-test-subj="superDatePickerApplyTimeButton"]').click(); cy.contains(' (1)').should('exist'); cy.get('.euiTableCellContent') .eq(11) diff --git a/cypress/integration/plugins/observability-dashboards/6_notebooks.spec.js b/cypress/integration/plugins/observability-dashboards/6_notebooks.spec.js index c4f0bd896..99efd8245 100644 --- a/cypress/integration/plugins/observability-dashboards/6_notebooks.spec.js +++ b/cypress/integration/plugins/observability-dashboards/6_notebooks.spec.js @@ -34,7 +34,7 @@ const makeTestNotebook = () => { cy.contains(`Notebook "${notebookName}" successfully created`); - cy.get('h1[data-test-subj="notebookTitle"]') + cy.get('[data-test-subj="notebookTitle"]') .contains(notebookName) .should('exist'); @@ -61,8 +61,7 @@ const deleteNotebook = (notebookName) => { .find('input[type="checkbox"]') .check(); - cy.get('button[data-test-subj="notebookTableActionBtn"]').click(); - cy.get('button[data-test-subj="deleteNotebookBtn"]').click(); + cy.get('[data-test-subj="deleteSelectedNotebooks"]').click(); cy.get('input[data-test-subj="delete-notebook-modal-input"]').focus(); cy.get('input[data-test-subj="delete-notebook-modal-input"]').type('delete'); @@ -110,11 +109,11 @@ describe('Testing notebook actions', () => { describe('Test reporting integration if plugin installed', () => { beforeEach(() => { let notebookName = makeTestNotebook(); + cy.wrap({ name: notebookName }).as('notebook'); cy.get('body').then(($body) => { skipOn($body.find('#reportingActionsButton').length <= 0); }); makePopulatedParagraph(); - cy.wrap({ name: notebookName }).as('notebook'); }); afterEach(() => { diff --git a/cypress/utils/plugins/observability-dashboards/constants.js b/cypress/utils/plugins/observability-dashboards/constants.js index fd2af0177..11f866752 100644 --- a/cypress/utils/plugins/observability-dashboards/constants.js +++ b/cypress/utils/plugins/observability-dashboards/constants.js @@ -80,11 +80,8 @@ export const setTimeFilter = (setEndTime = false, refresh = true) => { timeout: TIMEOUT_DELAY, }).type('{selectall}' + endTime, { force: true }); } - if (refresh) { - cy.get('[data-test-subj="superDatePickerApplyTimeButton"]', { - timeout: TIMEOUT_DELAY, - }).click(); - } + if (refresh) + cy.get('[data-test-subj="superDatePickerApplyTimeButton"]').click(); cy.wait(delayTime); };