Browse Source

fix: playwright form view select field dblClick issue

pull/7348/head
Ramesh Mane 9 months ago
parent
commit
e0a1d227ee
  1. 4
      tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts
  2. 4
      tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts
  3. 1
      tests/playwright/tests/db/views/viewForm.spec.ts

4
tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts

@ -47,11 +47,11 @@ export class SelectOptionCellPageObject extends BasePage {
if (index === -1) { if (index === -1) {
const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-undefined`).getByText(option); const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-undefined`).getByText(option);
await selectOption.waitFor({ state: 'visible' }); await selectOption.scrollIntoViewIfNeeded();
await selectOption.click(); await selectOption.click();
} else { } else {
const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-${index}`).getByText(option); const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-${index}`).getByText(option);
await selectOption.waitFor({ state: 'visible' }); await selectOption.scrollIntoViewIfNeeded();
await selectOption.click(); await selectOption.click();
} }

4
tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts

@ -41,11 +41,11 @@ export class UserOptionCellPageObject extends BasePage {
if (index === -1) { if (index === -1) {
const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-undefined`).getByText(option); const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-undefined`).getByText(option);
await selectOption.waitFor({ state: 'visible' }); await selectOption.scrollIntoViewIfNeeded();
await selectOption.click(); await selectOption.click();
} else { } else {
const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-${index}`).getByText(option); const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-${index}`).getByText(option);
await selectOption.waitFor({ state: 'visible' }); await selectOption.scrollIntoViewIfNeeded();
await selectOption.click(); await selectOption.click();
} }

1
tests/playwright/tests/db/views/viewForm.spec.ts

@ -478,6 +478,7 @@ test.describe('Form view', () => {
columnHeader: 'SingleSelect', columnHeader: 'SingleSelect',
option: 'jan', option: 'jan',
multiSelect: false, multiSelect: false,
ignoreDblClick: true,
}); });
// Click on multi select options // Click on multi select options

Loading…
Cancel
Save