Skip to content

Commit

Permalink
Update traces integration tests (opensearch-project#391)
Browse files Browse the repository at this point in the history
* Update traces cypress tests

Signed-off-by: Rupal Mahajan <maharup@amazon.com>

* Update traces cypress test

Signed-off-by: Rupal Mahajan <maharup@amazon.com>

* Fix traces cypress tests

Signed-off-by: Rupal Mahajan <maharup@amazon.com>

* Fix filters test

Signed-off-by: Rupal Mahajan <maharup@amazon.com>

---------

Signed-off-by: Rupal Mahajan <maharup@amazon.com>
  • Loading branch information
rupal-bq authored Apr 19, 2023
1 parent 3219f14 commit b8f9ca3
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 35 deletions.
32 changes: 16 additions & 16 deletions .cypress/integration/4_trace_analytics_dashboard.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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();
},
Expand All @@ -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();
},
Expand Down Expand Up @@ -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();
},
Expand Down Expand Up @@ -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();
},
Expand Down Expand Up @@ -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');
});

Expand Down Expand Up @@ -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();
},
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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();
},
Expand Down
17 changes: 8 additions & 9 deletions .cypress/integration/5_trace_analytics_services.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
},
Expand All @@ -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();
},
Expand Down Expand Up @@ -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();
},
Expand All @@ -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();
},
Expand Down Expand Up @@ -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();
},
Expand All @@ -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();
},
Expand Down Expand Up @@ -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();
},
Expand Down Expand Up @@ -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();
},
Expand Down
20 changes: 10 additions & 10 deletions .cypress/integration/6_trace_analytics_traces.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
},
Expand All @@ -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();
},
Expand All @@ -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', () => {
Expand All @@ -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();
},
Expand All @@ -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');
});
Expand All @@ -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();
},
Expand Down Expand Up @@ -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();
},
Expand Down

0 comments on commit b8f9ca3

Please sign in to comment.