diff --git a/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts b/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts index 5c45dbddac..d8f6a2e6c7 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts +++ b/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(); diff --git a/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts b/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts index c7a7a09e86..8b6398f5c6 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/UserOptionCell.ts +++ b/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();