diff --git a/.cypress/integration/4_trace_analytics_dashboard.spec.js b/.cypress/integration/4_trace_analytics_dashboard.spec.js index 28a903814..656ac7e98 100644 --- a/.cypress/integration/4_trace_analytics_dashboard.spec.js +++ b/.cypress/integration/4_trace_analytics_dashboard.spec.js @@ -107,7 +107,6 @@ describe('Testing dashboard table', () => { }); it('Adds the percentile filters', () => { - cy.wait(delay);//Needed after removing waits from setTimeFilter() cy.contains(' >= 95 percentile').click({ force: true }); cy.contains(' >= 95 percentile').click({ force: true }); diff --git a/.cypress/integration/5_trace_analytics_services.spec.js b/.cypress/integration/5_trace_analytics_services.spec.js index f5da59a1e..7e0296661 100644 --- a/.cypress/integration/5_trace_analytics_services.spec.js +++ b/.cypress/integration/5_trace_analytics_services.spec.js @@ -14,7 +14,6 @@ describe('Testing services table empty state', () => { win.sessionStorage.clear(); }, }); - cy.wait(delay * 3); }); it('Renders empty state', () => { @@ -72,11 +71,6 @@ describe('Testing services table', () => { describe('Testing service view empty state', () => { beforeEach(() => { - // exception is thrown on loading EuiDataGrid in cypress only, ignore for now - cy.on('uncaught:exception', (err, runnable) => { - if (err.message.includes('ResizeObserver loop')) - return false; - }); cy.visit(`app/observability-traces#/services/${SERVICE_NAME}`, { onBeforeLoad: (win) => { win.sessionStorage.clear(); @@ -93,11 +87,6 @@ describe('Testing service view empty state', () => { describe('Testing service view', () => { beforeEach(() => { - // exception is thrown on loading EuiDataGrid in cypress only, ignore for now - cy.on('uncaught:exception', (err, runnable) => { - if (err.message.includes('ResizeObserver loop')) - return false; - }); cy.visit(`app/observability-traces#/services`, { onBeforeLoad: (win) => { win.sessionStorage.clear(); @@ -106,7 +95,7 @@ describe('Testing service view', () => { setTimeFilter(); cy.get('input[type="search"]').first().focus().type(`${SERVICE_NAME}`); cy.get('[data-test-subj="superDatePickerApplyTimeButton"]').click(); - cy.wait(delay); + cy.get('.euiTableRow').should('have.length.lessThan', 3);//Replaces wait cy.get('[data-test-subj="service-link"]').eq(0).click(); }); @@ -119,28 +108,22 @@ describe('Testing service view', () => { it('Has working breadcrumbs', () => { cy.get('.euiBreadcrumb').contains(SERVICE_NAME).click(); - cy.wait(delay); cy.get('h2.euiTitle').contains(SERVICE_NAME).should('exist'); cy.get('.euiBreadcrumb').contains('Services').click(); - cy.wait(delay); cy.get('.euiTitle').contains('Services').should('exist'); cy.get('.euiBreadcrumb').contains('Trace analytics').click(); - cy.wait(delay); cy.get('.euiTitle').contains('Dashboard').should('exist'); cy.get('.euiBreadcrumb').contains('Observability').click(); - cy.wait(delay); - cy.get('.euiTitle').contains('Event analytics').should('exist'); + cy.get('.euiTitle').contains('Logs').should('exist'); }); it('Renders spans data grid, flyout, filters', () => { cy.get("[data-test-subj='spanId-link']").contains(SERVICE_SPAN_ID).trigger('mouseover', { force: true }); cy.get('button[data-datagrid-interactable="true"]').eq(0).click({ force: true }); - cy.wait(delay); cy.contains('Span detail').should('exist'); cy.contains('Span attributes').should('exist'); cy.get('.euiTextColor').contains('Span ID').trigger('mouseover'); cy.get('.euiButtonIcon[aria-label="span-flyout-filter-icon"').click({ force: true }); - cy.wait(delay); cy.get('.euiBadge__text').contains('spanId: ').should('exist'); cy.get('[data-test-subj="euiFlyoutCloseButton"]').click({ force: true }); cy.contains('Spans (1)').should('exist'); @@ -172,10 +155,6 @@ describe('Testing Service map', () => { describe('Testing traces Spans table verify table headers functionality', () => { beforeEach(() => { - cy.on('uncaught:exception', (err, runnable) => { - if (err.message.includes('ResizeObserver loop')) - return false; - }); cy.visit('app/observability-traces#/services', { onBeforeLoad: (win) => { win.sessionStorage.clear(); @@ -211,6 +190,7 @@ describe('Testing traces Spans table verify table headers functionality', () => it('Hide all button Spans table', () => { cy.get('.euiLink.euiLink--primary').contains('authentication').should('exist').click(); + cy.get('.euiTableRow').should('have.length.lessThan', 2);//Replace wait cy.get('[data-test-subj = "dataGridColumnSelectorButton"]').click(); cy.get('.euiPopoverFooter .euiFlexItem.euiFlexItem--flexGrowZero').eq(1).should('have.text', 'Hide all').click(); cy.get('.euiDataGrid__focusWrap').click().should('exist'); @@ -268,10 +248,8 @@ describe('Testing traces Spans table and verify columns functionality', () => { cy.get('[aria-label="span-flyout-filter-icon"]').click(); cy.get('.euiFlyout__closeButton.euiFlyout__closeButton--inside').click(); cy.get('.euiBadge__content .euiBadge__text').contains('spanId: 277a5934acf55dcf').should('exist'); - cy.wait(delay); count_table_row(1); cy.get('[aria-label="remove current filter"]').click(); - cy.wait(delay); count_table_row(8); }); @@ -298,6 +276,7 @@ describe('Testing switch mode to jaeger', () => { setTimeFilter(); cy.get("[data-test-subj='indexPattern-switch-link']").click(); cy.get("[data-test-subj='jaeger-mode']").click(); + //cy.get('.euiButtonEmpty__text').should('contain', 'Jaeger'); }); it('Verifies columns and data', () => { @@ -312,10 +291,8 @@ describe('Testing switch mode to jaeger', () => { }); it('Verifies traces links to traces page with filter applied', () => { - cy.wait(delay); + cy.get('.euiTableRow').should('have.length.lessThan', 7);//Replaces Wait cy.get('.euiLink').contains('7').click(); - cy.wait(delay); - cy.get('h2.euiTitle').contains('Traces').should('exist'); cy.contains(' (7)').should('exist'); cy.get("[data-test-subj='filterBadge']").eq(0).contains('process.serviceName: customer') diff --git a/.cypress/integration/6_trace_analytics_traces.spec.js b/.cypress/integration/6_trace_analytics_traces.spec.js index 333f84ee3..c3ca6f339 100644 --- a/.cypress/integration/6_trace_analytics_traces.spec.js +++ b/.cypress/integration/6_trace_analytics_traces.spec.js @@ -14,7 +14,6 @@ describe('Testing traces table empty state', () => { win.sessionStorage.clear(); }, }); - cy.wait(delay * 3); }); it('Renders empty state', () => { @@ -69,7 +68,7 @@ describe('Testing trace view', () => { setTimeFilter(); cy.get('input[type="search"]').focus().type(`${TRACE_ID}`); cy.get('.euiButton__text').contains('Refresh').click(); - cy.wait(delay); + cy.get('.euiTableRow').should('have.length.lessThan', 3);//Replaces wait cy.get('[data-test-subj="trace-link"]').eq(0).click(); }); @@ -86,33 +85,27 @@ describe('Testing trace view', () => { it('Has working breadcrumbs', () => { cy.get(`.euiBreadcrumb[href="#/traces/${TRACE_ID}"]`).click(); - cy.wait(delay); cy.get('h2.euiTitle').contains(TRACE_ID).should('exist'); cy.get('.euiBreadcrumb[href="#/traces"]').click(); - cy.wait(delay); cy.get('.euiTitle').contains('Traces').should('exist'); cy.get('.euiBreadcrumb[href="#/"]').click(); - cy.wait(delay); cy.get('.euiTitle').contains('Dashboard').should('exist'); cy.get('.euiBreadcrumb[href="observability-logs#/"]').click(); - cy.wait(delay); - cy.get('.euiTitle').contains('Event analytics').should('exist'); + cy.get('.euiTitle').contains('Logs').should('exist'); }); it('Renders data grid, flyout and filters', () => { cy.get('.euiButton__text[title="Span list"]').click({ force: true }); cy.contains('2 columns hidden').should('exist'); - cy.wait(delay); cy.get('.euiLink').contains(SPAN_ID).trigger('mouseover', { force: true }); cy.get('button[data-datagrid-interactable="true"]').eq(0).click({ force: true }); cy.get('button[data-datagrid-interactable="true"]').eq(0).click({ force: true }); // first click doesn't go through eui data grid - cy.wait(delay); + cy.contains('Span detail').should('exist'); cy.contains('Span attributes').should('exist'); cy.get('.euiTextColor').contains('Span ID').trigger('mouseover'); cy.get('.euiButtonIcon[aria-label="span-flyout-filter-icon"').click({ force: true }); - cy.wait(delay); cy.get('.euiBadge__text').contains('spanId: ').should('exist'); cy.contains('Spans (1)').should('exist'); @@ -146,7 +139,6 @@ describe('Testing traces table', () => { cy.contains('client_create_order').should('exist'); cy.get('path[style*="rgb(116, 146, 231)"]').should('exist'); cy.go('back'); - cy.wait(delay); cy.get('.euiButtonEmpty__text').contains('Rows per page').click(); cy.get('.euiContextMenuItem__text').contains('15 rows').click(); let expected_row_count=15; diff --git a/.cypress/utils/constants.js b/.cypress/utils/constants.js index afce13b87..194fe0e97 100644 --- a/.cypress/utils/constants.js +++ b/.cypress/utils/constants.js @@ -66,6 +66,7 @@ export const setTimeFilter = (setEndTime = false, refresh = true) => { .type('{selectall}' + endTime, { force: true }); } if (refresh) cy.get('.euiButton__text').contains('Refresh').click(); + cy.get('.euiTableRow').should('have.length.greaterThan', 3);//Replaces Wait }; // notebooks