Add folder game, file browser UI, and automated tests.
Introduces a localStorage-backed messy-desktop challenge with sub-steps, drag-and-drop and Places/Back navigation, IBM Plex Mono, and a /api/health endpoint. Adds Vitest coverage for the API and level logic plus Playwright smoke tests. Made-with: Cursor
This commit is contained in:
25
e2e/app.spec.ts
Normal file
25
e2e/app.spec.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test.describe("browser", () => {
|
||||
test("home page shows title", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await expect(
|
||||
page.getByRole("heading", { name: "Folder Game Challenge" }),
|
||||
).toBeVisible();
|
||||
});
|
||||
|
||||
test("play page loads", async ({ page }) => {
|
||||
await page.goto("/play");
|
||||
await expect(page.getByText("Messy desktop")).toBeVisible({
|
||||
timeout: 15_000,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test.describe("API", () => {
|
||||
test("GET /api/health", async ({ request }) => {
|
||||
const res = await request.get("/api/health");
|
||||
expect(res.ok()).toBe(true);
|
||||
await expect(res.json()).resolves.toEqual({ status: "ok" });
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user