Files
nextjs-template/e2e/home.spec.ts
T
asepharyana e288f659c2
CI / lint + typecheck + test + build (push) Canceled after 0s
feat: add CI, Docker, auth, typed API client, shiki code blocks, e2e tests
- CI: GitHub Actions (bun 1.3.14, lint/typecheck/test/build/format gates)
- Docker: multi-stage standalone build + .dockerignore (next.config output=standalone)
- Auth: better-auth server (memory adapter, drizzle-swap-ready) + react client
  + /api/auth/[...all] route handler
- API: /api/health + /api/openapi routes, openapi-typescript codegen to
  types/api.ts, typed openapi-fetch client (lib/api, lib/http)
- Shiki: server-side CodeBlock component (escaped HTML)
- E2E: playwright home + health specs on dedicated :3100 (chromium 1243
  installed from GCS after CDN timeout)
- Dev: allow 127.0.0.1/localhost dev origins (HMR for local tooling)
2026-09-19 21:10:44 +07:00

21 lines
709 B
TypeScript

import { test, expect } from "@playwright/test";
test("home page renders the starter content", async ({ page }) => {
await page.goto("/");
await expect(page).toHaveTitle(/Create Next App/);
await expect(page.getByRole("heading", { level: 1 })).toContainText("To get started");
await expect(page.getByText("Deploy Now")).toBeVisible();
await expect(page.getByText("Documentation")).toBeVisible();
});
test("health endpoint returns OK", async ({ request }) => {
const res = await request.get("/api/health");
expect(res.ok()).toBeTruthy();
const body = await res.json();
expect(body.ok).toBe(true);
expect(body.service).toBe("nextjs-template");
expect(body.timestamp).toBeTruthy();
});