From f3a1f616acc91390fc07a9353b31a4b3a0ddb03e Mon Sep 17 00:00:00 2001 From: Andy Pickering Date: Tue, 16 Jun 2026 11:49:11 +0900 Subject: [PATCH] 4.19: Tests: Fix goToPodDetails helper flakiness --- tests/tests/lightspeed.spec.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/tests/lightspeed.spec.ts b/tests/tests/lightspeed.spec.ts index 567d1aef..90d1e175 100644 --- a/tests/tests/lightspeed.spec.ts +++ b/tests/tests/lightspeed.spec.ts @@ -34,13 +34,9 @@ const goToPodsList = async (page: Page, ns: string | null = null) => { const goToPodDetails = async (page: Page, ns: string, podName: string) => { await goToPodsList(page, ns); await filterByName(page, podName); - const rows = page.locator(resourceRows); - await expect(async () => { - const count = await rows.count(); - expect(count).toBeGreaterThanOrEqual(1); - expect(count).toBeLessThanOrEqual(4); - }).toPass({ timeout: 5_000 }); - await page.locator('a.co-resource-item__resource-name').first().click(); + const link = page.locator(resourceRows).filter({ hasText: podName }); + await expect(link.first()).toBeVisible({ timeout: 30_000 }); + await link.first().click(); }; const popover = '[data-test="ols-plugin__popover"]';