Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cypress v12.8.1 - Fixes for panels #481

Closed
wants to merge 10 commits into from
1,002 changes: 548 additions & 454 deletions .cypress/integration/3_panels.spec.ts

Large diffs are not rendered by default.

20 changes: 6 additions & 14 deletions .cypress/integration/4_trace_analytics_dashboard.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ describe('Testing dashboard table empty state', () => {
win.sessionStorage.clear();
},
});
cy.wait(delay * 3);
});

it('Renders empty state', () => {
Expand Down Expand Up @@ -104,23 +103,19 @@ describe('Testing dashboard table', () => {
cy.get('.euiBreadcrumb').contains('Trace analytics').click();
cy.get('.euiTitle').contains('Dashboard').should('exist');
cy.get('.euiBreadcrumb').contains('Observability').click();
cy.get('.euiTitle').contains('Event analytics').should('exist');
cy.get('.euiTitle').contains('Logs').should('exist');
});

it('Adds the percentile filters', () => {
cy.contains(' >= 95 percentile').click({ force: true });
cy.wait(delay);
cy.contains(' >= 95 percentile').click({ force: true });
cy.wait(delay);

cy.contains('Latency percentile within trace group: >= 95th').should('exist');
cy.contains(' (7)').should('exist');
cy.contains('318.69').should('exist');

cy.contains(' < 95 percentile').click({ force: true });
cy.wait(delay);
cy.contains(' < 95 percentile').click({ force: true });
cy.wait(delay);

cy.contains('Latency percentile within trace group: < 95th').should('exist');
cy.contains(' (8)').should('exist');
Expand All @@ -134,16 +129,13 @@ describe('Testing dashboard table', () => {
});

it('Redirects to traces table with filter', () => {
cy.wait(delay);
cy.get('.euiLink').contains('13').click();
cy.wait(delay);

cy.get('h2.euiTitle').contains('Traces').should('exist');
cy.contains(' (13)').should('exist');
cy.contains('client_create_order').should('exist');

cy.get('.euiSideNavItemButton__label').contains('Trace analytics').click();
cy.wait(delay);

cy.contains('client_create_order').should('exist');
});
Expand Down Expand Up @@ -211,7 +203,6 @@ describe('Latency by trace group table', () =>{
it('Sorts the Latency by trace group table', () => {
cy.get('span[title*="Trace group name"]').click();
cy.get('[data-test-subj="dashboard-table-trace-group-name-button"]').eq(0).contains('/**').should('exist');
cy.wait(delay);
});

it('Verify tooltips in Latency by trace group table', () => {
Expand All @@ -232,7 +223,7 @@ describe('Latency by trace group table', () =>{
it('Verify Search engine on Trace dashboard', () => {
cy.get('.euiFieldSearch.euiFieldSearch--fullWidth').click().type('client_pay_order');
cy.get('[data-test-subj="superDatePickerApplyTimeButton"]').click();
cy.wait(delay);
cy.wait(delay);//Fails without
cy.get('.euiTableCellContent.euiTableCellContent--alignRight.euiTableCellContent--overflowingContent').contains('211.04').should('exist');
cy.get('button[data-test-subj="dashboard-table-trace-group-name-button"]').click();
cy.get('.euiBadge.euiBadge--hollow.euiBadge--iconRight.globalFilterItem').click();
Expand Down Expand Up @@ -264,6 +255,7 @@ describe('Testing filters on trace analytics page', { scrollBehavior: false }, (
});

it('Verify Change all filters', () =>{
cy.wait(delay);//Needed after removing waits from setTimeFilter()
cy.get('[data-test-subj="global-filter-button"]').click();
cy.get('.euiContextMenuPanelTitle').contains('Change all filters').should('exist');
cy.get('.euiContextMenuItem__text').eq(0).contains('Enable all');
Expand All @@ -274,8 +266,10 @@ describe('Testing filters on trace analytics page', { scrollBehavior: false }, (
})

it('Verify Add filter section', () => {
cy.wait(delay);//Needed after removing waits from setTimeFilter()
cy.get('[data-test-subj="addfilter"]').contains('+ Add filter').click();
cy.get('.euiPopoverTitle').contains('Add filter').should('exist');
cy.wait(delay);//drop down won't open without
cy.get('.euiComboBox__inputWrap.euiComboBox__inputWrap--noWrap').eq(0).trigger('mouseover').click();
cy.get('.euiComboBoxOption__content').eq(1).click();
cy.get('.euiComboBox__inputWrap.euiComboBox__inputWrap--noWrap').eq(1).trigger('mouseover').click();
Expand Down Expand Up @@ -370,9 +364,7 @@ describe('Testing switch mode to jaeger', () => {
});

it('Verifies traces links to traces page', () => {
cy.wait(delay);
cy.get('.euiLink').contains('7').click();
cy.wait(delay);

cy.get('h2.euiTitle').contains('Traces').should('exist');
cy.contains(' (7)').should('exist');
Expand All @@ -391,4 +383,4 @@ describe('Testing switch mode to jaeger', () => {
cy.contains('Error rate').should('exist');
cy.contains('Traces').should('exist');
});
});
});
33 changes: 5 additions & 28 deletions .cypress/integration/5_trace_analytics_services.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ describe('Testing services table empty state', () => {
win.sessionStorage.clear();
},
});
cy.wait(delay * 3);
});

it('Renders empty state', () => {
Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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();
});

Expand All @@ -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');
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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);
});

Expand All @@ -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', () => {
Expand All @@ -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')
Expand Down
14 changes: 3 additions & 11 deletions .cypress/integration/6_trace_analytics_traces.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ describe('Testing traces table empty state', () => {
win.sessionStorage.clear();
},
});
cy.wait(delay * 3);
});

it('Renders empty state', () => {
Expand Down Expand Up @@ -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();
});

Expand All @@ -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');
Expand Down Expand Up @@ -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;
Expand Down
Loading