test(cypress): select cell if not active

Signed-off-by: Pranav C <pranavxc@gmail.com>
This commit is contained in:
Pranav C
2022-11-14 18:28:52 +05:30
parent 2a7c90f064
commit 6f60d12364

View File

@@ -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();