mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
- 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
58 lines
1.2 KiB
TypeScript
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 };
|