From b8f9ca38db4e368d776b11e2c0e431c9165f656e Mon Sep 17 00:00:00 2001 From: Rupal Mahajan Date: Wed, 19 Apr 2023 09:34:18 -0700 Subject: [PATCH] Update traces integration tests (#391) * Update traces cypress tests Signed-off-by: Rupal Mahajan * Update traces cypress test Signed-off-by: Rupal Mahajan * Fix traces cypress tests Signed-off-by: Rupal Mahajan * Fix filters test Signed-off-by: Rupal Mahajan --------- Signed-off-by: Rupal Mahajan --- .../4_trace_analytics_dashboard.spec.js | 32 +++++++++---------- .../5_trace_analytics_services.spec.js | 17 +++++----- .../6_trace_analytics_traces.spec.js | 20 ++++++------ 3 files changed, 34 insertions(+), 35 deletions(-) diff --git a/.cypress/integration/4_trace_analytics_dashboard.spec.js b/.cypress/integration/4_trace_analytics_dashboard.spec.js index 38441914db..284a642bad 100644 --- a/.cypress/integration/4_trace_analytics_dashboard.spec.js +++ b/.cypress/integration/4_trace_analytics_dashboard.spec.js @@ -27,7 +27,7 @@ describe('Dump test data', () => { cy.request(mapping_url).then((response) => { cy.request({ method: 'POST', - form: true, + //form: true, url: 'api/console/proxy', headers: { 'content-type': 'application/json;charset=UTF-8', @@ -44,7 +44,7 @@ describe('Dump test data', () => { cy.request(data_url).then((response) => { cy.request({ method: 'POST', - form: true, + //form: true, url: 'api/console/proxy', headers: { 'content-type': 'application/json;charset=UTF-8', @@ -67,7 +67,7 @@ describe('Dump test data', () => { describe('Testing dashboard table empty state', () => { beforeEach(() => { - cy.visit('app/observability-dashboards#/trace_analytics/home', { + cy.visit('app/observability-traces#/', { onBeforeLoad: (win) => { win.sessionStorage.clear(); }, @@ -83,7 +83,7 @@ describe('Testing dashboard table empty state', () => { describe('Testing dashboard table', () => { beforeEach(() => { - cy.visit('app/observability-dashboards#/trace_analytics/home', { + cy.visit('app/observability-traces#/', { onBeforeLoad: (win) => { win.sessionStorage.clear(); }, @@ -151,7 +151,7 @@ describe('Testing dashboard table', () => { describe('Testing plots', () => { beforeEach(() => { - cy.visit('app/observability-dashboards#/trace_analytics/home', { + cy.visit('app/observability-traces#/', { onBeforeLoad: (win) => { win.sessionStorage.clear(); }, @@ -186,7 +186,7 @@ describe('Testing plots', () => { describe('Latency by trace group table', () =>{ beforeEach(() => { - cy.visit('app/observability-dashboards#/trace_analytics/home', { + cy.visit('app/observability-traces#/', { onBeforeLoad: (win) => { win.sessionStorage.clear(); }, @@ -215,17 +215,17 @@ describe('Latency by trace group table', () =>{ }); it('Verify tooltips in Latency by trace group table', () => { - cy.get('.euiIcon.euiIcon--small.euiIcon--subdued.euiIcon-isLoaded.eui-alignTop').eq(0).trigger('mouseover'); + cy.get('.euiIcon.euiIcon--small.euiIcon--subdued.eui-alignTop').eq(0).trigger('mouseover'); cy.contains('Traces of all requests that share a common API and operation at the start of distributed tracing instrumentation.').should('be.visible'); - cy.get('.euiIcon.euiIcon--small.euiIcon--subdued.euiIcon-isLoaded.eui-alignTop').eq(1).trigger('mouseover'); + cy.get('.euiIcon.euiIcon--small.euiIcon--subdued.eui-alignTop').eq(1).trigger('mouseover'); cy.contains('Range of latencies for traces within a trace group in the selected time range.').should('be.visible'); - cy.get('.euiIcon.euiIcon--small.euiIcon--subdued.euiIcon-isLoaded.eui-alignTop').eq(2).trigger('mouseover'); + cy.get('.euiIcon.euiIcon--small.euiIcon--subdued.eui-alignTop').eq(2).trigger('mouseover'); cy.contains('Average latency of traces within a trace group in the selected time range.').should('be.visible'); - cy.get('.euiIcon.euiIcon--small.euiIcon--subdued.euiIcon-isLoaded.eui-alignTop').eq(3).trigger('mouseover'); + cy.get('.euiIcon.euiIcon--small.euiIcon--subdued.eui-alignTop').eq(3).trigger('mouseover'); cy.contains('24 hour time series view of hourly average, hourly percentile, and hourly range of latency for traces within a trace group.').should('be.visible'); - cy.get('.euiIcon.euiIcon--small.euiIcon--subdued.euiIcon-isLoaded.eui-alignTop').eq(4).trigger('mouseover'); + cy.get('.euiIcon.euiIcon--small.euiIcon--subdued.eui-alignTop').eq(4).trigger('mouseover'); cy.contains('Error rate based on count of trace errors within a trace group in the selected time range.').should('be.visible'); - cy.get('.euiIcon.euiIcon--small.euiIcon--subdued.euiIcon-isLoaded.eui-alignTop').eq(5).trigger('mouseover'); + cy.get('.euiIcon.euiIcon--small.euiIcon--subdued.eui-alignTop').eq(5).trigger('mouseover'); cy.contains('Count of traces with unique trace identifiers in the selected time range.').should('be.visible'); }); @@ -255,7 +255,7 @@ describe('Latency by trace group table', () =>{ describe('Testing filters on trace analytics page', { scrollBehavior: false }, () =>{ beforeEach(() => { - cy.visit('app/observability-dashboards#/trace_analytics/home', { + cy.visit('app/observability-traces#/', { onBeforeLoad: (win) => { win.sessionStorage.clear(); }, @@ -308,7 +308,7 @@ describe('Dump jaeger test data', () => { cy.request(mapping_url).then((response) => { cy.request({ method: 'POST', - form: true, + //form: true, url: 'api/console/proxy', headers: { 'content-type': 'application/json;charset=UTF-8', @@ -325,7 +325,7 @@ describe('Dump jaeger test data', () => { cy.request(data_url).then((response) => { cy.request({ method: 'POST', - form: true, + //form: true, url: 'api/console/proxy', headers: { 'content-type': 'application/json;charset=UTF-8', @@ -348,7 +348,7 @@ describe('Dump jaeger test data', () => { describe('Testing switch mode to jaeger', () => { beforeEach(() => { - cy.visit('app/observability-dashboards#/trace_analytics/home', { + cy.visit('app/observability-traces#/', { onBeforeLoad: (win) => { win.sessionStorage.clear(); }, diff --git a/.cypress/integration/5_trace_analytics_services.spec.js b/.cypress/integration/5_trace_analytics_services.spec.js index 66ca860b13..f5da59a1eb 100644 --- a/.cypress/integration/5_trace_analytics_services.spec.js +++ b/.cypress/integration/5_trace_analytics_services.spec.js @@ -9,7 +9,7 @@ import { delay, SERVICE_NAME, SERVICE_SPAN_ID, setTimeFilter, verify_traces_span describe('Testing services table empty state', () => { beforeEach(() => { - cy.visit('app/observability-dashboards#/trace_analytics/services', { + cy.visit('app/observability-traces#/services', { onBeforeLoad: (win) => { win.sessionStorage.clear(); }, @@ -25,7 +25,7 @@ describe('Testing services table empty state', () => { describe('Testing services table', () => { beforeEach(() => { - cy.visit('app/observability-dashboards#/trace_analytics/services', { + cy.visit('app/observability-traces#/services', { onBeforeLoad: (win) => { win.sessionStorage.clear(); }, @@ -77,7 +77,7 @@ describe('Testing service view empty state', () => { if (err.message.includes('ResizeObserver loop')) return false; }); - cy.visit(`app/observability-dashboards#/trace_analytics/services/${SERVICE_NAME}`, { + cy.visit(`app/observability-traces#/services/${SERVICE_NAME}`, { onBeforeLoad: (win) => { win.sessionStorage.clear(); }, @@ -98,7 +98,7 @@ describe('Testing service view', () => { if (err.message.includes('ResizeObserver loop')) return false; }); - cy.visit(`app/observability-dashboards#/trace_analytics/services`, { + cy.visit(`app/observability-traces#/services`, { onBeforeLoad: (win) => { win.sessionStorage.clear(); }, @@ -149,7 +149,7 @@ describe('Testing service view', () => { describe('Testing Service map', () => { beforeEach(() => { - cy.visit('app/observability-dashboards#/trace_analytics/services', { + cy.visit('app/observability-traces#/services', { onBeforeLoad: (win) => { win.sessionStorage.clear(); }, @@ -176,7 +176,7 @@ describe('Testing traces Spans table verify table headers functionality', () => if (err.message.includes('ResizeObserver loop')) return false; }); - cy.visit('app/observability-dashboards#/trace_analytics/services', { + cy.visit('app/observability-traces#/services', { onBeforeLoad: (win) => { win.sessionStorage.clear(); }, @@ -245,10 +245,9 @@ describe('Testing traces Spans table verify table headers functionality', () => }); }); - describe('Testing traces Spans table and verify columns functionality', () => { beforeEach(() => { - cy.visit('app/observability-dashboards#/trace_analytics/services', { + cy.visit('app/observability-traces#/services', { onBeforeLoad: (win) => { win.sessionStorage.clear(); }, @@ -291,7 +290,7 @@ describe('Testing traces Spans table and verify columns functionality', () => { describe('Testing switch mode to jaeger', () => { beforeEach(() => { - cy.visit('app/observability-dashboards#/trace_analytics/services', { + cy.visit('app/observability-traces#/services', { onBeforeLoad: (win) => { win.sessionStorage.clear(); }, diff --git a/.cypress/integration/6_trace_analytics_traces.spec.js b/.cypress/integration/6_trace_analytics_traces.spec.js index 8943991ff7..333f84ee31 100644 --- a/.cypress/integration/6_trace_analytics_traces.spec.js +++ b/.cypress/integration/6_trace_analytics_traces.spec.js @@ -9,7 +9,7 @@ import { delay, setTimeFilter, SPAN_ID, TRACE_ID } from '../utils/constants'; describe('Testing traces table empty state', () => { beforeEach(() => { - cy.visit('app/observability-dashboards#/trace_analytics/traces', { + cy.visit('app/observability-traces#/traces', { onBeforeLoad: (win) => { win.sessionStorage.clear(); }, @@ -25,7 +25,7 @@ describe('Testing traces table empty state', () => { describe('Testing traces table', () => { beforeEach(() => { - cy.visit('app/observability-dashboards#/trace_analytics/traces', { + cy.visit('app/observability-traces#/traces', { onBeforeLoad: (win) => { win.sessionStorage.clear(); }, @@ -48,7 +48,7 @@ describe('Testing traces table', () => { it('Sorts the traces table', () => { cy.get('.euiTableRow').first().contains('-').should('exist'); cy.get('.euiTableCellContent').contains('Trace group').click(); - cy.get('.euiTableRow').first().contains('/%2A%2A').should('exist'); + cy.get('.euiTableRow').first().contains('/**').should('exist'); }); it('Searches correctly', () => { @@ -61,7 +61,7 @@ describe('Testing traces table', () => { describe('Testing trace view', () => { beforeEach(() => { - cy.visit(`app/observability-dashboards#/trace_analytics/traces`, { + cy.visit(`app/observability-traces#/traces`, { onBeforeLoad: (win) => { win.sessionStorage.clear(); }, @@ -85,16 +85,16 @@ describe('Testing trace view', () => { }); it('Has working breadcrumbs', () => { - cy.get(`.euiBreadcrumb[href="#/trace_analytics/traces/${TRACE_ID}"]`).click(); + cy.get(`.euiBreadcrumb[href="#/traces/${TRACE_ID}"]`).click(); cy.wait(delay); cy.get('h2.euiTitle').contains(TRACE_ID).should('exist'); - cy.get('.euiBreadcrumb[href="#/trace_analytics/traces"]').click(); + cy.get('.euiBreadcrumb[href="#/traces"]').click(); cy.wait(delay); cy.get('.euiTitle').contains('Traces').should('exist'); - cy.get('.euiBreadcrumb[href="#/trace_analytics/home"]').click(); + cy.get('.euiBreadcrumb[href="#/"]').click(); cy.wait(delay); cy.get('.euiTitle').contains('Dashboard').should('exist'); - cy.get('.euiBreadcrumb[href="observability-dashboards#/"]').click(); + cy.get('.euiBreadcrumb[href="observability-logs#/"]').click(); cy.wait(delay); cy.get('.euiTitle').contains('Event analytics').should('exist'); }); @@ -121,7 +121,7 @@ describe('Testing trace view', () => { describe('Testing traces table', () => { beforeEach(() => { - cy.visit('app/observability-dashboards#/trace_analytics/traces', { + cy.visit('app/observability-traces#/traces', { onBeforeLoad: (win) => { win.sessionStorage.clear(); }, @@ -161,7 +161,7 @@ describe('Testing traces table', () => { describe('Testing switch mode to jaeger', () => { beforeEach(() => { - cy.visit('app/observability-dashboards#/trace_analytics/traces', { + cy.visit('app/observability-traces#/traces', { onBeforeLoad: (win) => { win.sessionStorage.clear(); },