Files
LocalAI/core/http/react-ui/playwright.config.js
T
Ettore Di Giacinto 1604a67c1f feat(addons): add the add-on runtime, navigation and first-party add-ons
Add the add-on runtime to LocalAI: manifests, the host operation broker,
admin gating by account role, the add-on UI bundle builder and the SDK
for add-on pages. Move the navigation to Chat, Models, Add-ons and
Settings, with pinned add-ons in the sidebar and an Add-ons drawer.

Ship the first-party add-ons (voice, face, fine-tuning, quantization) as
packages for linux/amd64, linux/arm64 and darwin/arm64. Intel macOS
(darwin/amd64) is enabled in the platform files.

Squashed from the review branch. The tree is unchanged; the pre-squash
history is kept on a local backup branch.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2026-10-20 20:54:43 +00:00

51 lines
2.2 KiB
JavaScript

import { defineConfig } from '@playwright/test'
export default defineConfig({
testDir: './e2e',
// The add-on and Tables specs need a server with authentication, a real
// add-on owner and a ready file the matching runner passes in an ADDONS_*
// variable; each reads it when the file loads, so the default run must not
// load them. Every one has its own config (playwright.<suite>.config.js) and
// is started by scripts/addons/*.sh.
testIgnore: [
'**/addons-foundation.spec.js', '**/addons-gallery.spec.js', '**/addons-proposals.spec.js',
'**/addons-recovery.spec.js', '**/addons-runtime.spec.js', '**/addons-slots.spec.js',
'**/addons-upgrade.spec.js', '**/tables-acceptance.spec.js', '**/tables-artifacts.spec.js',
'**/tables-ui.spec.js',
],
timeout: 30_000,
retries: process.env.CI ? 2 : 0,
// TEMPORARY: cap parallelism. Playwright's default (cores/2) oversubscribes
// high-core dev machines and intermittently starves the page-teardown
// coverage harvest past the 30s test timeout (flaky "Tearing down page"
// failures, different specs each run). Capped at 8 pending a proper
// root-cause fix; override with PW_WORKERS.
workers: process.env.PW_WORKERS ? Number(process.env.PW_WORKERS) : 8,
reporter: process.env.CI ? 'html' : 'list',
use: {
baseURL: 'http://127.0.0.1:8089',
trace: 'on-first-retry',
},
projects: [
{
name: 'chromium',
use: {
browserName: 'chromium',
// Use a nix-provided Chromium when PLAYWRIGHT_CHROMIUM_PATH is set
// (the flake dev shell exports it). Avoids Playwright's downloaded
// browser, which can't resolve system libs (libglib-2.0, …) on NixOS.
// Unset in CI, where `playwright install --with-deps` is used instead.
...(process.env.PLAYWRIGHT_CHROMIUM_PATH
? { launchOptions: { executablePath: process.env.PLAYWRIGHT_CHROMIUM_PATH } }
: {}),
},
},
],
webServer: process.env.PLAYWRIGHT_EXTERNAL_SERVER ? undefined : {
command: '../../../tests/e2e-ui/ui-test-server --mock-backend=../../../tests/e2e/mock-backend/mock-backend --port=8089 > /tmp/ui-test-server.log 2>&1',
port: 8089,
timeout: 120_000,
reuseExistingServer: !process.env.CI,
},
})