From 6a300677e79fef055dd93c12e4713f908fcfc410 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Tue, 21 May 2024 21:09:39 +0530 Subject: [PATCH] test: mfe switch tab response validation Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../pages/Dashboard/common/Topbar/index.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/playwright/pages/Dashboard/common/Topbar/index.ts b/tests/playwright/pages/Dashboard/common/Topbar/index.ts index 6d24c4ad6d..a5f5f20f05 100644 --- a/tests/playwright/pages/Dashboard/common/Topbar/index.ts +++ b/tests/playwright/pages/Dashboard/common/Topbar/index.ts @@ -70,12 +70,22 @@ export class TopbarPage extends BasePage { } async openDetailedTab() { - await this.btn_details.click(); + await this.waitForResponse({ + uiAction: async () => await this.btn_details.click(), + requestUrlPathToMatch: 'api/v1/db/meta/tables/', + httpMethodsToMatch: ['GET'], + responseJsonMatcher: json => json['hash'], + }); await this.rootPage.waitForTimeout(500); } async openDataTab() { - await this.btn_data.click(); + await this.waitForResponse({ + uiAction: async () => await this.btn_data.click(), + requestUrlPathToMatch: 'api/v1/db/data/noco/', + httpMethodsToMatch: ['GET'], + responseJsonMatcher: json => json['list'], + }); await this.rootPage.waitForTimeout(500); }