From 564bfffe8af5fd0c9c94b870655fa859f5a2ca07 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Sun, 27 Aug 2023 21:25:03 +0800 Subject: [PATCH] fix(playwright): goto --- tests/playwright/pages/Account/AppStore.ts | 4 ++-- tests/playwright/pages/Account/ChangePassword.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/playwright/pages/Account/AppStore.ts b/tests/playwright/pages/Account/AppStore.ts index b183c6e1bd..0ac3ff39d2 100644 --- a/tests/playwright/pages/Account/AppStore.ts +++ b/tests/playwright/pages/Account/AppStore.ts @@ -11,8 +11,8 @@ export class AccountAppStorePage extends BasePage { } async goto() { - return this.waitForResponse({ - uiAction: async () => await this.rootPage.goto('/#/account/apps'), + await this.waitForResponse({ + uiAction: () => this.rootPage.goto('/#/account/apps', { waitUntil: 'networkidle' }), httpMethodsToMatch: ['GET'], requestUrlPathToMatch: 'api/v1/db/meta/plugins', }); diff --git a/tests/playwright/pages/Account/ChangePassword.ts b/tests/playwright/pages/Account/ChangePassword.ts index f18bc3f72e..af414c4c25 100644 --- a/tests/playwright/pages/Account/ChangePassword.ts +++ b/tests/playwright/pages/Account/ChangePassword.ts @@ -37,8 +37,8 @@ export class ChangePasswordPage extends BasePage { await newPassword.fill(newPass); await confirmPassword.fill(repeatPass); - const submitChangePassword = async () => - await this.get().locator('button[data-testid="nc-user-settings-form__submit"]').click(); + const submitChangePassword = () => + this.get().locator('button[data-testid="nc-user-settings-form__submit"]').click(); if (networkValidation) { await this.waitForResponse({ uiAction: submitChangePassword,