From 19f03b8c38270ae813724954193d16b76515ee70 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Thu, 15 Jun 2023 17:55:08 +0530 Subject: [PATCH] test: shared base Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../pages/Dashboard/common/Cell/index.ts | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/playwright/pages/Dashboard/common/Cell/index.ts b/tests/playwright/pages/Dashboard/common/Cell/index.ts index dcab70063e..0975415f51 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/index.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/index.ts @@ -9,6 +9,7 @@ import { RatingCellPageObject } from './RatingCell'; import { DateCellPageObject } from './DateCell'; import { DateTimeCellPageObject } from './DateTimeCell'; import { GeoDataCellPageObject } from './GeoDataCell'; +import { getTextExcludeIconText } from '../../../../tests/utils/general'; export interface CellProps { index?: number; @@ -350,13 +351,21 @@ export class CellPageObject extends BasePage { await expect(await vCell.locator('.nc-action-icon.nc-plus:visible')).toHaveCount( param.role === 'creator' || param.role === 'editor' ? 1 : 0 ); + // in-cell expand (all have access) - await expect(await vCell.locator('.nc-action-icon.nc-arrow-expand:visible')).toHaveCount(1); - await vCell.click(); + // PR(LinkDataType) + // await expect(await vCell.locator('.nc-action-icon.nc-arrow-expand:visible')).toHaveCount(1); + const linkText = await getTextExcludeIconText(vCell); + expect(linkText).toContain('1 Link'); + + // PR(LinkDataType) + // await vCell.click(); + // unlink - await expect(await vCell.locator('.nc-icon.unlink-icon:visible')).toHaveCount( - param.role === 'creator' || param.role === 'editor' ? 1 : 0 - ); + // PR(LinkDataType) + // await expect(await vCell.locator('.nc-icon.unlink-icon:visible')).toHaveCount( + // param.role === 'creator' || param.role === 'editor' ? 1 : 0 + // ); } async copyToClipboard({ index, columnHeader }: CellProps, ...clickOptions: Parameters) {