From cc2dff7236443191feceeca6d7b12637e4b97820 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Fri, 10 Mar 2023 11:39:45 +0530 Subject: [PATCH] test: add escape to move away from edit mode before right click Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- tests/playwright/pages/Dashboard/common/Cell/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/playwright/pages/Dashboard/common/Cell/index.ts b/tests/playwright/pages/Dashboard/common/Cell/index.ts index 5d5da5f46e..23f9b0d0b1 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/index.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/index.ts @@ -289,8 +289,11 @@ export class CellPageObject extends BasePage { // editable cell await cell.dblclick(); await expect(await cell.locator(`input`)).toHaveCount(param.role === 'creator' || param.role === 'editor' ? 1 : 0); - // right click context menu - await cell.click({ button: 'right' }); + + // press escape to close the input + await cell.press('Escape'); + + await cell.click({ button: 'right', clickCount: 1 }); await expect(await this.rootPage.locator(`.nc-dropdown-grid-context-menu:visible`)).toHaveCount( param.role === 'creator' || param.role === 'editor' ? 1 : 0 );