Browse Source

test: remove user before retry

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/7485/head
Raju Udava 6 months ago
parent
commit
99502df853
  1. 3
      tests/playwright/pages/Account/Users.ts
  2. 3
      tests/playwright/tests/db/usersAccounts/accountUserManagement.spec.ts

3
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];

3
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);
}
}

Loading…
Cancel
Save