From de2bd9a0f9f714331452424068d533c1a67c461c Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Wed, 30 Nov 2022 17:59:01 +0530 Subject: [PATCH] feat(playwright): Potential fix for keyboard shortcuts test --- tests/playwright/pages/Dashboard/common/Cell/index.ts | 3 ++- tests/playwright/tests/keyboardShortcuts.spec.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/playwright/pages/Dashboard/common/Cell/index.ts b/tests/playwright/pages/Dashboard/common/Cell/index.ts index 921fbfb2d6..204375dcda 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/index.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/index.ts @@ -31,7 +31,8 @@ export class CellPageObject extends BasePage { } async click({ index, columnHeader }: { index: number; columnHeader: string }) { - return await this.get({ index, columnHeader }).click(); + await this.get({ index, columnHeader }).click(); + await (await this.get({ index, columnHeader }).elementHandle()).waitForElementState('stable'); } async dblclick({ index, columnHeader }: { index?: number; columnHeader: string }) { diff --git a/tests/playwright/tests/keyboardShortcuts.spec.ts b/tests/playwright/tests/keyboardShortcuts.spec.ts index 11dc129cc5..ab70d932d8 100644 --- a/tests/playwright/tests/keyboardShortcuts.spec.ts +++ b/tests/playwright/tests/keyboardShortcuts.spec.ts @@ -66,6 +66,7 @@ test.describe('Verify shortcuts', () => { await dashboard.treeView.openTable({ title: 'Country' }); await page.waitForTimeout(1500); await grid.cell.click({ index: 0, columnHeader: 'Country' }); + await page.waitForTimeout(1500); await page.keyboard.press('Meta+ArrowRight'); await grid.cell.verifyCellActiveSelected({ index: 0, columnHeader: 'City List' });