diff --git a/cypress/integration/plugins/observability-dashboards/1_trace_analytics_dashboard.spec.js b/cypress/integration/plugins/observability-dashboards/1_trace_analytics_dashboard.spec.js index c67828db9..f3032d034 100644 --- a/cypress/integration/plugins/observability-dashboards/1_trace_analytics_dashboard.spec.js +++ b/cypress/integration/plugins/observability-dashboards/1_trace_analytics_dashboard.spec.js @@ -79,7 +79,9 @@ describe('Testing dashboard table', () => { }); it('Redirects to traces table with filter', () => { - cy.get('.euiLink').contains('13').click(); + cy.get('[data-test-subj="dashboard-table-traces-button"]') + .contains('13') + .click(); cy.wait(delayTime); cy.contains(' (13)').should('exist'); @@ -107,7 +109,9 @@ describe('Testing plots', () => { it('Renders service map', () => { // plotly scale texts are in attribute "data-unformatted" - cy.get('text.ytitle[data-unformatted="Latency (ms)"]').should('exist'); + cy.get('text.ytitle[data-unformatted="Average duration (ms)"]').should( + 'exist' + ); cy.get('text[data-unformatted="200"]').should('exist'); cy.get('.vis-network').should('exist'); diff --git a/cypress/integration/plugins/observability-dashboards/4_panels.spec.js b/cypress/integration/plugins/observability-dashboards/4_panels.spec.js index 6715e3b6a..3a256341e 100644 --- a/cypress/integration/plugins/observability-dashboards/4_panels.spec.js +++ b/cypress/integration/plugins/observability-dashboards/4_panels.spec.js @@ -8,17 +8,9 @@ import { PANEL_DELAY as delay, TEST_PANEL, - PPL_VISUALIZATIONS, - PPL_VISUALIZATIONS_NAMES, - supressResizeObserverIssue, BASE_PATH, } from '../../../utils/constants'; -const moveToEventsHome = () => { - cy.visit(`${BASE_PATH}/app/observability-logs#`); - cy.wait(delay * 3); -}; - const moveToPanelHome = () => { cy.visit(`${BASE_PATH}/app/observability-dashboards#`); cy.wait(delay * 3); @@ -35,40 +27,6 @@ const moveToTestPanel = () => { cy.wait(delay); }; -describe('Creating visualizations', () => { - beforeEach(() => { - moveToEventsHome(); - }); - - it('Create first visualization in event analytics', () => { - cy.get('[id^=autocomplete-textarea]').focus().type(PPL_VISUALIZATIONS[0], { - delay: 50, - }); - cy.get('.euiButton__text').contains('Refresh').trigger('mouseover').click(); - cy.wait(delay); - supressResizeObserverIssue(); - cy.get('button[id="main-content-vis"]') - .contains('Visualizations') - .trigger('mouseover') - .click(); - cy.wait(delay * 2); - cy.get('[data-test-subj="eventExplorer__saveManagementPopover"]') - .trigger('mouseover') - .click(); - cy.wait(1000); - cy.get('[data-test-subj="eventExplorer__querySaveName"]') - .focus() - .type(PPL_VISUALIZATIONS_NAMES[0], { - delay: 50, - }); - cy.get('[data-test-subj="eventExplorer__querySaveConfirm"]') - .trigger('mouseover') - .click(); - cy.wait(delay); - cy.get('.euiToastHeader__title').contains('successfully').should('exist'); - }); -}); - describe('Testing panels table', () => { beforeEach(() => { moveToPanelHome(); @@ -112,6 +70,7 @@ describe('Testing panels table', () => { }); it('Deletes panels', () => { + cy.get('.panel-header-count').contains('(2)'); cy.get('.euiCheckbox__input[data-test-subj="checkboxSelectAll"]') .trigger('mouseover') .click(); @@ -166,6 +125,7 @@ describe('Testing a panel', () => { }); cy.get('.euiLink').contains('This year').trigger('mouseover').click(); cy.wait(delay * 2); + moveToTestPanel(); cy.get( '.euiSuperDatePicker__prettyFormat[data-test-subj="superDatePickerShowDatesButton"]' ) diff --git a/cypress/utils/plugins/observability-dashboards/constants.js b/cypress/utils/plugins/observability-dashboards/constants.js index e11b1e43b..d73a64f21 100644 --- a/cypress/utils/plugins/observability-dashboards/constants.js +++ b/cypress/utils/plugins/observability-dashboards/constants.js @@ -50,10 +50,7 @@ export const setTimeFilter = (setEndTime = false, refresh = true) => { timeout: TIMEOUT_DELAY, }).click(); cy.get('.euiQuickSelect__applyButton').click(); - cy.get('.euiSuperDatePicker__prettyFormatLink').click(); - cy.get( - 'button.euiDatePopoverButton--start[data-test-subj="superDatePickerstartDatePopoverButton"]' - ).click(); + cy.get('[data-test-subj="superDatePickerShowDatesButton"]').click(); cy.get('.euiTab__content').contains('Absolute').click(); cy.get('input[data-test-subj="superDatePickerAbsoluteDateInput"]', { timeout: TIMEOUT_DELAY,