From bda1911348b2c39d488ba36d1168ea86bc588bf0 Mon Sep 17 00:00:00 2001 From: mertmit Date: Thu, 11 May 2023 15:48:42 +0300 Subject: [PATCH] test: wait for child listing and unlink response Signed-off-by: mertmit --- .../playwright/pages/Dashboard/common/Cell/index.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/playwright/pages/Dashboard/common/Cell/index.ts b/tests/playwright/pages/Dashboard/common/Cell/index.ts index 1b287cb595..bc2c212def 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/index.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/index.ts @@ -291,7 +291,11 @@ export class CellPageObject extends BasePage { // arrow expand doesn't exist for bt columns if (await arrow_expand.count()) { - await arrow_expand.click(); + await this.waitForResponse({ + uiAction: () => arrow_expand.click(), + requestUrlPathToMatch: '/api/v1/db', + httpMethodsToMatch: ['GET'], + }); // wait for child list to open await this.rootPage.waitForSelector('.nc-modal-child-list:visible'); @@ -309,7 +313,11 @@ export class CellPageObject extends BasePage { async unlinkVirtualCell({ index, columnHeader }: CellProps) { const cell = this.get({ index, columnHeader }); await cell.click(); - await cell.locator('.unlink-icon').first().click(); + await this.waitForResponse({ + uiAction: () => cell.locator('.unlink-icon').first().click(), + requestUrlPathToMatch: '/api/v1/db/data/noco/', + httpMethodsToMatch: ['GET'], + }); } async verifyRoleAccess(param: { role: string }) {