Browse Source

test: poll for count

pull/6424/head
DarkPhoenix2704 11 months ago
parent
commit
b4dab16542
  1. 3
      tests/playwright/pages/SharedForm/index.ts

3
tests/playwright/pages/SharedForm/index.ts

@ -58,8 +58,7 @@ export class SharedFormPage extends BasePage {
{
const childList = linkRecord.locator(`.ant-card`);
const childCards = await childList.count();
expect(childCards).toEqual(cardTitle.length);
expect.poll(() => linkRecord.locator(`.ant-card`).count()).toBe(cardTitle.length);
for (let i = 0; i < cardTitle.length; i++) {
expect(await childList.nth(i).textContent()).toContain(cardTitle[i]);
}

Loading…
Cancel
Save