Files
SnapOtter/playwright.config.ts
T
Siddharth Kumar Sah ce03aad10f feat: production Docker, Playwright tests, settings API, and bug fixes
- Add user management endpoints (register, list, delete, change password)
- Add API key management (create, list, delete)
- Add settings persistence endpoints (get, put)
- Wire settings dialog to real backend (People, API Keys, System, Security)
- Fix login auth flow (window.location.href for full reload)
- Fix download URLs returning 401 (make public since UUIDs are unguessable)
- Fix border tool shadowColor validation (accept 6-8 hex digits)
- Fix remove-bg alpha matting fallback (retry without on failure)
- Fix AI tool silent fallbacks (report errors instead of no-ops)
- Add checkerboard background to before/after slider for transparency
- Add progress bars to all AI tool components
- Add Playwright E2E test suite (131 tests across 9 test files)
- Rewrite Dockerfile for production (tsx runtime, pre-baked AI models)
- Add .dockerignore for faster builds
- Add proper accessible labels to login form
2026-03-22 19:28:57 +08:00

58 lines
1.2 KiB
TypeScript

import { defineConfig, devices } from "@playwright/test";
import path from "node:path";
const authFile = path.join(__dirname, "test-results", ".auth", "user.json");
export default defineConfig({
testDir: "./tests/e2e",
timeout: 30_000,
expect: {
timeout: 10_000,
},
fullyParallel: false,
retries: 0,
workers: 1,
reporter: "html",
use: {
baseURL: "http://localhost:1349",
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"],
},
],
webServer: [
{
command: "pnpm --filter @stirling-image/api dev",
port: 1350,
reuseExistingServer: !process.env.CI,
env: {
AUTH_ENABLED: "true",
DEFAULT_USERNAME: "admin",
DEFAULT_PASSWORD: "admin",
RATE_LIMIT_PER_MIN: "1000",
},
timeout: 30_000,
},
{
command: "pnpm --filter @stirling-image/web dev",
port: 1349,
reuseExistingServer: !process.env.CI,
timeout: 30_000,
},
],
});
export { authFile };