Browse Source

fix(playwright): remove unnecessary async n await

pull/5903/head
Wing-Kam Wong 1 year ago
parent
commit
ccf17249d4
  1. 4
      tests/playwright/pages/Account/AppStore.ts
  2. 2
      tests/playwright/pages/Account/License.ts
  3. 4
      tests/playwright/pages/Account/Settings.ts

4
tests/playwright/pages/Account/AppStore.ts

@ -10,8 +10,8 @@ export class AccountAppStorePage extends BasePage {
this.accountPage = accountPage;
}
async goto() {
await this.waitForResponse({
goto() {
return this.waitForResponse({
uiAction: async () => await this.rootPage.goto('/#/account/apps'),
httpMethodsToMatch: ['GET'],
requestUrlPathToMatch: 'api/v1/db/meta/plugins',

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

@ -13,7 +13,7 @@ export class AccountLicensePage extends BasePage {
return this.rootPage.goto('/#/account/license');
}
async waitUntilContentLoads() {
waitUntilContentLoads() {
return this.rootPage.waitForResponse(resp => resp.url().includes('api/v1/license') && resp.status() === 200);
}

4
tests/playwright/pages/Account/Settings.ts

@ -10,8 +10,8 @@ export class AccountSettingsPage extends BasePage {
this.accountPage = accountPage;
}
async goto() {
await this.waitForResponse({
goto() {
return this.waitForResponse({
uiAction: async () => await this.rootPage.goto('/#/account/users/settings'),
httpMethodsToMatch: ['GET'],
requestUrlPathToMatch: `api/v1/app-settings`,

Loading…
Cancel
Save