From 15f63eb1a899b3387e5e2282ff2671fa94bf588e Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Mon, 8 Apr 2024 12:18:10 +0000 Subject: [PATCH] test: fix2 --- tests/playwright/pages/Dashboard/Grid/index.ts | 4 +++- tests/playwright/tests/db/features/undo-redo.spec.ts | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/playwright/pages/Dashboard/Grid/index.ts b/tests/playwright/pages/Dashboard/Grid/index.ts index 08ae42dcd7..e0d2c0f7e2 100644 --- a/tests/playwright/pages/Dashboard/Grid/index.ts +++ b/tests/playwright/pages/Dashboard/Grid/index.ts @@ -211,10 +211,12 @@ export class GridPage extends BasePage { return await expect(this.get().locator(`td[data-testid="cell-Title-${index}"]`)).toHaveCount(0); } - async deleteRow(index: number, title = 'Title') { + async clickRow(index: number, title = 'Title') { await this.get().getByTestId(`cell-${title}-${index}`).click(); await this.rootPage.waitForTimeout(300); + } + async deleteRow(index: number, title = 'Title') { await this.get().getByTestId(`cell-${title}-${index}`).click({ button: 'right', }); diff --git a/tests/playwright/tests/db/features/undo-redo.spec.ts b/tests/playwright/tests/db/features/undo-redo.spec.ts index 3a03beea38..b8bbaa4613 100644 --- a/tests/playwright/tests/db/features/undo-redo.spec.ts +++ b/tests/playwright/tests/db/features/undo-redo.spec.ts @@ -144,7 +144,9 @@ test.describe('Undo Redo', () => { await verifyRecords([555, 666]); // Row.Delete + await grid.clickRow(10, 'Number'); await grid.deleteRow(10, 'Number'); + await grid.clickRow(10, 'Number'); await grid.deleteRow(10, 'Number'); await verifyRecords([]);