Browse Source

test: skip wait for response on user page access

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5903/head
Raju Udava 1 year ago
parent
commit
677b065f28
  1. 17
      tests/playwright/pages/Account/Users.ts
  2. 6
      tests/playwright/tests/db/usersAccounts/accountUserManagement.spec.ts

17
tests/playwright/pages/Account/Users.ts

@ -17,12 +17,17 @@ export class AccountUsersPage extends BasePage {
this.changePasswordPage = new ChangePasswordPage(this.rootPage);
}
async goto() {
return this.waitForResponse({
uiAction: async () => await this.rootPage.goto('/#/account/users/list'),
httpMethodsToMatch: ['GET'],
requestUrlPathToMatch: `api/v1/users`,
});
async goto({ waitForResponse = true }: { waitForResponse?: boolean }) {
if (waitForResponse) {
return this.waitForResponse({
uiAction: async () => await this.rootPage.goto('/#/account/users'),
httpMethodsToMatch: ['GET'],
requestUrlPathToMatch: `api/v1/users`,
});
} else {
await this.rootPage.waitForTimeout(1000);
return this.rootPage.goto('/#/account/users');
}
}
async waitUntilContentLoads() {

6
tests/playwright/tests/db/usersAccounts/accountUserManagement.spec.ts

@ -65,7 +65,7 @@ test.describe('User roles', () => {
test('Invite user, update role and delete user', async () => {
test.slow();
await accountUsersPage.goto();
await accountUsersPage.goto({ waitForResponse: false });
// invite user
for (let i = 0; i < roleDb.length; i++) {
@ -77,7 +77,7 @@ test.describe('User roles', () => {
}
await signupAndVerify(0);
await accountUsersPage.goto();
await accountUsersPage.goto({ waitForResponse: false });
await signupAndVerify(1);
await dashboard.signOut();
@ -87,7 +87,7 @@ test.describe('User roles', () => {
withoutPrefix: true,
});
await accountUsersPage.goto();
await accountUsersPage.goto({ waitForResponse: false });
// change role
for (let i = 0; i < roleDb.length; i++) {
await accountUsersPage.updateRole({

Loading…
Cancel
Save