diff --git a/tests/playwright/pages/Account/Users.ts b/tests/playwright/pages/Account/Users.ts index 349e310e43..af2d6b2c9e 100644 --- a/tests/playwright/pages/Account/Users.ts +++ b/tests/playwright/pages/Account/Users.ts @@ -50,7 +50,8 @@ export class AccountUsersPage extends BasePage { await this.verifyToast({ message: 'Successfully added user' }); // TODO: Wait on the invite api and get the invite url a better way as we are not waiting if the url is reflected in the UI - await this.rootPage.waitForTimeout(1000); + // await this.rootPage.waitForTimeout(1000); + await this.inviteUserModal.waitFor({ state: 'visible' }); // http://localhost:3000/#/signup/a5e7bf3a-cbb0-46bc-87f7-c2ae21796707 return (await this.inviteUserModal.locator(`.ant-alert-message`).innerText()).split('\n')[0]; diff --git a/tests/playwright/tests/db/usersAccounts/accountUserManagement.spec.ts b/tests/playwright/tests/db/usersAccounts/accountUserManagement.spec.ts index ab994f4ece..ea82fc235f 100644 --- a/tests/playwright/tests/db/usersAccounts/accountUserManagement.spec.ts +++ b/tests/playwright/tests/db/usersAccounts/accountUserManagement.spec.ts @@ -52,7 +52,8 @@ test.describe('User roles', () => { for (let i = 0; i < roleDb.length; i++) { const user = await api.orgUsers.list(); if (user.list.length > 0) { - const u = user.list.find((u: any) => u.email === roleDb[i].email); + // const u = user.list.find((u: any) => u.email === roleDb[i].email); + const u = user.list.find((u: any) => u.email === accountUsersPage.prefixEmail(roleDb[i].email)); if (u) await api.orgUsers.delete(u.id); } }