diff --git a/system/modules/admin/tests/acceptance/playwright/admin.test.ts b/system/modules/admin/tests/acceptance/playwright/admin.test.ts index f5050792..47f6eb0b 100644 --- a/system/modules/admin/tests/acceptance/playwright/admin.test.ts +++ b/system/modules/admin/tests/acceptance/playwright/admin.test.ts @@ -193,6 +193,7 @@ test("Test that Cmfive Admin handles templates", async ({ page, isMobile }) => { await expect(templateTestPage.getByText("Test Company")).toBeVisible(); }); + test("Test that Cmfive Admin handles bad templates", async ({ page, isMobile }) => { test.setTimeout(GLOBAL_TIMEOUT); diff --git a/system/modules/admin/tests/acceptance/playwright/admin.utils.ts b/system/modules/admin/tests/acceptance/playwright/admin.utils.ts index 075809a9..9baf3239 100644 --- a/system/modules/admin/tests/acceptance/playwright/admin.utils.ts +++ b/system/modules/admin/tests/acceptance/playwright/admin.utils.ts @@ -313,11 +313,12 @@ export class AdminHelper { return page.url().split("/admin-templates/edit/")[1].split("#")[0]; } + static async viewTemplate(page: Page, isMobile: boolean, templateTitle: string, templateID: string): Promise { if (page.url() != HOST + "/admin-templates/edit/" + templateID + "#details") { if(page.url() != HOST + "/admin-templates") - await CmfiveHelper.clickCmfiveNavbar(page, isMobile, "Admin", "Templates"); + await CmfiveHelper.clickCmfiveNavbar(page, "Admin", "Templates"); await CmfiveHelper.getRowByText(page, templateTitle).getByRole("button", {name: "Edit"}).click(); }