diff --git a/tests/chat.spec.js b/tests/chat.spec.js new file mode 100644 index 0000000..2c643c4 --- /dev/null +++ b/tests/chat.spec.js @@ -0,0 +1,19 @@ +import { expect } from "@playwright/test"; +import { test } from "../lib/cachebust-test"; +import { publishingAppUrl } from "../lib/utils"; + +test.describe("GOV.UK Chat", { tag: ["@app-govuk-chat"] }, () => { + test("Can view a static page", async ({ page }) => { + await page.goto("/chat/about"); + await expect(page.getByRole("heading", { name: "About GOV.UK Chat" })).toBeVisible(); + }); +}); + +test.describe("GOV.UK Chat Admin", { tag: ["@app-govuk-chat"] }, () => { + test.use({ baseURL: publishingAppUrl("chat") }); + + test("Can log in to chat admin", async ({ page }) => { + await page.goto("/admin"); + await expect(page.getByRole("heading", { name: "GOV.UK Chat Admin" })).toBeVisible(); + }); +});