Three-level end-to-end suite, all deterministic (no retries, no sleeps, no unmocked network): - tests/e2e/api (209 tests): every route in clipwright/api/app.py + free_tools — health/config, uploads, process submit matrix + worker/webhook/ auto-retry/resume, status/source/download-all, edit/effects, transcript/EDL/ rerender, scenes/reframe, subtitle, hook, Postiz, thumbnails, free tools, and the security/path guards. - tests/e2e/pipeline (136 tests): every stage with real ffmpeg and stubbed Gemini/yt-dlp/ASR/ML — download, transcribe, scene detect, selection, layout, reframe/render, subtitles, hooks, watermark, thumbnails, plus the real CLI full pipeline via stub_env. - dashboard/e2e (19 Playwright specs): route-interception state machine covering every dashboard flow; one real-backend spec left test.fixme. - Foundation: tests/e2e/conftest.py (state isolation, no-network guard, ffmpeg media factory, disk-seeded jobs), FakePopen worker harness, child-process stub_env, architecture-consistent fixtures. - CI: unit + backend-e2e + dashboard-e2e jobs in the python+node container; ffmpeg + Playwright installed in-job; no setup-node/cache (act runner). Verified: unit 790 passed; API E2E 209 passed; pipeline E2E 136 passed; Playwright 19 passed / 1 skipped.
53 lines
1.7 KiB
JavaScript
53 lines
1.7 KiB
JavaScript
// Browser E2E config. Two projects:
|
|
// - `mock` (default): every network edge is intercepted, no retries, one
|
|
// worker. This is the lane that must stay green in CI.
|
|
// - `real`: drives the real backend (uvicorn + stub pipeline). Kept separate
|
|
// so the mocked lane never depends on Python.
|
|
/* global process */
|
|
import { defineConfig, devices } from '@playwright/test';
|
|
import { fileURLToPath } from 'node:url';
|
|
import path from 'node:path';
|
|
|
|
const dashboardDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
|
|
export default defineConfig({
|
|
testDir: './specs',
|
|
// No retries anywhere: a flaky test is a bug, not a coin flip.
|
|
retries: 0,
|
|
// One worker keeps the shared preview server and the deterministic fixtures
|
|
// predictable.
|
|
workers: 1,
|
|
fullyParallel: false,
|
|
timeout: 30_000,
|
|
expect: { timeout: 5_000 },
|
|
reporter: [['list']],
|
|
outputDir: './.test-results',
|
|
globalSetup: './fixtures/global-setup.js',
|
|
use: {
|
|
baseURL: 'http://127.0.0.1:4173',
|
|
trace: 'retain-on-failure',
|
|
screenshot: 'only-on-failure',
|
|
video: 'retain-on-failure',
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'mock',
|
|
testIgnore: /real-backend\.spec\.js/,
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
{
|
|
name: 'real',
|
|
testMatch: /real-backend\.spec\.js/,
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
webServer: {
|
|
command: 'npm run build && npx vite preview --port 4173 --strictPort --host 127.0.0.1',
|
|
cwd: dashboardDir,
|
|
url: 'http://127.0.0.1:4173',
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 120_000,
|
|
stdout: 'ignore',
|
|
stderr: 'pipe',
|
|
},
|
|
});
|