Skip to content

Commit e0b4d82

Browse files
committed
PF5: Tests: Fix goToPodDetails helper flakiness
1 parent 65d00db commit e0b4d82

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

tests/tests/lightspeed.spec.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,9 @@ const goToPodsList = async (page: Page, ns: string | null = null) => {
3434
const goToPodDetails = async (page: Page, ns: string, podName: string) => {
3535
await goToPodsList(page, ns);
3636
await filterByName(page, podName);
37-
const rows = page.locator(resourceRows);
38-
await expect(async () => {
39-
const count = await rows.count();
40-
expect(count).toBeGreaterThanOrEqual(1);
41-
expect(count).toBeLessThanOrEqual(4);
42-
}).toPass({ timeout: 5_000 });
43-
await page.locator('a.co-resource-item__resource-name').first().click();
37+
const link = page.locator(resourceRows).filter({ hasText: podName });
38+
await expect(link.first()).toBeVisible({ timeout: 30_000 });
39+
await link.first().click();
4440
};
4541

4642
const popover = '[data-test="ols-plugin__popover"]';

0 commit comments

Comments
 (0)