From cd32fc4a55b5a0889a3a0a6f11379abb371719a7 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Sat, 17 Jun 2023 11:53:08 +0800 Subject: [PATCH] fix(playwright): add async to goto --- tests/playwright/pages/Account/License.ts | 2 +- tests/playwright/pages/Account/Settings.ts | 2 +- tests/playwright/pages/Account/Token.ts | 2 +- tests/playwright/pages/Account/Users.ts | 2 +- tests/playwright/pages/Dashboard/index.ts | 2 +- tests/playwright/pages/LoginPage/index.ts | 2 +- tests/playwright/pages/SigninPage/index.ts | 2 +- tests/playwright/pages/SignupPage/index.ts | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/playwright/pages/Account/License.ts b/tests/playwright/pages/Account/License.ts index 11874ceaa9..747edc01b2 100644 --- a/tests/playwright/pages/Account/License.ts +++ b/tests/playwright/pages/Account/License.ts @@ -9,7 +9,7 @@ export class AccountLicensePage extends BasePage { this.accountPage = accountPage; } - goto() { + async goto() { return this.rootPage.goto('/#/account/license'); } diff --git a/tests/playwright/pages/Account/Settings.ts b/tests/playwright/pages/Account/Settings.ts index cd3b0c5dad..65c149bd71 100644 --- a/tests/playwright/pages/Account/Settings.ts +++ b/tests/playwright/pages/Account/Settings.ts @@ -10,7 +10,7 @@ export class AccountSettingsPage extends BasePage { this.accountPage = accountPage; } - goto() { + async goto() { return this.waitForResponse({ uiAction: async () => await this.rootPage.goto('/#/account/users/settings'), httpMethodsToMatch: ['GET'], diff --git a/tests/playwright/pages/Account/Token.ts b/tests/playwright/pages/Account/Token.ts index a151282347..9d02ffb5d9 100644 --- a/tests/playwright/pages/Account/Token.ts +++ b/tests/playwright/pages/Account/Token.ts @@ -14,7 +14,7 @@ export class AccountTokenPage extends BasePage { this.createModal = accountPage.rootPage.locator(`.nc-modal-generate-token`); } - goto() { + async goto() { return this.rootPage.goto('/#/account/tokens'); } diff --git a/tests/playwright/pages/Account/Users.ts b/tests/playwright/pages/Account/Users.ts index 1242c4ee9b..66eed77a93 100644 --- a/tests/playwright/pages/Account/Users.ts +++ b/tests/playwright/pages/Account/Users.ts @@ -17,7 +17,7 @@ export class AccountUsersPage extends BasePage { this.changePasswordPage = new ChangePasswordPage(this.rootPage); } - goto() { + async goto() { return this.rootPage.goto('/#/account/users/list'); } diff --git a/tests/playwright/pages/Dashboard/index.ts b/tests/playwright/pages/Dashboard/index.ts index 3ed0dcdaed..ba7df95f94 100644 --- a/tests/playwright/pages/Dashboard/index.ts +++ b/tests/playwright/pages/Dashboard/index.ts @@ -64,7 +64,7 @@ export class DashboardPage extends BasePage { return this.rootPage.locator('html'); } - goto() { + async goto() { return this.rootPage.goto(`/#/nc/${this.project.id}/auth`); } diff --git a/tests/playwright/pages/LoginPage/index.ts b/tests/playwright/pages/LoginPage/index.ts index 4bfa567324..f4c323839e 100644 --- a/tests/playwright/pages/LoginPage/index.ts +++ b/tests/playwright/pages/LoginPage/index.ts @@ -11,7 +11,7 @@ export class LoginPage extends BasePage { return `nc_test_${parallelId}_${email}`; } - goto() { + async goto() { return this.rootPage.goto('/#/signin'); } diff --git a/tests/playwright/pages/SigninPage/index.ts b/tests/playwright/pages/SigninPage/index.ts index a1d0a2c54d..7c96223156 100644 --- a/tests/playwright/pages/SigninPage/index.ts +++ b/tests/playwright/pages/SigninPage/index.ts @@ -16,7 +16,7 @@ export class SigninPage extends BasePage { return `nc_test_${parallelId}_${email}`; } - goto() { + async goto() { return this.rootPage.goto('/#/signin/'); } diff --git a/tests/playwright/pages/SignupPage/index.ts b/tests/playwright/pages/SignupPage/index.ts index 7ee8a9cf2f..356ea306f2 100644 --- a/tests/playwright/pages/SignupPage/index.ts +++ b/tests/playwright/pages/SignupPage/index.ts @@ -16,7 +16,7 @@ export class SignupPage extends BasePage { return `nc_test_${parallelId}_${email}`; } - goto() { + async goto() { return this.rootPage.goto('/#/signup/'); }