Browse Source

test(cypress): select cell if not active

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4222/head
Pranav C 2 years ago
parent
commit
6f60d12364
  1. 9
      tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts

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

@ -25,7 +25,14 @@ export class SelectOptionCellPageObject extends BasePage {
option: string;
multiSelect?: boolean;
}) {
await this.get({ index, columnHeader }).click();
const selectCell = this.get({ index, columnHeader });
// check if cell active
if (!(await selectCell.getAttribute('class')).includes('active')) {
await selectCell.click();
}
await selectCell.click();
await this.rootPage.getByTestId(`select-option-${columnHeader}-${index}`).getByText(option).click();

Loading…
Cancel
Save