fix: update tool count to 52 and add ai-canvas-expand to landing page

ai-canvas-expand was added to constants.ts and route files but never
added to the landing page bento grid, causing all hardcoded counts
to remain at 51. This updates all references across source, docs,
i18n, and tests to reflect the correct count of 52 tools.
This commit is contained in:
SnapOtter
2026-05-16 10:02:19 +08:00
parent 00f408b45e
commit 2c45a3a9e8
19 changed files with 45 additions and 39 deletions
+9 -9
View File
@@ -25,7 +25,7 @@ function getCountText(): string {
describe("BentoGrid", () => {
it("renders the section heading", () => {
render(<BentoGrid />);
expect(screen.getByText("51 tools. Zero cloud dependency.")).toBeDefined();
expect(screen.getByText("52 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 51 of 51 tools/);
expect(text).toMatch(/Showing 52 of 52 tools/);
});
it("renders category filter pills including All", () => {
render(<BentoGrid />);
expect(screen.getByText((_, el) => el?.textContent === "All (51)")).toBeDefined();
expect(screen.getByText((_, el) => el?.textContent === "All (52)")).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 51 tools/);
expect(text).toMatch(/Showing \d+ of 52 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 15 of 51 tools/);
expect(text).toMatch(/Showing 16 of 52 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 51 tools/);
expect(text).toMatch(/Showing 0 of 52 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 15 of 51 tools/);
fireEvent.click(screen.getByText((_, el) => el?.textContent === "All (51)"));
expect(getCountText()).toMatch(/Showing 51 of 51 tools/);
expect(getCountText()).toMatch(/Showing 16 of 52 tools/);
fireEvent.click(screen.getByText((_, el) => el?.textContent === "All (52)"));
expect(getCountText()).toMatch(/Showing 52 of 52 tools/);
});
it("renders each tool with name and description", () => {
+1 -1
View File
@@ -157,7 +157,7 @@ describe("Pricing", () => {
it("renders free plan features", () => {
render(<Pricing />);
expect(screen.getByText("All 51 image processing tools")).toBeDefined();
expect(screen.getByText("All 52 image processing tools")).toBeDefined();
expect(screen.getByText("Unlimited usage, no hidden caps")).toBeDefined();
expect(screen.getByText("15 local AI models included")).toBeDefined();
expect(screen.getByText("AGPL-3.0 licensed")).toBeDefined();