Browse Source

fix: playwright test select dropdown visibility issue

pull/7286/head
Ramesh Mane 11 months ago
parent
commit
5856ddc228
  1. 12
      tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts
  2. 12
      tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts

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

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

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

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

Loading…
Cancel
Save