fix(test): user select field test fail issue

This commit is contained in:
Ramesh Mane
2025-01-28 13:18:35 +00:00
parent 2d61a42439
commit 15bea3417f
4 changed files with 530 additions and 530 deletions

View File

@@ -51,7 +51,7 @@ export class UserOptionColumnPageObject extends BasePage {
const selector = this.column.get().locator('.nc-user-select >> .ant-select-selector');
await selector.click();
await this.rootPage.locator('.nc-dropdown-user-select-cell').waitFor({ state: 'visible' });
await this.rootPage.locator('.nc-dropdown-user-select-cell.active').waitFor({ state: 'visible' });
if (multiSelect) {
const optionsToSelect = Array.isArray(option) ? option : [option];
@@ -66,7 +66,7 @@ export class UserOptionColumnPageObject extends BasePage {
await this.selectOption({ option });
}
await this.rootPage.locator('.nc-dropdown-user-select-cell').waitFor({ state: 'hidden' });
await this.rootPage.locator('.nc-dropdown-user-select-cell.active').waitFor({ state: 'hidden' });
await this.column.save({ isUpdated: true });
}
@@ -94,7 +94,7 @@ export class UserOptionColumnPageObject extends BasePage {
await this.column.get().locator('.nc-default-value-wrapper > .relative > .nc-cell-user').click();
await this.rootPage.locator('.nc-dropdown-user-select-cell').waitFor({ state: 'visible' });
await this.rootPage.locator('.nc-dropdown-user-select-cell.active').waitFor({ state: 'visible' });
expect(await this.rootPage.getByTestId(`select-option-${columnTitle}-undefined`).count()).toEqual(totalCount);
await this.column.get().locator('.nc-cell-user').click();

View File

@@ -37,7 +37,7 @@ export class UserOptionCellPageObject extends BasePage {
await selectCell.click();
await this.rootPage.locator('.nc-dropdown-user-select-cell').waitFor({ state: 'visible' });
await this.rootPage.locator('.nc-dropdown-user-select-cell.active').waitFor({ state: 'visible' });
if (index === -1) {
const selectOption = this.rootPage.getByTestId(`select-option-${columnHeader}-undefined`).getByText(option);
@@ -54,7 +54,7 @@ export class UserOptionCellPageObject extends BasePage {
await this.rootPage.keyboard.press('Escape');
}
await this.rootPage.locator('.nc-dropdown-user-select-cell').waitFor({ state: 'hidden' });
await this.rootPage.locator('.nc-dropdown-user-select-cell.active').waitFor({ state: 'hidden' });
}
async clear({ index, columnHeader, multiSelect }: { index: number; columnHeader: string; multiSelect?: boolean }) {
@@ -81,7 +81,7 @@ export class UserOptionCellPageObject extends BasePage {
// Press `Escape` to close the dropdown
await this.rootPage.keyboard.press('Escape');
await this.rootPage.locator('.nc-dropdown-user-select-cell').waitFor({ state: 'hidden' });
await this.rootPage.locator('.nc-dropdown-user-select-cell.active').waitFor({ state: 'hidden' });
}
async verify({