From a8ea8ae78e9dbe9027bfa3c4a2cb1137b18b08c2 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Thu, 24 Jun 2021 08:36:29 -0400 Subject: [PATCH] Fix page tests Signed-off-by: Sebastian Malton --- integration/__tests__/cluster-pages.tests.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/integration/__tests__/cluster-pages.tests.ts b/integration/__tests__/cluster-pages.tests.ts index 46b260a001..27a0b508a8 100644 --- a/integration/__tests__/cluster-pages.tests.ts +++ b/integration/__tests__/cluster-pages.tests.ts @@ -43,10 +43,6 @@ describe("Lens cluster pages", () => { const ready = minikubeReady(TEST_NAMESPACE); let clusterAdded = false; - afterEach(() => { - clusterAdded = false; - }); - utils.describeIf(ready)("test common pages", () => { const addCluster = async () => { await waitForMinikubeDashboard(app); @@ -60,7 +56,10 @@ describe("Lens cluster pages", () => { clusterAdded = true; }; - const tearDown = () => utils.tearDown(app); + const tearDown = async () => { + await utils.tearDown(app); + clusterAdded = false; + }; describe("cluster add", () => { utils.beforeAllWrapped(async () => { @@ -84,8 +83,8 @@ describe("Lens cluster pages", () => { } describe("cluster pages", () => { - utils.beforeEachWrapped(appStartAddCluster); - utils.afterEachWrapped(tearDown); + utils.beforeAllWrapped(appStartAddCluster); + utils.afterAllWrapped(tearDown); const tests: { drawer?: string