mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-02 21:46:49 +00:00
test(playwright): add method to verify selected options
Signed-off-by: Pranav C <pranavxc@gmail.com>
This commit is contained in:
@@ -136,13 +136,24 @@ export class SelectOptionCellPageObject extends BasePage {
|
||||
await selectCell.locator('.ant-select-selection-search-input').press('Enter');
|
||||
|
||||
if (multiSelect) await selectCell.locator('.ant-select-selection-search-input').press('Escape');
|
||||
// todo: wait for update api call
|
||||
}
|
||||
|
||||
// await this.rootPage.getByTestId(`select-option-${columnHeader}-${index}`).getByText(option).click();
|
||||
//
|
||||
//
|
||||
// await this.rootPage
|
||||
// .getByTestId(`select-option-${columnHeader}-${index}`)
|
||||
// .getByText(option)
|
||||
// .waitFor({ state: 'hidden' });
|
||||
async verifySelectedOptions({
|
||||
index,
|
||||
options,
|
||||
columnHeader,
|
||||
}: {
|
||||
columnHeader: string;
|
||||
options: string[];
|
||||
index: number;
|
||||
}) {
|
||||
const selectCell = this.get({ index, columnHeader });
|
||||
|
||||
let counter = 0;
|
||||
for (const option of options) {
|
||||
await expect(selectCell.locator(`.nc-selected-option`).nth(counter)).toHaveText(option);
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user