Files
SnapOtter/tests/e2e/gui-visual-tools.spec.ts
T
SnapOtterandGitHub 4ec39c556f test: testing overhaul -- CI e2e gates, parallel suites, generated matrices, mutation testing (#215)
Closes the "e2e never runs in CI" hole. Adds per-PR e2e smoke gate,
nightly full-suite workflows, parallel vitest forks (per-fork DBs),
Playwright parallel/serial/visual projects against production builds,
metadata-generated test suites (drift guards, hostile inputs, format
matrix, pairwise settings, property-based fuzz), Stryker mutation
testing, Schemathesis API fuzz, coverage ratchet, and fixes for three
session-poisoning bugs that caused 200+ serial-bucket failures.

Bug fix included: favicon/split/bulk-rename could hang clients forever
when ZIP streaming failed after reply.hijack().
2026-06-10 22:01:13 +08:00

29 lines
1.2 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 }) => {
await page.goto(`/${tool.id}`);
// 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",
});
});
}
});