Files
voicebox/e2e/specs/voices.spec.ts
T
Jamie Pine 37b7110e52 test: Playwright E2E with real backend + fake TTS engine
e2e/ drives the web build (vite preview) against a per-worker uvicorn:
each Playwright worker boots its own backend on its own port with a
temp cwd, so SQLite and audio files are fully isolated and parallel-
safe. The page fixture seeds the persisted voicebox-server store with
the worker's URL before any script runs.

VOICEBOX_FAKE_TTS=1 short-circuits get_tts_backend_for_engine to a
backend that synthesizes a sine tone sized to the text — the real task
queue, SSE progress, history rows, and audio serving all run, only
inference is fake. backend/requirements-ci.txt is the slim dependency
set validated to boot the app on a CPU-only runner.

Specs: startup, settings layout, seeded profile in /voices, and
generate-to-completed-audio through the full pipeline.
2026-08-08 15:40:36 -07:00

11 lines
352 B
TypeScript

import { expect, test } from '../fixtures';
import { seedProfile } from '../helpers/api';
test('a seeded voice profile appears in the voices tab', async ({ page, backend }) => {
const profile = await seedProfile(backend.url, 'Marcus Aurelius');
await page.goto('/voices');
await expect(page.getByText(profile.name).first()).toBeVisible();
});