Files
SnapOtter/playwright.docker.config.ts
T
SnapOtter 86db131198 fix: JXL decode fallback and Playwright remote container support
Add djxl (libjxl-tools) as primary JXL decoder with ImageMagick
fallback — fixes JXL format failures on Ubuntu where stock ImageMagick
lacks a JXL delegate. Also make Playwright Docker config respect
BASE_URL env var for testing against remote containers.
2026-04-26 02:53:02 +08:00

45 lines
1.2 KiB
TypeScript

import path from "node:path";
import { defineConfig, devices } from "@playwright/test";
const authFile = path.join(__dirname, "test-results", ".auth", "user.json");
// Point raw-fetch tests (api.spec, security.spec, people.spec, rbac.spec) at
// the Docker container instead of the dev-server default (port 13490).
// Start the container with: SKIP_MUST_CHANGE_PASSWORD=true docker compose -f docker/docker-compose.yml up -d
const containerUrl = process.env.BASE_URL || "http://localhost:1349";
process.env.API_URL ??= containerUrl;
export default defineConfig({
testDir: "./tests/e2e",
timeout: 600_000,
expect: {
timeout: 60_000,
},
fullyParallel: false,
retries: 0,
workers: 1,
reporter: [["html", { open: "never" }], ["list"]],
use: {
baseURL: containerUrl,
screenshot: "only-on-failure",
trace: "retain-on-failure",
},
projects: [
{
name: "setup",
testMatch: /auth\.setup\.ts/,
},
{
name: "chromium",
use: {
...devices["Desktop Chrome"],
storageState: authFile,
},
dependencies: ["setup"],
},
],
// No webServer — tests run against the Docker container at localhost:1349
});
export { authFile };