|
|
|
@ -76,9 +76,11 @@ export class AccountUsersPage extends BasePage {
|
|
|
|
|
// ensure page is loaded
|
|
|
|
|
email = this.prefixEmail(email); |
|
|
|
|
|
|
|
|
|
await this.get().locator('.nc-table-row').first().waitFor({ state: 'visible' }); |
|
|
|
|
const userRow = this.get().locator(`.nc-table-row:has-text("${email}")`).first(); |
|
|
|
|
|
|
|
|
|
return this.get().locator(`.nc-table-row:has-text("${email}")`).first(); |
|
|
|
|
await userRow.waitFor({ state: 'visible' }); |
|
|
|
|
|
|
|
|
|
return userRow.first(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async updateRole({ email, role }: { email: string; role: string }) { |
|
|
|
@ -103,5 +105,6 @@ export class AccountUsersPage extends BasePage {
|
|
|
|
|
await this.rootPage.locator('.nc-menu-item:visible: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' }); |
|
|
|
|
await this.get().locator(`.nc-table-row:has-text("${email}")`).first().waitFor({ state: 'hidden' }); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|