Der Dev-Server verlor unter der Last eines ganzen Durchlaufs reproduzierbar Chunks (ChunkLoadError beim Laden von app/layout), was sich weder durch Aufwaermen noch durch laengere Zeitlimits stabilisieren liess. Der Smoke-Test faehrt jetzt - wie der Screenshot-Lauf schon vorher - das Produktions-Image hoch. Ergebnis: 29 Sekunden statt fuenf Minuten, keine Aussetzer, und getestet wird genau das Artefakt, das spaeter deployt wird. Dabei behoben: Der Fehlteile-Dialog hielt eine Kopie der Liste aus dem Moment des Oeffnens und zeigte ein gerade hinzugefuegtes Teil nicht an. Er liest jetzt den aktuellen Eintrag aus den Props statt aus dem Zustand. Gefunden hat das der erweiterte Screenshot-Lauf. Dokumentation zu Phase 2: Changelog 0.2.0, Roadmap abgehakt, Devlog mit Zeiten, CLAUDE.md um die neuen Module und Testkonventionen ergaenzt und die Anleitung um fuenf Kapitel (Import, Scanner, Fehlteile, Einladungen, Daten, Startbildschirm) - mit vier neuen, automatisch erzeugten Bildern. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
57 lines
1.7 KiB
TypeScript
57 lines
1.7 KiB
TypeScript
import path from 'node:path';
|
|
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
/**
|
|
* Produces the screenshots for docs/ANLEITUNG.md.
|
|
*
|
|
* Runs against the production container, not the dev server: the dev server
|
|
* compiles routes on demand, which made the capture run flaky, and the manual
|
|
* should show exactly what a user gets after `docker compose up`.
|
|
*
|
|
* pnpm screenshots
|
|
*/
|
|
const PORT = 3220;
|
|
const BASE_URL = `http://localhost:${PORT}`;
|
|
|
|
// Docker wants forward slashes, also on Windows.
|
|
const dataDir = path.resolve(process.cwd(), 'data-shots').replace(/\\/g, '/');
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
testMatch: 'screenshots.spec.ts',
|
|
fullyParallel: false,
|
|
workers: 1,
|
|
// The run registers a user, so a second attempt would start from a state
|
|
// that no longer matches the script.
|
|
retries: 0,
|
|
timeout: 300_000,
|
|
expect: { timeout: 30_000 },
|
|
reporter: 'list',
|
|
use: {
|
|
baseURL: BASE_URL,
|
|
locale: 'de-DE',
|
|
timezoneId: 'Europe/Berlin',
|
|
// A phone, because that is how the app is actually used.
|
|
...devices['Pixel 7'],
|
|
},
|
|
webServer: {
|
|
command: [
|
|
'docker run --rm --name bricktrack-shots',
|
|
`-p ${PORT}:3000`,
|
|
`-e BASE_URL=${BASE_URL}`,
|
|
'-e BETTER_AUTH_SECRET=screenshot-run-secret-0123456789abcdefgh',
|
|
'-e TZ=Europe/Berlin',
|
|
// A placeholder key so the manual shows the import form rather than the
|
|
// "not configured" hint. The screenshot run never submits it.
|
|
'-e REBRICKABLE_API_KEY=screenshot-placeholder',
|
|
`-v "${dataDir}:/data"`,
|
|
'bricktrack:shots',
|
|
].join(' '),
|
|
url: `${BASE_URL}/api/health`,
|
|
reuseExistingServer: false,
|
|
timeout: 180_000,
|
|
stdout: 'pipe',
|
|
stderr: 'pipe',
|
|
},
|
|
});
|