Browse Source

fix(playwrights): adopt waitForResponse

pull/5903/head
Wing-Kam Wong 1 year ago
parent
commit
a407bac7cb
  1. 6
      tests/playwright/pages/Account/License.ts
  2. 6
      tests/playwright/pages/Account/Token.ts
  3. 6
      tests/playwright/pages/Account/Users.ts

6
tests/playwright/pages/Account/License.ts

@ -10,7 +10,11 @@ export class AccountLicensePage extends BasePage {
}
async goto() {
return this.rootPage.goto('/#/account/license');
return this.waitForResponse({
uiAction: async () => await this.rootPage.goto('/#/account/license'),
httpMethodsToMatch: ['GET'],
requestUrlPathToMatch: 'api/v1/license',
});
}
waitUntilContentLoads() {

6
tests/playwright/pages/Account/Token.ts

@ -15,7 +15,11 @@ export class AccountTokenPage extends BasePage {
}
async goto() {
return this.rootPage.goto('/#/account/tokens');
return this.waitForResponse({
uiAction: async () => await this.rootPage.goto('/#/account/tokens'),
httpMethodsToMatch: ['GET'],
requestUrlPathToMatch: `api/v1/tokens`,
});
}
get() {

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

@ -18,7 +18,11 @@ export class AccountUsersPage extends BasePage {
}
async goto() {
return this.rootPage.goto('/#/account/users/list');
return this.waitForResponse({
uiAction: async () => await this.rootPage.goto('/#/account/users/list'),
httpMethodsToMatch: ['GET'],
requestUrlPathToMatch: `api/v1/users`,
});
}
get() {

Loading…
Cancel
Save