mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
Security: - Apply sanitizeSvg() to all file upload routes (files.ts, user-files.ts) preventing SSRF and script injection via SVG uploads to file library Functional: - Handle PaddleOCR-VL 1.5 markdown_texts output format in ocr.py - Add empty-text fallback in OCR tier chain (ocr.ts) so higher tiers that return empty text fall back to the next tier automatically - Fix SVG->PNG filename extension mismatch in tool-factory.ts so download endpoint serves correct Content-Type - Report original upload size (not decoded size) in API response Test infrastructure: - Move Playwright auth state from test-results/ to .playwright/ to prevent mid-run cleanup deleting auth files - Fix auth.setup.ts navigation race with waitForURL - Fix gui-batch.spec.ts regex matching "Presets" instead of "reset" - Fix pipeline-advanced.spec.ts crop bounds and resize assertions - Broaden pipeline cleanup to include all E2E-prefixed pipelines
45 lines
1.2 KiB
TypeScript
45 lines
1.2 KiB
TypeScript
import path from "node:path";
|
|
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
const authFile = path.join(__dirname, ".playwright", ".auth", "analytics-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-docker",
|
|
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 };
|