chore(test): Playwright für PWA-E2E-Tests aufgesetzt
All checks were successful
Build & Publish Docker Image / build-and-push (push) Successful in 1m33s
All checks were successful
Build & Publish Docker Image / build-and-push (push) Successful in 1m33s
@playwright/test + chromium als devDep. playwright.config.ts startet npm run preview (production build nötig für SW), baseURL localhost:4173, fullyParallel off (SW-Installations-Timing). Ein Smoke-Test smoke.spec.ts öffnet / und prüft den Titel. test-results/ und playwright-report/ in .gitignore ergänzt. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
21
playwright.config.ts
Normal file
21
playwright.config.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { defineConfig } from '@playwright/test';
|
||||
|
||||
// E2E-Tests nutzen den SvelteKit-Preview-Build. `npm run build` muss
|
||||
// vor den Tests gelaufen sein — Playwright startet dann nur den
|
||||
// Preview-Server (kein Dev-Server, damit der SW registrierbar ist).
|
||||
export default defineConfig({
|
||||
testDir: 'tests/e2e',
|
||||
fullyParallel: false,
|
||||
reporter: 'list',
|
||||
use: {
|
||||
baseURL: 'http://localhost:4173',
|
||||
headless: true,
|
||||
serviceWorkers: 'allow'
|
||||
},
|
||||
webServer: {
|
||||
command: 'npm run preview',
|
||||
url: 'http://localhost:4173',
|
||||
reuseExistingServer: !process.env.CI,
|
||||
timeout: 30_000
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user