mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-08-02 21:08:21 +00:00
Mirrors the Model devcontainer's Playwright setup for this Next.js repo, so agents and humans can drive the running app in a browser. The image bakes in chromium's apt libraries (as root) and the browser binary (as vscode, so it lands in that user's cache), meaning a fresh container is ready to run with no first-use download. The @playwright/test version and the Dockerfile's PLAYWRIGHT_VERSION are pinned to the same number because Playwright ties browser builds to a library version. Also ports Model's headed viewer stack (Xvfb -> fluxbox -> x11vnc -> noVNC on :6080) as scripts/start_viewer.sh, for watching a headed run. Cypress is untouched; Playwright specs live in e2e/. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
12 lines
519 B
TypeScript
12 lines
519 B
TypeScript
import { expect, test } from "@playwright/test";
|
|
|
|
// Deliberately auth-agnostic: src/middleware.ts bounces unauthenticated
|
|
// visitors to a sign-in page, so this asserts only that the app boots and
|
|
// serves a page rather than erroring — enough to prove the devcontainer's
|
|
// Playwright + chromium wiring works end to end.
|
|
test("the app serves the home route", async ({ page }) => {
|
|
const response = await page.goto("/");
|
|
|
|
expect(response?.status()).toBeLessThan(500);
|
|
await expect(page).toHaveTitle(/.+/);
|
|
});
|