test(playwright): make cell active if not in active state

Signed-off-by: Pranav C <pranavxc@gmail.com>
This commit is contained in:
Pranav C
2022-11-16 18:57:00 +05:30
parent 6f60d12364
commit 3daf8c3eb4

View File

@@ -95,6 +95,13 @@ export class SelectOptionCellPageObject extends BasePage {
}
async verifyOptions({ index, columnHeader, options }: { index: number; columnHeader: string; options: string[] }) {
const selectCell = this.get({ index, columnHeader });
// check if cell active
if (!(await selectCell.getAttribute('class')).includes('active')) {
await selectCell.click();
}
await this.get({ index, columnHeader }).click();
let counter = 0;