Browse Source

feat(playwright): Potential fix for keyboard shortcuts test

pull/4482/head
Muhammed Mustafa 2 years ago
parent
commit
de2bd9a0f9
  1. 3
      tests/playwright/pages/Dashboard/common/Cell/index.ts
  2. 1
      tests/playwright/tests/keyboardShortcuts.spec.ts

3
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 }) {

1
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' });

Loading…
Cancel
Save