From e6d4a947086e51a8daec717202064b772d9768cb Mon Sep 17 00:00:00 2001 From: Ritvi Bhatt Date: Fri, 8 Nov 2024 15:36:49 -0800 Subject: [PATCH] wait for page to load before checking rows Signed-off-by: Ritvi Bhatt --- .../trace_analytics_test/trace_analytics_services.spec.js | 3 ++- .../trace_analytics_test/trace_analytics_traces.spec.js | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.cypress/integration/trace_analytics_test/trace_analytics_services.spec.js b/.cypress/integration/trace_analytics_test/trace_analytics_services.spec.js index 7051c94f7..3e60541b1 100644 --- a/.cypress/integration/trace_analytics_test/trace_analytics_services.spec.js +++ b/.cypress/integration/trace_analytics_test/trace_analytics_services.spec.js @@ -222,6 +222,7 @@ describe('Testing traces Spans table verify table headers functionality', () => }); it('Render Spans table and change data table Density', () => { + cy.get('.euiLink.euiLink--primary').contains('authentication').should('exist'); cy.get('*[data-test-subj^="service-flyout-action-btntrace_service"]').eq(1).click(); cy.get('[data-test-subj="ActionContextMenu"]').click(); cy.get('[data-test-subj="viewServiceButton"]').click(); @@ -284,7 +285,7 @@ describe('Testing traces Spans table and verify columns functionality', () => { cy.get('.euiBadge__content .euiBadge__text').contains('spanId: 277a5934acf55dcf').should('exist'); count_table_row(1); cy.get('[aria-label="remove current filter"]').click(); - cy.get('[aria-label="remove current filter"]').should('not.exist'); + cy.get('.panel-title-count').contains('8').should('exist'); count_table_row(8); }); diff --git a/.cypress/integration/trace_analytics_test/trace_analytics_traces.spec.js b/.cypress/integration/trace_analytics_test/trace_analytics_traces.spec.js index b447dd0ef..91f91ecdc 100644 --- a/.cypress/integration/trace_analytics_test/trace_analytics_traces.spec.js +++ b/.cypress/integration/trace_analytics_test/trace_analytics_traces.spec.js @@ -29,6 +29,8 @@ describe('Testing traces table', () => { win.sessionStorage.clear(); }, }); + cy.get("[data-test-subj='indexPattern-switch-link']").click(); + cy.get("[data-test-subj='data_prepper-mode']").click(); setTimeFilter(); }); @@ -66,6 +68,8 @@ describe('Testing trace view', () => { win.sessionStorage.clear(); }, }); + cy.get("[data-test-subj='indexPattern-switch-link']").click(); + cy.get("[data-test-subj='data_prepper-mode']").click(); setTimeFilter(); cy.get('input[type="search"]').focus().type(`${TRACE_ID}`); cy.get('[data-test-subj="superDatePickerApplyTimeButton"]').click(); @@ -86,7 +90,6 @@ describe('Testing trace view', () => { it('Has working breadcrumbs', () => { cy.get('.euiBreadcrumb').contains(TRACE_ID).click(); - // cy.get('h1.overview-content').contains(TRACE_ID).should('exist'); cy.get('.euiBreadcrumb').contains('Traces').click(); cy.get('.euiBreadcrumb').contains('Trace analytics').click(); cy.get('.euiBreadcrumb').contains('Observability').click(); @@ -118,11 +121,12 @@ describe('Testing traces table', () => { win.sessionStorage.clear(); }, }); + cy.get("[data-test-subj='indexPattern-switch-link']").click(); + cy.get("[data-test-subj='data_prepper-mode']").click(); setTimeFilter(); }); it('Renders the traces table and verify Table Column, Pagination and Rows Data ', () => { - cy.contains(' (108)').should('exist'); cy.get('.euiTableCellContent__text').contains('Trace ID').should('exist'); cy.get('.euiTableCellContent__text').contains('Trace group').should('exist'); cy.get('.euiTableCellContent__text').contains('Duration (ms)').should('exist');