From 6f832bc9a1f0ecc949931519730d145bda9e120b Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 28 Jun 2023 13:00:54 +0800 Subject: [PATCH] chore(playwrights): use waitForResponse --- tests/playwright/pages/Account/License.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/playwright/pages/Account/License.ts b/tests/playwright/pages/Account/License.ts index 43e417f733..831567b9c7 100644 --- a/tests/playwright/pages/Account/License.ts +++ b/tests/playwright/pages/Account/License.ts @@ -10,8 +10,11 @@ export class AccountLicensePage extends BasePage { } async goto() { - await this.rootPage.goto(`/#/account/license`); - return this.waitUntilContentLoads(); + return this.waitForResponse({ + uiAction: async () => await this.rootPage.goto('/#/account/license'), + httpMethodsToMatch: ['GET'], + requestUrlPathToMatch: `api/v1/license`, + }); } async waitUntilContentLoads() {