test: new role selector

This commit is contained in:
mertmit
2023-09-20 19:11:42 +00:00
parent c3b011654f
commit 49a6d6962e
3 changed files with 13 additions and 8 deletions

View File

@@ -22,11 +22,11 @@ export class AccessSettingsPage extends BasePage {
if (userEmail === email) {
const roleDropdown = user.locator('.nc-collaborator-role-select');
const selectedRole = await user.locator('.nc-collaborator-role-select').innerText();
const selectedRole = await user.locator('.nc-collaborator-role-select .badge-text').innerText();
await roleDropdown.click();
const menu = this.rootPage.locator('.ant-select-dropdown:visible');
const clickClbk = () => menu.locator(`.ant-select-item:has-text("${role}"):visible`).last().click();
const menu = this.rootPage.locator('.nc-role-select-dropdown:visible');
const clickClbk = () => menu.locator(`.nc-role-select-${role.toLowerCase()}:visible`).last().click();
if (networkValidation && !selectedRole.includes(role)) {
await this.waitForResponse({