From 954e1b919e89216c7b5282dae0045312c3fcd41f Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Fri, 28 Jun 2024 12:24:06 +0000 Subject: [PATCH] fix: column ops- scroll into view before insert --- tests/playwright/pages/Dashboard/Grid/Column/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/playwright/pages/Dashboard/Grid/Column/index.ts b/tests/playwright/pages/Dashboard/Grid/Column/index.ts index 64d08946ba..ea7ef1f0c1 100644 --- a/tests/playwright/pages/Dashboard/Grid/Column/index.ts +++ b/tests/playwright/pages/Dashboard/Grid/Column/index.ts @@ -94,15 +94,15 @@ export class ColumnPageObject extends BasePage { ltarView?: string; }) { if (insertBeforeColumnTitle) { + await this.grid.get().locator(`th[data-title="${insertBeforeColumnTitle}"]`).scrollIntoViewIfNeeded(); await this.grid.get().locator(`th[data-title="${insertBeforeColumnTitle}"] .nc-ui-dt-dropdown`).click(); - if (isDisplayValue) { await expect(this.rootPage.locator('li[role="menuitem"]:has-text("Insert Before")')).toHaveCount(0); return; } - await this.rootPage.locator('li[role="menuitem"]:has-text("Insert Before"):visible').click(); } else if (insertAfterColumnTitle) { + await this.grid.get().locator(`th[data-title="${insertAfterColumnTitle}"]`).scrollIntoViewIfNeeded(); await this.grid.get().locator(`th[data-title="${insertAfterColumnTitle}"] .nc-ui-dt-dropdown`).click(); await this.rootPage.locator('li[role="menuitem"]:has-text("Insert After"):visible').click(); } else {