docs: add transparency-fixer endpoint documentation

This commit is contained in:
SnapOtter
2026-05-05 23:24:22 +08:00
parent 4745e435a4
commit eb3d0828cb
21 changed files with 166 additions and 62 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ test.describe("Docs Homepage", () => {
await expect(page.getByText("SnapOtter").first()).toBeVisible();
await expect(page.getByText("A Self Hosted Image Manipulator")).toBeVisible();
await expect(
page.getByText("47 tools. Local AI. No cloud. Your images never leave your home."),
page.getByText("48 tools. Local AI. No cloud. Your images never leave your home."),
).toBeVisible();
});
@@ -29,7 +29,7 @@ test.describe("Docs Homepage", () => {
test("features section renders all 6 feature cards", async ({ page }) => {
const features = [
"47 Image Tools",
"48 Image Tools",
"Local AI",
"Pipelines",
"REST API",
+11 -7
View File
@@ -37,16 +37,20 @@ test.describe("Landing Homepage", () => {
test("how-it-works section renders Docker command", async ({ page }) => {
await expect(page.getByText("Get started in seconds")).toBeVisible();
await expect(
page.getByText("docker run -d --name SnapOtter", { exact: false }),
).toBeVisible();
await expect(page.getByText("docker run -d --name SnapOtter", { exact: false })).toBeVisible();
});
test("why-choose section renders all 9 benefit cards", async ({ page }) => {
await expect(page.getByText("Built different. On purpose.")).toBeVisible();
const cards = [
"No Signup", "No Uploads", "Forever Free", "No Limits",
"Batch Processing", "Lightning Fast", "Open Source", "REST API",
"No Signup",
"No Uploads",
"Forever Free",
"No Limits",
"Batch Processing",
"Lightning Fast",
"Open Source",
"REST API",
"Pipeline Automation",
];
for (const card of cards) {
@@ -55,9 +59,9 @@ test.describe("Landing Homepage", () => {
});
test("bento grid renders with search and tool count", async ({ page }) => {
await expect(page.getByText("47 tools. Zero cloud dependency.")).toBeVisible();
await expect(page.getByText("48 tools. Zero cloud dependency.")).toBeVisible();
await expect(page.getByPlaceholder("Search tools...")).toBeVisible();
await expect(page.getByText(/Showing 47 of 47 tools/)).toBeVisible();
await expect(page.getByText(/Showing 48 of 48 tools/)).toBeVisible();
});
test("enterprise section renders feature cards", async ({ page }) => {
+10 -18
View File
@@ -9,28 +9,28 @@ test.describe("BentoGrid Interactions", () => {
const input = page.getByPlaceholder("Search tools...");
await input.fill("resize");
await expect(page.getByText("Resize", { exact: true }).first()).toBeVisible();
await expect(page.getByText(/Showing \d+ of 47 tools/)).toBeVisible();
await expect(page.getByText(/Showing \d+ of 48 tools/)).toBeVisible();
});
test("category pill filters tools", async ({ page }) => {
await page.getByText(/AI Tools/).click();
await expect(page.getByText(/Showing 14 of 47 tools/)).toBeVisible();
await expect(page.getByText(/Showing 15 of 48 tools/)).toBeVisible();
await expect(page.getByText("Remove Background")).toBeVisible();
});
test("clicking All resets category filter", async ({ page }) => {
await page.getByText(/AI Tools/).click();
await expect(page.getByText(/Showing 14 of 47 tools/)).toBeVisible();
await expect(page.getByText(/Showing 15 of 48 tools/)).toBeVisible();
await page.getByText(/All \(47\)/).click();
await expect(page.getByText(/Showing 47 of 47 tools/)).toBeVisible();
await page.getByText(/All \(48\)/).click();
await expect(page.getByText(/Showing 48 of 48 tools/)).toBeVisible();
});
test("search with no results shows empty state", async ({ page }) => {
const input = page.getByPlaceholder("Search tools...");
await input.fill("xyznonexistent");
await expect(page.getByText("No tools found. Try a different search.")).toBeVisible();
await expect(page.getByText(/Showing 0 of 47 tools/)).toBeVisible();
await expect(page.getByText(/Showing 0 of 48 tools/)).toBeVisible();
});
test("combined search and category filter works", async ({ page }) => {
@@ -68,29 +68,21 @@ test.describe("FAQ Page Accordion", () => {
test("clicking a question expands the answer", async ({ page }) => {
await page.getByText("Are my files safe and private?").click();
await expect(
page.getByText(/All processing happens on your own server/),
).toBeVisible();
await expect(page.getByText(/All processing happens on your own server/)).toBeVisible();
});
test("clicking again collapses the answer", async ({ page }) => {
const question = page.getByText("Are my files safe and private?");
await question.click();
await expect(
page.getByText(/All processing happens on your own server/),
).toBeVisible();
await expect(page.getByText(/All processing happens on your own server/)).toBeVisible();
await question.click();
await expect(
page.getByText(/All processing happens on your own server/),
).not.toBeVisible();
await expect(page.getByText(/All processing happens on your own server/)).not.toBeVisible();
});
test("multiple FAQs can be open simultaneously", async ({ page }) => {
await page.getByText("Are my files safe and private?").click();
await page.getByText("Is SnapOtter really free?").click();
await expect(
page.getByText(/All processing happens on your own server/),
).toBeVisible();
await expect(page.getByText(/All processing happens on your own server/)).toBeVisible();
await expect(page.getByText(/open source under AGPL-3.0/)).toBeVisible();
});
});
+1 -1
View File
@@ -289,7 +289,7 @@ test.describe("GUI Settings - Tools Tab (deep)", () => {
// Each tool row has an enable/disable toggle (w-11 h-6 rounded-full)
const toolToggles = page.locator("button.w-11.h-6");
const count = await toolToggles.count();
// Should have many tools (SnapOtter has 47)
// Should have many tools (SnapOtter has 48)
expect(count).toBeGreaterThan(10);
});
+9 -9
View File
@@ -25,7 +25,7 @@ function getCountText(): string {
describe("BentoGrid", () => {
it("renders the section heading", () => {
render(<BentoGrid />);
expect(screen.getByText("47 tools. Zero cloud dependency.")).toBeDefined();
expect(screen.getByText("48 tools. Zero cloud dependency.")).toBeDefined();
});
it("renders the search input", () => {
@@ -36,12 +36,12 @@ describe("BentoGrid", () => {
it("shows all tools by default", () => {
render(<BentoGrid />);
const text = getCountText();
expect(text).toMatch(/Showing 47 of 47 tools/);
expect(text).toMatch(/Showing 48 of 48 tools/);
});
it("renders category filter pills including All", () => {
render(<BentoGrid />);
expect(screen.getByText((_, el) => el?.textContent === "All (47)")).toBeDefined();
expect(screen.getByText((_, el) => el?.textContent === "All (48)")).toBeDefined();
expect(screen.getByText(/Essentials/)).toBeDefined();
expect(screen.getByText(/AI Tools/)).toBeDefined();
expect(screen.getByText(/Optimization/)).toBeDefined();
@@ -53,7 +53,7 @@ describe("BentoGrid", () => {
fireEvent.change(input, { target: { value: "resize" } });
expect(screen.getByText("Resize")).toBeDefined();
const text = getCountText();
expect(text).toMatch(/Showing \d+ of 47 tools/);
expect(text).toMatch(/Showing \d+ of 48 tools/);
expect(screen.queryByText("OCR / Text Extraction")).toBeNull();
});
@@ -62,7 +62,7 @@ describe("BentoGrid", () => {
const aiButton = screen.getByText(/AI Tools/);
fireEvent.click(aiButton);
const text = getCountText();
expect(text).toMatch(/Showing 14 of 47 tools/);
expect(text).toMatch(/Showing 15 of 48 tools/);
expect(screen.getByText("Remove Background")).toBeDefined();
expect(screen.queryByText("Resize")).toBeNull();
});
@@ -73,7 +73,7 @@ describe("BentoGrid", () => {
fireEvent.change(input, { target: { value: "xyznonexistent" } });
expect(screen.getByText("No tools found. Try a different search.")).toBeDefined();
const text = getCountText();
expect(text).toMatch(/Showing 0 of 47 tools/);
expect(text).toMatch(/Showing 0 of 48 tools/);
});
it("combines search and category filter", () => {
@@ -89,9 +89,9 @@ describe("BentoGrid", () => {
it("clicking All resets category filter", () => {
render(<BentoGrid />);
fireEvent.click(screen.getByText(/AI Tools/));
expect(getCountText()).toMatch(/Showing 14 of 47 tools/);
fireEvent.click(screen.getByText((_, el) => el?.textContent === "All (47)"));
expect(getCountText()).toMatch(/Showing 47 of 47 tools/);
expect(getCountText()).toMatch(/Showing 15 of 48 tools/);
fireEvent.click(screen.getByText((_, el) => el?.textContent === "All (48)"));
expect(getCountText()).toMatch(/Showing 48 of 48 tools/);
});
it("renders each tool with name and description", () => {
+2 -2
View File
@@ -159,9 +159,9 @@ describe("Pricing", () => {
it("renders free plan features", () => {
render(<Pricing />);
expect(screen.getByText("All 47 image processing tools")).toBeDefined();
expect(screen.getByText("All 48 image processing tools")).toBeDefined();
expect(screen.getByText("Unlimited usage, no hidden caps")).toBeDefined();
expect(screen.getByText("14 local AI models included")).toBeDefined();
expect(screen.getByText("15 local AI models included")).toBeDefined();
expect(screen.getByText("AGPL-3.0 licensed")).toBeDefined();
});