Skip to content

Commit 78619af

Browse files
Fran McDadeNoopDog
authored andcommitted
feat: aded additional locator to anvil cmg pagination test (#4321)
1 parent 0d97bb8 commit 78619af

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

e2e/testFunctions.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,16 +1304,19 @@ export async function filterAndTestLastPagePagination(
13041304
await expect(getFirstRowNthColumnCellLocator(page, 0)).toBeVisible();
13051305

13061306
// Should start on first page, and there should be multiple pages available
1307-
await expect(page.getByText(PAGE_COUNT_REGEX, { exact: true })).toHaveText(
1308-
/Page 1 of [0-9]+/
1309-
);
13101307
await expect(
1311-
page.getByText(PAGE_COUNT_REGEX, { exact: true })
1308+
page.locator(".MuiPaper-table").getByText(PAGE_COUNT_REGEX, { exact: true })
1309+
).toHaveText(/Page 1 of [0-9]+/);
1310+
await expect(
1311+
page.locator(".MuiPaper-table").getByText(PAGE_COUNT_REGEX, { exact: true })
13121312
).not.toHaveText("Page 1 of 1");
13131313

13141314
// Detect number of pages
13151315
const splitStartingPageText = (
1316-
await page.getByText(PAGE_COUNT_REGEX, { exact: true }).innerText()
1316+
await page
1317+
.locator(".MuiPaper-table")
1318+
.getByText(PAGE_COUNT_REGEX, { exact: true })
1319+
.innerText()
13171320
).split(" ");
13181321
const maxPages = parseInt(
13191322
splitStartingPageText[splitStartingPageText.length - 1]

0 commit comments

Comments
 (0)