|
|
|
@ -71,12 +71,12 @@ export class AccountUsersPage extends BasePage {
|
|
|
|
|
email = this.prefixEmail(email); |
|
|
|
|
|
|
|
|
|
await this.get().waitFor(); |
|
|
|
|
return this.get().locator(`[data-testid="nc-token-list"] span:has-text("${email}")`); |
|
|
|
|
return this.get().locator(`[data-testid="nc-token-list"]:has-text("${email}")`); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async updateRole({ email, role }: { email: string; role: string }) { |
|
|
|
|
const userRow = await this.getUserRow({ email }); |
|
|
|
|
await userRow.locator(`.nc-user-roles`).click(); |
|
|
|
|
await userRow.locator('.nc-user-roles').click(); |
|
|
|
|
await this.rootPage.locator(`.nc-users-list-role-option:visible:has-text("${role}")`).waitFor(); |
|
|
|
|
await this.rootPage.locator(`.nc-users-list-role-option:visible:has-text("${role}")`).last().click(); |
|
|
|
|
await this.rootPage.locator(`.nc-users-list-role-option`).last().waitFor({ state: 'hidden' }); |
|
|
|
@ -88,12 +88,12 @@ export class AccountUsersPage extends BasePage {
|
|
|
|
|
|
|
|
|
|
async openRowActionMenu({ email }: { email: string }) { |
|
|
|
|
const userRow = await this.getUserRow({ email }); |
|
|
|
|
return userRow.locator(`.nc-user-row-action`).click(); |
|
|
|
|
return userRow.locator(`.nc-icon`).click(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async deleteUser({ email }: { email: string }) { |
|
|
|
|
await this.openRowActionMenu({ email }); |
|
|
|
|
await this.rootPage.locator('[data-testid="nc-super-user-delete"]:visible').click(); |
|
|
|
|
await this.rootPage.locator('.nc-menu-item:has-text("Remove user")').click(); |
|
|
|
|
await this.rootPage.locator('.ant-modal.active button:has-text("Delete User")').click(); |
|
|
|
|
await this.verifyToast({ message: 'User deleted successfully' }); |
|
|
|
|
} |
|
|
|
|