Browse Source

test: add escape to move away from edit mode before right click

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5271/head
Raju Udava 2 years ago
parent
commit
cc2dff7236
  1. 7
      tests/playwright/pages/Dashboard/common/Cell/index.ts

7
tests/playwright/pages/Dashboard/common/Cell/index.ts

@ -289,8 +289,11 @@ export class CellPageObject extends BasePage {
// editable cell // editable cell
await cell.dblclick(); await cell.dblclick();
await expect(await cell.locator(`input`)).toHaveCount(param.role === 'creator' || param.role === 'editor' ? 1 : 0); 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( await expect(await this.rootPage.locator(`.nc-dropdown-grid-context-menu:visible`)).toHaveCount(
param.role === 'creator' || param.role === 'editor' ? 1 : 0 param.role === 'creator' || param.role === 'editor' ? 1 : 0
); );

Loading…
Cancel
Save