From 6b492bb8913563c123a2a99673ed4ef07673d60e Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Thu, 1 Jun 2023 12:51:38 +0530 Subject: [PATCH] test: virtual cell verification Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../playwright/pages/Dashboard/Grid/Column/LTAR/ChildList.ts | 5 ++++- .../pages/Dashboard/Grid/Column/LTAR/LinkRecord.ts | 4 +++- tests/playwright/pages/Dashboard/common/Cell/index.ts | 2 ++ .../tests/db/columnRelationalExtendedTests.spec.ts | 1 - 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/playwright/pages/Dashboard/Grid/Column/LTAR/ChildList.ts b/tests/playwright/pages/Dashboard/Grid/Column/LTAR/ChildList.ts index fb068e61d7..ebc55120bb 100644 --- a/tests/playwright/pages/Dashboard/Grid/Column/LTAR/ChildList.ts +++ b/tests/playwright/pages/Dashboard/Grid/Column/LTAR/ChildList.ts @@ -31,7 +31,10 @@ export class ChildList extends BasePage { const childCards = await childList.count(); await expect(childCards).toEqual(cardCount); for (let i = 0; i < cardCount; i++) { - await expect(await childList.nth(i).textContent()).toContain(cardTitle[i]); + await childList.nth(i).locator('.name').waitFor({ state: 'visible' }); + await childList.nth(i).locator('.name').scrollIntoViewIfNeeded(); + await this.rootPage.waitForTimeout(100); + await expect(await childList.nth(i).locator('.name').textContent()).toContain(cardTitle[i]); // icon: unlink // icon: delete await expect( diff --git a/tests/playwright/pages/Dashboard/Grid/Column/LTAR/LinkRecord.ts b/tests/playwright/pages/Dashboard/Grid/Column/LTAR/LinkRecord.ts index 56927eec1e..156c7e71ca 100644 --- a/tests/playwright/pages/Dashboard/Grid/Column/LTAR/LinkRecord.ts +++ b/tests/playwright/pages/Dashboard/Grid/Column/LTAR/LinkRecord.ts @@ -29,7 +29,9 @@ export class LinkRecord extends BasePage { const childCards = await childList.count(); await expect(childCards).toEqual(cardTitle.length); for (let i = 0; i < cardTitle.length; i++) { - await expect(await childList.nth(i).textContent()).toContain(cardTitle[i]); + await childList.nth(i).locator('.name').scrollIntoViewIfNeeded(); + await childList.nth(i).locator('.name').waitFor({ state: 'visible' }); + await expect(await childList.nth(i).locator('.name').textContent()).toContain(cardTitle[i]); } } } diff --git a/tests/playwright/pages/Dashboard/common/Cell/index.ts b/tests/playwright/pages/Dashboard/common/Cell/index.ts index 37d20dc3f7..a081a39509 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/index.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/index.ts @@ -286,6 +286,8 @@ export class CellPageObject extends BasePage { // verify only the elements that are passed in for (let i = 0; i < value.length; ++i) { + await chips.nth(i).locator('.name').waitFor({ state: 'visible' }); + await chips.nth(i).locator('.name').scrollIntoViewIfNeeded(); await expect(await chips.nth(i).locator('.name')).toHaveText(value[i]); } diff --git a/tests/playwright/tests/db/columnRelationalExtendedTests.spec.ts b/tests/playwright/tests/db/columnRelationalExtendedTests.spec.ts index eecae61ed4..25fb924d66 100644 --- a/tests/playwright/tests/db/columnRelationalExtendedTests.spec.ts +++ b/tests/playwright/tests/db/columnRelationalExtendedTests.spec.ts @@ -1,7 +1,6 @@ import { test } from '@playwright/test'; import { DashboardPage } from '../../pages/Dashboard'; import setup from '../../setup'; -import { isPg } from '../../setup/db'; test.describe('Relational Columns', () => { let dashboard: DashboardPage;