From c5243c09080691eebcaab8e1d056e1a592d51000 Mon Sep 17 00:00:00 2001 From: Ivan Ortega Alba Date: Fri, 20 Jun 2025 09:18:04 +0200 Subject: [PATCH] E2E: Stabilize smoke tests for slow GH instances (#106995) Test --- .../smoke-tests-suite/panels_smokescreen.spec.ts | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/e2e/old-arch/smoke-tests-suite/panels_smokescreen.spec.ts b/e2e/old-arch/smoke-tests-suite/panels_smokescreen.spec.ts index 5ba784d72b2..ca63dadba19 100644 --- a/e2e/old-arch/smoke-tests-suite/panels_smokescreen.spec.ts +++ b/e2e/old-arch/smoke-tests-suite/panels_smokescreen.spec.ts @@ -14,17 +14,11 @@ describe('Panels smokescreen', () => { it('Tests each panel type in the panel edit view to ensure no crash', () => { e2e.flows.addDashboard(); - // TODO: Try and use e2e.flows.addPanel() instead of block below - try { - e2e.components.PageToolbar.itemButton('Add button').should('be.visible'); - e2e.components.PageToolbar.itemButton('Add button').click(); - } catch (e) { - // Depending on the screen size, the "Add panel" button might be hidden - e2e.components.PageToolbar.item('Show more items').click(); - e2e.components.PageToolbar.item('Add button').last().click(); - } - e2e.pages.AddDashboard.itemButton('Add new visualization menu item').should('be.visible'); - e2e.pages.AddDashboard.itemButton('Add new visualization menu item').click(); + e2e.flows.addPanel({ + dataSourceName: 'gdev-testdata', + timeout: 10000, + visitDashboardAtStart: false, + }); cy.window().then((win: Cypress.AUTWindow & { grafanaBootData: GrafanaBootConfig['bootData'] }) => { // Loop through every panel type and ensure no crash