From 9db44e5d9dd47ce20484eaa4e4e0f21ca1b52d7c Mon Sep 17 00:00:00 2001 From: Paul Sebastian Date: Tue, 10 Sep 2024 16:27:28 -0700 Subject: [PATCH] observability test fixes Signed-off-by: Paul Sebastian --- .../2_trace_analytics_services.spec.js | 2 +- .../observability-dashboards/3_trace_analytics_traces.spec.js | 2 +- .../plugins/observability-dashboards/6_notebooks.spec.js | 2 +- cypress/utils/plugins/observability-dashboards/constants.js | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) 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 7ad693834..2f99cb593 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 @@ -26,7 +26,7 @@ describe('Testing services table', () => { .first() .focus() .type(`${SERVICE_NAME}{enter}`); - cy.get('.euiButton__text').contains('Refresh').click(); + cy.get('button[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 ed67df8dc..a04ee09c1 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 @@ -29,7 +29,7 @@ describe('Testing traces table', () => { it('Searches correctly', () => { cy.get('input[type="search"]').focus().type(`${TRACE_ID}{enter}`); - cy.get('.euiButton__text').contains('Refresh').click(); + cy.get('button[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..a2285085c 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('h3[data-test-subj="notebookTitle"]') .contains(notebookName) .should('exist'); diff --git a/cypress/utils/plugins/observability-dashboards/constants.js b/cypress/utils/plugins/observability-dashboards/constants.js index f5fa4c532..95d1b3d85 100644 --- a/cypress/utils/plugins/observability-dashboards/constants.js +++ b/cypress/utils/plugins/observability-dashboards/constants.js @@ -80,7 +80,9 @@ export const setTimeFilter = (setEndTime = false, refresh = true) => { timeout: TIMEOUT_DELAY, }).type('{selectall}' + endTime, { force: true }); } - if (refresh) cy.get('.euiButton__text').contains('Refresh').click(); + if (refresh) { + cy.get('button[data-test-subj="superDatePickerApplyTimeButton"]').click(); + } cy.wait(delayTime); };