From 2ab8f71b8b16fa0dbe2df48b190bb9d72ef1d015 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Mon, 17 Apr 2023 12:14:06 +0530 Subject: [PATCH] test: shared grid view expand ltar child list verification Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../pages/Dashboard/common/Cell/index.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/playwright/pages/Dashboard/common/Cell/index.ts b/tests/playwright/pages/Dashboard/common/Cell/index.ts index bede598f4e..2b30b5eb9b 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/index.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/index.ts @@ -281,6 +281,25 @@ export class CellPageObject extends BasePage { for (let i = 0; i < value.length; ++i) { await expect(await chips.nth(i).locator('.name')).toHaveText(value[i]); } + + // open child list + await this.get({ index, columnHeader }).hover(); + const arrow_expand = await this.get({ index, columnHeader }).locator('.nc-arrow-expand'); + + // arrow expand doesn't exist for bt columns + if (await arrow_expand.count()) { + await arrow_expand.click(); + + // wait for child list to open + await this.rootPage.waitForSelector('.nc-modal-child-list:visible'); + + // verify child list count & contents + const childList = await this.rootPage.locator('.ant-card'); + expect(await childList.count()).toBe(count); + + // close child list + await this.rootPage.locator('.nc-modal-child-list').locator('button.ant-modal-close:visible').click(); + } } async unlinkVirtualCell({ index, columnHeader }: CellProps) {