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
90 lines
2.8 KiB
TypeScript
90 lines
2.8 KiB
TypeScript
import { test, expect } from "./helpers";
|
|
|
|
test.describe("Navigation", () => {
|
|
test("sidebar Tools link goes to home", async ({ loggedInPage: page }) => {
|
|
await page.goto("/automate");
|
|
await page.locator("aside").getByText("Tools").click();
|
|
await expect(page).toHaveURL("/");
|
|
});
|
|
|
|
test("sidebar Grid link goes to fullscreen view", async ({
|
|
loggedInPage: page,
|
|
}) => {
|
|
await page.locator("aside").getByText("Grid").click();
|
|
await expect(page).toHaveURL("/fullscreen");
|
|
});
|
|
|
|
test("sidebar Automate link goes to automate page", async ({
|
|
loggedInPage: page,
|
|
}) => {
|
|
await page.locator("aside").getByText("Automate").click();
|
|
await expect(page).toHaveURL("/automate");
|
|
});
|
|
|
|
test("sidebar Settings button opens settings dialog", async ({
|
|
loggedInPage: page,
|
|
}) => {
|
|
await page.locator("aside").getByText("Settings").click();
|
|
// Settings dialog should appear with section headings
|
|
await expect(page.getByRole("heading", { name: "General" })).toBeVisible();
|
|
await expect(page.getByRole("button", { name: "Security" })).toBeVisible();
|
|
});
|
|
|
|
test("fullscreen grid page renders tool cards", async ({
|
|
loggedInPage: page,
|
|
}) => {
|
|
await page.goto("/fullscreen");
|
|
|
|
// Should show category headers
|
|
await expect(page.getByText("Essentials")).toBeVisible();
|
|
await expect(page.getByText("Optimization")).toBeVisible();
|
|
await expect(page.getByText("Adjustments")).toBeVisible();
|
|
|
|
// Should show tools
|
|
await expect(page.getByText("Resize")).toBeVisible();
|
|
await expect(page.getByText("Compress")).toBeVisible();
|
|
await expect(page.getByText("Convert")).toBeVisible();
|
|
});
|
|
|
|
test("fullscreen grid has search functionality", async ({
|
|
loggedInPage: page,
|
|
}) => {
|
|
await page.goto("/fullscreen");
|
|
|
|
const searchInput = page.getByPlaceholder(/search/i);
|
|
await expect(searchInput).toBeVisible();
|
|
|
|
// Search for a specific tool
|
|
await searchInput.fill("resize");
|
|
await expect(page.getByText("Resize")).toBeVisible();
|
|
});
|
|
|
|
test("clicking a tool in fullscreen grid navigates to tool page", async ({
|
|
loggedInPage: page,
|
|
}) => {
|
|
await page.goto("/fullscreen");
|
|
|
|
// Click on Resize tool
|
|
await page.getByRole("link", { name: /resize/i }).first().click();
|
|
await expect(page).toHaveURL("/resize");
|
|
});
|
|
|
|
test("automate page shows pipeline templates", async ({
|
|
loggedInPage: page,
|
|
}) => {
|
|
await page.goto("/automate");
|
|
|
|
// Should show pipeline builder
|
|
await expect(
|
|
page.getByText(/pipeline|automation|workflow/i).first(),
|
|
).toBeVisible();
|
|
});
|
|
|
|
test("tool panel shows categories on home page", async ({
|
|
loggedInPage: page,
|
|
}) => {
|
|
// The tool panel should show categorized tools
|
|
await expect(page.getByText("Essentials").first()).toBeVisible();
|
|
});
|
|
});
|