Fix CI E2E: check Planner DB, add Playwright HTML report

- Integration test DB check now hits Planner API (not Journal)
  so it correctly skips when no PostgreSQL in CI
- Playwright uploads HTML report artifact on all runs (not just failures)
- Install Chromium with --with-deps for CI compatibility
- Report retained for 30 days

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-03-24 23:47:43 +01:00
parent 2d0a4ac2c7
commit 7d273b73c0
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9
3 changed files with 9 additions and 13 deletions

View file

@ -12,17 +12,15 @@ import { test, expect } from "@playwright/test";
const JOURNAL = "http://localhost:3000";
const PLANNER = "http://localhost:3001";
// Helper: check if DB is available
// Helper: check if DB is available (checks Planner API)
async function isDbAvailable(): Promise<boolean> {
try {
const resp = await fetch(`${JOURNAL}/api/auth/login`, {
const resp = await fetch(`${PLANNER}/api/sessions`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ step: "magic-link", email: "nonexistent@test.com" }),
body: JSON.stringify({}),
});
// If we get a JSON response (even error), DB is available
const body = await resp.json();
return body.error !== undefined || body.step !== undefined;
return resp.ok; // 201 = DB available, 503 = DB unavailable
} catch {
return false;
}