From fd89cc7f7ebedb2ffb41fead112a3c0b5807bdd5 Mon Sep 17 00:00:00 2001 From: Ritvi Bhatt Date: Tue, 10 Dec 2024 11:37:24 -0800 Subject: [PATCH 1/4] change time value to 24 when setting time Signed-off-by: Ritvi Bhatt --- .cypress/utils/app_constants.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.cypress/utils/app_constants.js b/.cypress/utils/app_constants.js index 5064e4f165..81b11b6c12 100644 --- a/.cypress/utils/app_constants.js +++ b/.cypress/utils/app_constants.js @@ -136,6 +136,7 @@ export const moveToEditPage = () => { export const changeTimeTo24 = (timeUnit) => { cy.get('[data-test-subj="superDatePickerToggleQuickMenuButton"]').trigger('mouseover').click({ force: true }); + cy.get('[aria-label="Time value"]').type('{selectall}24'); cy.get('[aria-label="Time unit"]').select(timeUnit); cy.get('.euiButton').contains('Apply').click(); cy.get('[data-test-subj="superDatePickerApplyTimeButton"]').click(); From e4d340c43cc25549b3a92fdf833ef58e386db1de Mon Sep 17 00:00:00 2001 From: Ritvi Bhatt Date: Tue, 10 Dec 2024 14:08:04 -0800 Subject: [PATCH 2/4] move intercepts earlier Signed-off-by: Ritvi Bhatt --- .cypress/integration/app_analytics_test/app_analytics.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cypress/integration/app_analytics_test/app_analytics.spec.js b/.cypress/integration/app_analytics_test/app_analytics.spec.js index bee7aba52c..125715b029 100644 --- a/.cypress/integration/app_analytics_test/app_analytics.spec.js +++ b/.cypress/integration/app_analytics_test/app_analytics.spec.js @@ -433,13 +433,13 @@ describe('Viewing application', () => { it('Changes availability visualization', () => { + cy.intercept('PUT', `**/api/observability/application`).as('selectUpdate'); + cy.intercept('GET', `**/api/observability/operational_panels/panels/**`).as('loadingPanels') cy.get('[data-test-subj="app-analytics-configTab"]').click(); cy.get('select').select(visOneName); - cy.intercept('PUT', `**/api/observability/application`).as('selectUpdate'); cy.wait('@selectUpdate'); moveToHomePage(); - cy.intercept('GET', `**/api/observability/operational_panels/panels/**`).as('loadingPanels') cy.wait('@loadingPanels'); cy.reload(); cy.get('[data-test-subj="AvailableAvailabilityBadge"][style="background-color: rgb(84, 179, 153); color: rgb(0, 0, 0);"]').should('contain', 'Available'); From 51a3d163631b0bb1bf028b4d9295dec5463c1e0d Mon Sep 17 00:00:00 2001 From: Ritvi Bhatt Date: Tue, 10 Dec 2024 14:44:30 -0800 Subject: [PATCH 3/4] wait for query to load before visualizing data Signed-off-by: Ritvi Bhatt --- .../integration/event_analytics_test/event_analytics.spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.cypress/integration/event_analytics_test/event_analytics.spec.js b/.cypress/integration/event_analytics_test/event_analytics.spec.js index 86cea2f1ae..fe07517ea6 100644 --- a/.cypress/integration/event_analytics_test/event_analytics.spec.js +++ b/.cypress/integration/event_analytics_test/event_analytics.spec.js @@ -479,6 +479,7 @@ describe('Visualizing data', () => { }); it('Visualize vertical bar chart', () => { + cy.get('[data-test-subj="globalLoadingIndicator"]').should('not.exist'); cy.get('[data-test-subj="comboBoxInput"]').eq(1).click(); cy.get('[data-test-subj="comboBoxOptionsList "] span').contains(VIS_TYPE_VBAR).click(); cy.get('[data-test-subj="vizConfigSection-series"]') From c265691e7c87d3c3b4405b5d06e10fcf5d60026f Mon Sep 17 00:00:00 2001 From: Ritvi Bhatt Date: Tue, 10 Dec 2024 15:11:28 -0800 Subject: [PATCH 4/4] wait for table to load before clicking trace Signed-off-by: Ritvi Bhatt --- .../trace_analytics_test/trace_analytics_traces.spec.js | 1 + 1 file changed, 1 insertion(+) 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 96229d932b..a6a3e89f37 100644 --- a/.cypress/integration/trace_analytics_test/trace_analytics_traces.spec.js +++ b/.cypress/integration/trace_analytics_test/trace_analytics_traces.spec.js @@ -164,6 +164,7 @@ describe('Testing traces tree view', () => { cy.get("[data-test-subj='indexPattern-switch-link']").click(); cy.get("[data-test-subj='data_prepper-mode']").click(); setTimeFilter(); + cy.get('[data-test-subj="globalLoadingIndicator"]').should('not.exist'); cy.contains('02feb3a4f611abd81f2a53244d1278ae').click(); cy.get('h1.overview-content').contains('02feb3a4f611abd81f2a53244d1278ae').should('exist'); });