From 9fab56c2346598fde888a44d005ebbeb8ba8429c Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 16 Jun 2023 11:58:31 +0800 Subject: [PATCH] fix(playwright): goto function --- tests/playwright/pages/Account/License.ts | 4 ++-- tests/playwright/pages/Account/Token.ts | 4 ++-- tests/playwright/pages/Account/Users.ts | 4 ++-- tests/playwright/pages/Dashboard/index.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/playwright/pages/Account/License.ts b/tests/playwright/pages/Account/License.ts index bea4eea8e3..03cf8f1e11 100644 --- a/tests/playwright/pages/Account/License.ts +++ b/tests/playwright/pages/Account/License.ts @@ -9,8 +9,8 @@ export class AccountLicensePage extends BasePage { this.accountPage = accountPage; } - async goto() { - await this.rootPage.goto('/#/account/license'); + goto() { + return this.rootPage.goto('/#/account/license'); } async waitUntilContentLoads() { diff --git a/tests/playwright/pages/Account/Token.ts b/tests/playwright/pages/Account/Token.ts index 71592720b2..a151282347 100644 --- a/tests/playwright/pages/Account/Token.ts +++ b/tests/playwright/pages/Account/Token.ts @@ -14,8 +14,8 @@ export class AccountTokenPage extends BasePage { this.createModal = accountPage.rootPage.locator(`.nc-modal-generate-token`); } - async goto() { - await this.rootPage.goto('/#/account/tokens'); + goto() { + return this.rootPage.goto('/#/account/tokens'); } get() { diff --git a/tests/playwright/pages/Account/Users.ts b/tests/playwright/pages/Account/Users.ts index aff846a82c..1242c4ee9b 100644 --- a/tests/playwright/pages/Account/Users.ts +++ b/tests/playwright/pages/Account/Users.ts @@ -17,8 +17,8 @@ export class AccountUsersPage extends BasePage { this.changePasswordPage = new ChangePasswordPage(this.rootPage); } - async goto() { - await this.rootPage.goto('/#/account/users/list'); + goto() { + return this.rootPage.goto('/#/account/users/list'); } get() { diff --git a/tests/playwright/pages/Dashboard/index.ts b/tests/playwright/pages/Dashboard/index.ts index 31ff8a9fa7..3ed0dcdaed 100644 --- a/tests/playwright/pages/Dashboard/index.ts +++ b/tests/playwright/pages/Dashboard/index.ts @@ -64,8 +64,8 @@ export class DashboardPage extends BasePage { return this.rootPage.locator('html'); } - async goto() { - await this.rootPage.goto(`/#/nc/${this.project.id}/auth`); + goto() { + return this.rootPage.goto(`/#/nc/${this.project.id}/auth`); } getProjectMenuLink({ title }: { title: string }) {