From 8863bd52e277eff7930996ea5d6730dbfb8ee40e Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Mon, 3 Apr 2023 13:06:36 +0530 Subject: [PATCH] test: imported cells scroll into view Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- tests/playwright/pages/Dashboard/common/Cell/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/playwright/pages/Dashboard/common/Cell/index.ts b/tests/playwright/pages/Dashboard/common/Cell/index.ts index 3fc20abc18..f747373021 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/index.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/index.ts @@ -114,6 +114,10 @@ export class CellPageObject extends BasePage { // if text is found, return // if text is not found, throw error let count = 0; + await this.get({ + index, + columnHeader, + }).scrollIntoViewIfNeeded(); while (count < 5) { const innerTexts = await this.get({ index, @@ -265,9 +269,11 @@ export class CellPageObject extends BasePage { value: string[]; }) { // const count = value.length; - const cell = this.get({ index, columnHeader }); + const cell = await this.get({ index, columnHeader }); const chips = cell.locator('.chips > .chip'); + await this.get({ index, columnHeader }).scrollIntoViewIfNeeded(); + // verify chip count & contents if (count) await expect(chips).toHaveCount(count);