From bbbaae7b82a18ef4930f35f608fbfd514ab6a7d3 Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Thu, 21 Sep 2023 10:06:02 +0530 Subject: [PATCH] test: poll for count --- .../playwright/pages/Dashboard/Grid/Column/LTAR/LinkRecord.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/playwright/pages/Dashboard/Grid/Column/LTAR/LinkRecord.ts b/tests/playwright/pages/Dashboard/Grid/Column/LTAR/LinkRecord.ts index 0a95f771af..6ea0a20344 100644 --- a/tests/playwright/pages/Dashboard/Grid/Column/LTAR/LinkRecord.ts +++ b/tests/playwright/pages/Dashboard/Grid/Column/LTAR/LinkRecord.ts @@ -24,8 +24,7 @@ export class LinkRecord extends BasePage { { const childList = linkRecord.getByTestId(`nc-excluded-list-item`); - const childCards = await childList.count(); - expect(childCards).toEqual(cardTitle.length); + expect.poll(() => linkRecord.getByTestId(`nc-excluded-list-item`).count()).toBe(cardTitle.length); for (let i = 0; i < cardTitle.length; i++) { await childList.nth(i).locator('.nc-display-value').scrollIntoViewIfNeeded(); await childList.nth(i).locator('.nc-display-value').waitFor({ state: 'visible' });