From 71aeca7e7cae2dd6e9d89cd01683078dac7e8942 Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Mon, 9 Aug 2021 14:31:35 +0300 Subject: [PATCH] Fixing integration tests (no check for Telemetry tab) Signed-off-by: Alex Andreev --- integration/__tests__/app.tests.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/integration/__tests__/app.tests.ts b/integration/__tests__/app.tests.ts index 450f6bd039..867a49619a 100644 --- a/integration/__tests__/app.tests.ts +++ b/integration/__tests__/app.tests.ts @@ -56,14 +56,13 @@ describe("Lens integration tests", () => { await app.client.waitUntilTextExists("[data-testid=application-header]", "Application"); }); - it("shows all tabs and their contents", async () => { - await app.client.click("[data-testid=application-tab]"); - await app.client.click("[data-testid=proxy-tab]"); - await app.client.waitUntilTextExists("[data-testid=proxy-header]", "Proxy"); - await app.client.click("[data-testid=kube-tab]"); - await app.client.waitUntilTextExists("[data-testid=kubernetes-header]", "Kubernetes"); - await app.client.click("[data-testid=telemetry-tab]"); - await app.client.waitUntilTextExists("[data-testid=telemetry-header]", "Telemetry"); + it.each([ + ["application", "Application"], + ["proxy", "Proxy"], + ["kubernetes", "Kubernetes"], + ])("Can click the %s tab and see the %s header", async (tab, header) => { + await app.client.click(`[data-testid=${tab}-tab]`); + await app.client.waitUntilTextExists(`[data-testid=${tab}-header]`, header); }); it("ensures helm repos", async () => {