mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat: add output filename suffixes, CPU fallback for GPU packages, and fix e2e tests
- Add tool-specific suffix to output filenames so downloads don't overwrite originals (batch & single-tool routes) - Skip deleting shared models when uninstalling a bundle that shares models with another installed bundle - Auto-detect NVIDIA GPU and swap GPU-only pip packages (onnxruntime-gpu, paddlepaddle-gpu) for CPU equivalents - Refactor docker-compose with YAML anchors and explicit cpu/gpu profiles - Add libheif-plugin-x265 to Dockerfile - Fix install-all queue logic to handle concurrent individual installs and clear stale errors - Unify playwright docker config to use same test dir with API_URL env var - Fix flaky e2e selectors, rename Strip Metadata → Remove Metadata, handle collage custom dropzone, improve fallback test image generation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,7 @@ const TOOLS_WITH_DROPZONE = [
|
||||
{ id: "rotate", name: "Rotate" },
|
||||
{ id: "convert", name: "Convert" },
|
||||
{ id: "compress", name: "Compress" },
|
||||
{ id: "strip-metadata", name: "Strip Metadata" },
|
||||
{ id: "strip-metadata", name: "Remove Metadata" },
|
||||
{ id: "edit-metadata", name: "Edit Metadata" },
|
||||
{ id: "bulk-rename", name: "Bulk Rename" },
|
||||
{ id: "image-to-pdf", name: "Image to PDF" },
|
||||
@@ -33,7 +33,7 @@ const TOOLS_WITH_DROPZONE = [
|
||||
{ id: "find-duplicates", name: "Find Duplicates" },
|
||||
{ id: "color-palette", name: "Color Palette" },
|
||||
{ id: "barcode-read", name: "Barcode" },
|
||||
{ id: "collage", name: "Collage" },
|
||||
{ id: "collage", name: "Collage", customDropzone: true },
|
||||
{ id: "stitch", name: "Stitch" },
|
||||
{ id: "split", name: "Image Splitting" },
|
||||
{ id: "border", name: "Border" },
|
||||
@@ -53,14 +53,20 @@ test.describe("All tool pages render", () => {
|
||||
// Tool name should be visible
|
||||
await expect(page.getByText(tool.name, { exact: false }).first()).toBeVisible();
|
||||
|
||||
// Should show dropzone
|
||||
await expect(page.getByText("Upload from computer")).toBeVisible();
|
||||
// Should show dropzone (some tools like collage use custom upload text)
|
||||
const uploadText = (tool as any).customDropzone
|
||||
? page.getByText(/upload/i).first()
|
||||
: page.getByText("Upload from computer");
|
||||
await expect(uploadText).toBeVisible();
|
||||
|
||||
// Should show Files section
|
||||
await expect(page.getByText("Files").first()).toBeVisible();
|
||||
// Collage has a custom layout (no Files/Settings headings)
|
||||
if (!(tool as any).customDropzone) {
|
||||
// Should show Files section
|
||||
await expect(page.getByText("Files").first()).toBeVisible();
|
||||
|
||||
// Should show Settings section
|
||||
await expect(page.getByText("Settings").first()).toBeVisible();
|
||||
// Should show Settings section
|
||||
await expect(page.getByText("Settings").first()).toBeVisible();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user