mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-02 16:16:44 +00:00
@@ -112,4 +112,37 @@ export class SelectOptionCellPageObject extends BasePage {
|
||||
await this.get({ index, columnHeader }).click();
|
||||
await this.rootPage.locator(`.nc-dropdown-single-select-cell`).nth(index).waitFor({ state: 'hidden' });
|
||||
}
|
||||
|
||||
async addNewOption({
|
||||
index,
|
||||
columnHeader,
|
||||
option,
|
||||
multiSelect,
|
||||
}: {
|
||||
index: number;
|
||||
columnHeader: string;
|
||||
option: string;
|
||||
multiSelect?: boolean;
|
||||
}) {
|
||||
const selectCell = this.get({ index, columnHeader });
|
||||
|
||||
// check if cell active
|
||||
if (!(await selectCell.getAttribute('class')).includes('active')) {
|
||||
await selectCell.click();
|
||||
}
|
||||
|
||||
await selectCell.locator('.ant-select-selection-search-input').type(option);
|
||||
|
||||
await selectCell.locator('.ant-select-selection-search-input').press('Enter');
|
||||
|
||||
if (multiSelect) await selectCell.locator('.ant-select-selection-search-input').press('Escape');
|
||||
|
||||
// await this.rootPage.getByTestId(`select-option-${columnHeader}-${index}`).getByText(option).click();
|
||||
//
|
||||
//
|
||||
// await this.rootPage
|
||||
// .getByTestId(`select-option-${columnHeader}-${index}`)
|
||||
// .getByText(option)
|
||||
// .waitFor({ state: 'hidden' });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user