From b6758c449f23cae0a7e0d76493127900eab964be Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Wed, 26 Apr 2023 15:26:01 +0530 Subject: [PATCH] fix: undo redo --- tests/playwright/pages/Dashboard/Grid/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 });