test(e2e): modernize stale routes for 2.0 section URLs (#347)

The e2e specs predate the 2.0 section-route migration and navigated to
single-segment tool URLs (/resize) that now 404 (App.tsx only mounts
/:section/:toolId). This broke the whole e2e suite (Cross-Browser, Device
Matrix, E2E Full, Visual) - part of the known stale-spec backlog.

- Sweep 929 goto("/<tool>") -> goto("/<section>/<tool>") across 45 spec
  files, using the authoritative TOOLS + toolSection() mapping. Two-segment
  routes, top-level routes (/automate, /editor, ...), and intentional 404
  tests (/nonexistent-*) are untouched.
- Implement the legacy redirects the specs already assert: the 1.x color
  tools (brightness-contrast, saturation, color-channels, color-effects)
  redirect to /image/adjust-colors (App.tsx). Good for old bookmarks too.
- Remove the analytics-consent page tests (gui-navigation + gui-visual);
  #336 deleted that page.

Mechanical + biome-clean + web typecheck passes. Browser-specific behavior
can only be confirmed by the nightly e2e jobs.
This commit is contained in:
SnapOtter
2026-06-24 20:19:37 +08:00
committed by GitHub
parent 3dd0ebb49d
commit 0f98f60c33
46 changed files with 947 additions and 969 deletions
+5 -5
View File
@@ -76,7 +76,7 @@ test.describe("Visual regression: Tool pages", () => {
test("resize tool - desktop (empty state)", async ({ loggedInPage: page }) => {
await page.setViewportSize({ width: 1280, height: 720 });
await page.goto("/resize");
await page.goto("/image/resize");
await page.waitForLoadState("networkidle");
await page.waitForTimeout(500);
@@ -88,7 +88,7 @@ test.describe("Visual regression: Tool pages", () => {
test("resize tool - desktop (with file uploaded)", async ({ loggedInPage: page }) => {
await page.setViewportSize({ width: 1280, height: 720 });
await page.goto("/resize");
await page.goto("/image/resize");
await uploadTestImage(page);
await page.waitForTimeout(500);
@@ -102,7 +102,7 @@ test.describe("Visual regression: Tool pages", () => {
test("resize tool - mobile (empty state)", async ({ loggedInPage: page }) => {
await page.setViewportSize({ width: 375, height: 667 });
await page.goto("/resize");
await page.goto("/image/resize");
await page.waitForLoadState("networkidle");
await page.waitForTimeout(500);
@@ -114,7 +114,7 @@ test.describe("Visual regression: Tool pages", () => {
test("compress tool - desktop (empty state)", async ({ loggedInPage: page }) => {
await page.setViewportSize({ width: 1280, height: 720 });
await page.goto("/compress");
await page.goto("/image/compress");
await page.waitForLoadState("networkidle");
await page.waitForTimeout(500);
@@ -126,7 +126,7 @@ test.describe("Visual regression: Tool pages", () => {
test("convert tool - desktop (empty state)", async ({ loggedInPage: page }) => {
await page.setViewportSize({ width: 1280, height: 720 });
await page.goto("/convert");
await page.goto("/image/convert");
await page.waitForLoadState("networkidle");
await page.waitForTimeout(500);