From 69dc9feeeea2ccf07b9705c089e2ecbe5cc7f511 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Fri, 23 Dec 2022 13:53:00 +0530 Subject: [PATCH] test(playwright): selector correction Signed-off-by: Pranav C --- .../pages/Dashboard/Grid/Column/LTAR/ChildList.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/playwright/pages/Dashboard/Grid/Column/LTAR/ChildList.ts b/tests/playwright/pages/Dashboard/Grid/Column/LTAR/ChildList.ts index a6c32d6033..22dd01ede9 100644 --- a/tests/playwright/pages/Dashboard/Grid/Column/LTAR/ChildList.ts +++ b/tests/playwright/pages/Dashboard/Grid/Column/LTAR/ChildList.ts @@ -20,9 +20,7 @@ export class ChildList extends BasePage { // button: Link to 'City' // icon: reload await expect(this.get().locator(`.ant-modal-title`)).toHaveText(`Child list`); - await expect( - await this.get().locator(`button:text-matches("Link to '.*${linkField}'", "i")`).isVisible() - ).toBeTruthy(); + await expect(await this.get().locator(`text=/Link to '.*${linkField}'/i`).isVisible()).toBeTruthy(); await expect(await this.get().locator(`[data-testid="nc-child-list-reload"]`).isVisible()).toBeTruthy(); // child list body validation (card count, card title) @@ -52,7 +50,7 @@ export class ChildList extends BasePage { } async openLinkRecord({ linkTableTitle }: { linkTableTitle: string }) { - const openActions = this.get().locator(`:text-matches("Link to '.*${linkTableTitle}'", "i")`).click(); + const openActions = this.get().locator(`text=/Link to '.*${linkTableTitle}'/i`).click(); await this.waitForResponse({ requestUrlPathToMatch: '/exclude', httpMethodsToMatch: ['GET'],