diff --git a/tests/playwright/pages/Dashboard/Grid/index.ts b/tests/playwright/pages/Dashboard/Grid/index.ts index 8f53c922ab..9819a567e2 100644 --- a/tests/playwright/pages/Dashboard/Grid/index.ts +++ b/tests/playwright/pages/Dashboard/Grid/index.ts @@ -72,10 +72,12 @@ export class GridPage extends BasePage { networkValidation?: boolean; } = {}) { const rowValue = value ?? `Row ${index}`; + // wait for render to complete before count + await this.get().locator('.nc-grid-row').nth(0).waitFor({ state: 'attached' }); const rowCount = await this.get().locator('.nc-grid-row').count(); await this.get().locator('.nc-grid-add-new-cell').click(); - await expect(this.get().locator('.nc-grid-row')).toHaveCount(rowCount + 1); + await expect(await this.get().locator('.nc-grid-row')).toHaveCount(rowCount + 1); await this._fillRow({ index, columnHeader, value: rowValue });