Browse Source

fix(playwright): use regex pattern

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4630/head
Pranav C 2 years ago
parent
commit
9fde794388
  1. 4
      tests/playwright/pages/Dashboard/Grid/Column/LTAR/ChildList.ts

4
tests/playwright/pages/Dashboard/Grid/Column/LTAR/ChildList.ts

@ -21,7 +21,7 @@ export class ChildList extends BasePage {
// icon: reload
await expect(this.get().locator(`.ant-modal-title`)).toHaveText(`Child list`);
await expect(
await this.get().locator(`button:has-text("Link to"):hasText("${linkField}'")`).isVisible()
await this.get().locator(`button:text-matches("Link to '.*${linkField}'", "i")`).isVisible()
).toBeTruthy();
await expect(await this.get().locator(`[data-testid="nc-child-list-reload"]`).isVisible()).toBeTruthy();
@ -52,7 +52,7 @@ export class ChildList extends BasePage {
}
async openLinkRecord({ linkTableTitle }: { linkTableTitle: string }) {
const openActions = this.get().locator(`button:has-text("Link to '${linkTableTitle}'")`).click();
const openActions = this.get().locator(`:text-matches("Link to '.*${linkTableTitle}'", "i")`).click();
await this.waitForResponse({
requestUrlPathToMatch: '/exclude',
httpMethodsToMatch: ['GET'],

Loading…
Cancel
Save