mirror of
https://github.com/mudler/LocalAI.git
synced 2026-08-01 02:49:51 -04:00
* feat(ui): add voice library workflow Give administrators a production-ready flow to record or upload consented reference audio, manage reusable profiles, inspect API usage, discover compatible models, and hand a saved voice directly to text-to-speech. Assisted-by: Codex:gpt-5 * feat(voice): add managed voice cloning profiles Make reusable reference voices manageable through the admin API instead of requiring model-directory and YAML edits. Discover compatible installed and gallery models from server-side backend capabilities, retain explicit model configuration controls, and stage saved references for supported backends. Expose profile management through REST and MCP, document backend-specific behavior, and cover the workflow from profile creation through real Qwen3-TTS synthesis. Harden the agent-job HTTP test against completion racing cancellation. Assisted-by: Codex:gpt-5 --------- Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
44 lines
1.8 KiB
JavaScript
44 lines
1.8 KiB
JavaScript
import { test, expect } from './coverage-fixtures.js'
|
|
|
|
// Render-smoke coverage. Each page is lazy-loaded and runs its full render +
|
|
// initial effects on mount, so a bare visit captures the bulk of a page's
|
|
// lines — cheap, real coverage for pages that have no dedicated spec yet.
|
|
//
|
|
// This is the project's preferred way to keep the UI coverage gate green:
|
|
// raise the floor by covering more, rather than loosening the gate's
|
|
// tolerance (see CONTRIBUTING.md → "React UI coverage"). Auth is disabled in
|
|
// the test server, so RequireAdmin/RequireFeature resolve to isAdmin=true and
|
|
// every gated route renders without an auth/capability mock.
|
|
//
|
|
// Asserts the page mounted (its .page-title header is visible) and that it did
|
|
// not bounce to a gate redirect (/login or back to /app home).
|
|
const PAGES = [
|
|
['/app/talk', 'Talk'],
|
|
['/app/usage', 'Usage'],
|
|
['/app/account', 'Account'],
|
|
['/app/studio', 'Studio'],
|
|
['/app/manage', 'Manage'],
|
|
['/app/backends', 'Backends'],
|
|
['/app/settings', 'Settings'],
|
|
['/app/nodes', 'Nodes'],
|
|
['/app/scheduling', 'Scheduling'],
|
|
['/app/face', 'Face recognition'],
|
|
['/app/voice', 'Voice recognition'],
|
|
['/app/fine-tune', 'Fine-tuning'],
|
|
['/app/quantize', 'Quantize'],
|
|
['/app/voice-library', 'Voice Library'],
|
|
['/app/voice-library/new', 'Create voice profile'],
|
|
]
|
|
|
|
test.describe('Page render smoke', () => {
|
|
for (const [path, label] of PAGES) {
|
|
test(`renders ${label} (${path})`, async ({ page }) => {
|
|
await page.goto(path)
|
|
// .page-title for the normal header; .empty-state-title for pages that
|
|
// render a gated/empty state (e.g. Account when auth is disabled).
|
|
await expect(page.locator('.page-title, .empty-state-title').first()).toBeVisible({ timeout: 15_000 })
|
|
await expect(page).toHaveURL(new RegExp(path.replace(/\//g, '\\/') + '$'))
|
|
})
|
|
}
|
|
})
|