From bb5a39faefd6d800c5eb8fb552159bccc70641f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=A4ggmark?= Date: Thu, 24 Feb 2022 10:55:00 +0100 Subject: [PATCH] Chore: Enables flakey e2e test (#45816) --- .../templating-dashboard-links-and-variables.spec.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/e2e/dashboards-suite/templating-dashboard-links-and-variables.spec.ts b/e2e/dashboards-suite/templating-dashboard-links-and-variables.spec.ts index 39c87b73448..a2b6a252631 100644 --- a/e2e/dashboards-suite/templating-dashboard-links-and-variables.spec.ts +++ b/e2e/dashboards-suite/templating-dashboard-links-and-variables.spec.ts @@ -5,7 +5,7 @@ e2e.scenario({ itName: 'Tests dashboard links and variables in links', addScenarioDataSource: false, addScenarioDashBoard: false, - skipScenario: true, // Skipped because it was causing many failures in main. + skipScenario: false, scenario: () => { e2e.flows.openDashboard({ uid: 'yBCC3aKGk' }); e2e() @@ -21,7 +21,9 @@ e2e.scenario({ }) .as('tagsDemoSearch'); - // waiting for links to render, couldn't find a better way using routes for instance + // waiting for network requests first + e2e().wait(['@tagsTemplatingSearch', '@tagsDemoSearch']); + // and then waiting for links to render e2e().wait(1000); const verifyLinks = (variableValue: string) => { @@ -36,11 +38,7 @@ e2e.scenario({ }); }; - e2e.components.DashboardLinks.dropDown() - .should('be.visible') - .click() - .wait('@tagsTemplatingSearch') - .wait('@tagsDemoSearch'); + e2e.components.DashboardLinks.dropDown().should('be.visible').click().wait('@tagsTemplatingSearch'); // verify all links, should have All value verifyLinks('All');