mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
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
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
import { test, expect } from "./helpers";
|
||||
|
||||
test.describe("Automate Page", () => {
|
||||
test("automate page renders pipeline builder", async ({
|
||||
loggedInPage: page,
|
||||
}) => {
|
||||
await page.goto("/automate");
|
||||
|
||||
// Should show the pipeline builder section
|
||||
await expect(
|
||||
page.getByText(/pipeline|automation|workflow/i).first(),
|
||||
).toBeVisible();
|
||||
});
|
||||
|
||||
test("shows suggested templates", async ({ loggedInPage: page }) => {
|
||||
await page.goto("/automate");
|
||||
|
||||
// Should show at least one template
|
||||
await expect(
|
||||
page
|
||||
.getByText(/social media|privacy|web optimization|profile|watermark/i)
|
||||
.first(),
|
||||
).toBeVisible();
|
||||
});
|
||||
|
||||
test("can add a step to pipeline", async ({ loggedInPage: page }) => {
|
||||
await page.goto("/automate");
|
||||
|
||||
// Look for add step button
|
||||
const addBtn = page.getByRole("button", { name: /add|step|\+/i }).first();
|
||||
if (await addBtn.isVisible()) {
|
||||
await addBtn.click();
|
||||
// Should show tool picker or added step
|
||||
await page.waitForTimeout(500);
|
||||
}
|
||||
});
|
||||
|
||||
test("has save pipeline button", async ({ loggedInPage: page }) => {
|
||||
await page.goto("/automate");
|
||||
|
||||
// Look for save button
|
||||
const saveBtn = page
|
||||
.getByRole("button", { name: /save/i })
|
||||
.first();
|
||||
// Save might be disabled until there are steps, but should exist
|
||||
await expect(saveBtn).toBeVisible();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user