From 0f6b0f3ceb8e573f64f783b3be1724e7e907a9ec Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Wed, 30 Nov 2022 15:49:16 +0300 Subject: [PATCH] Fixing finding wrapped log line height Signed-off-by: Alex Andreev --- integration/__tests__/cluster-pages.tests.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/integration/__tests__/cluster-pages.tests.ts b/integration/__tests__/cluster-pages.tests.ts index 8224d2e4cf..1cd21c240c 100644 --- a/integration/__tests__/cluster-pages.tests.ts +++ b/integration/__tests__/cluster-pages.tests.ts @@ -189,9 +189,9 @@ describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => { await frame.waitForSelector(".Dock.isOpen"); const logLine = await frame.waitForSelector("[data-testid=pod-log-list] [data-index='0']"); - let boundingBox = await logLine.boundingBox(); + const lineBoundingBox = await logLine.boundingBox(); - expect(boundingBox?.height).toBeLessThan(30); + expect(lineBoundingBox?.height).toBeLessThan(30); const showWrapLogsCheckbox = await frame.waitForSelector( "[data-testid='log-controls'] .wrap-logs", @@ -199,9 +199,10 @@ describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => { await showWrapLogsCheckbox.click(); - boundingBox = await logLine.boundingBox(); + const wrappedLogLine = await frame.waitForSelector("[data-testid=pod-log-list] [data-index='0']"); + const wrappedLineBoundingBox = await wrappedLogLine.boundingBox(); - expect(boundingBox?.height).toBeGreaterThan(30); + expect(wrappedLineBoundingBox?.height).toBeGreaterThan(30); }, 10 * 60 * 1000, );