Skip to content

Commit

Permalink
Merge pull request #42 from alphagov/add-govuk-chat-tests
Browse files Browse the repository at this point in the history
Add GOV.UK Chat tests
  • Loading branch information
theseanything authored Oct 16, 2024
2 parents bb706f6 + 75ac0ce commit 042d1e1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/chat.spec.js
Original file line number Diff line number Diff line change
@@ -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();
});
});

0 comments on commit 042d1e1

Please sign in to comment.