← back to Ventura Claw

app/tests/smoke.spec.ts

10 lines

import { test, expect } from "@playwright/test";
test("dashboard renders", async ({ page }) => {
  await page.goto("http://127.0.0.1:3000/dashboard");
  await expect(page.locator("h1")).toContainText("dashboard");
});
test("admin route is gated", async ({ page }) => {
  const r = await page.goto("http://127.0.0.1:3000/admin/users");
  expect([200,302,401,403]).toContain(r?.status() ?? 0);
});