Adds three things to make frontend PRs reviewable directly from Gitea web UI: 1. Storybook 8 for Vue 3 components - .storybook/main.ts + preview.ts - HealthDashboard.stories.ts (1 example story) - npm run storybook / npm run build-storybook 2. Playwright JSON reporter + screenshot on every test - playwright.config.ts: json reporter + screenshot: 'on' - health.spec.ts: explicit screenshot path 3. Auto-generated markdown docs with breadcrumbs - scripts/generate-test-docs.mjs: reads results.json -> generates docs/e2e/<test>.md per test - docs/README.md: top-level frontend docs index - docs/e2e/README.md: e2e index with link to each test - Each test markdown has breadcrumb [<- Back to index] - Screenshots embedded via relative path Companion to PR #25 (Nuxt scaffold). Out of scope (future PRs): - Visual regression testing - Storybook deployment / hosted preview - More e2e test coverage 🤖 Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
24 lines
545 B
TypeScript
24 lines
545 B
TypeScript
import { defineConfig } from '@playwright/test'
|
|
import path from 'path'
|
|
|
|
export default defineConfig({
|
|
testDir: './tests/e2e',
|
|
timeout: 30_000,
|
|
reporter: [
|
|
['list'],
|
|
['json', { outputFile: path.join(process.cwd(), 'test-results', 'results.json') }],
|
|
],
|
|
use: {
|
|
baseURL: 'http://localhost:3000',
|
|
screenshot: 'on',
|
|
video: 'off',
|
|
},
|
|
outputDir: 'test-results/output',
|
|
webServer: {
|
|
command: 'npm run dev',
|
|
url: 'http://localhost:3000',
|
|
timeout: 60_000,
|
|
reuseExistingServer: !process.env.CI,
|
|
},
|
|
})
|