Files
SnapOtter/tests/e2e/gui-visual-tools.spec.ts
T
SnapOtterandGitHub 63a03d26f2 feat: pipeline templates, analytics opt-out, 83 conversion presets, positioning + e2e modernization
Lands five integrated branches: pipeline templates (#355), analytics opt-out (#354), 83 conversion presets bringing the catalog to 240 tools (#356), self-hosted positioning (#353), and e2e modernization (#351).

Integration fixes: aligned stale web analytics tests with the opt-out/allow-list model, closed 3 CodeQL incomplete-sanitization alerts in the i18n generator, resolved settings/index/docs/format-matrix conflicts, and corrected tool counts to 240.
2026-06-28 18:57:53 +08:00

31 lines
1.4 KiB
TypeScript

import { TOOLS } from "../../packages/shared/src/constants";
import { expect, test } from "./helpers";
// ---------------------------------------------------------------------------
// Visual baseline per tool page, generated from the shared TOOLS catalog.
//
// Runs in the chromium-visual project only. Baselines are platform-suffixed:
// darwin baselines come from local runs, linux baselines from the
// update-visual-baselines workflow (which opens a PR with refreshed goldens).
// AI tool pages capture whatever the default install state shows, which in CI
// is the install prompt.
// ---------------------------------------------------------------------------
test.describe("Tool page visual baselines", () => {
for (const tool of TOOLS) {
test(`${tool.id} page matches baseline`, async ({ loggedInPage: page }) => {
// 2.0 tool routes are section-prefixed (e.g. "/image/resize"); tool.route
// already carries the prefix (rewritten at module load in constants.ts).
await page.goto(tool.route);
// Settle: the tool name renders after the lazy settings chunk loads.
await expect(page.getByText(tool.name, { exact: false }).first()).toBeVisible();
await page.waitForLoadState("networkidle");
await expect(page).toHaveScreenshot(`tool-${tool.id}.png`, {
fullPage: false,
animations: "disabled",
});
});
}
});