mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
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:
@@ -12,7 +12,7 @@ const PDF_FIXTURE = path.join(
|
||||
|
||||
test.describe("PDF to Image tool", () => {
|
||||
test("shows page thumbnails after uploading a PDF", async ({ loggedInPage: page }) => {
|
||||
await page.goto("/pdf-to-image");
|
||||
await page.goto("/pdf/pdf-to-image");
|
||||
|
||||
// Upload PDF via file input
|
||||
const fileInput = page.locator("input[type='file'][accept='application/pdf']");
|
||||
@@ -26,7 +26,7 @@ test.describe("PDF to Image tool", () => {
|
||||
});
|
||||
|
||||
test("converts a PDF page to an image and shows results", async ({ loggedInPage: page }) => {
|
||||
await page.goto("/pdf-to-image");
|
||||
await page.goto("/pdf/pdf-to-image");
|
||||
|
||||
// Upload PDF
|
||||
const fileInput = page.locator("input[type='file'][accept='application/pdf']");
|
||||
@@ -51,7 +51,7 @@ test.describe("PDF to Image tool", () => {
|
||||
});
|
||||
|
||||
test("can select and deselect pages via thumbnails", async ({ loggedInPage: page }) => {
|
||||
await page.goto("/pdf-to-image");
|
||||
await page.goto("/pdf/pdf-to-image");
|
||||
|
||||
// Upload PDF
|
||||
const fileInput = page.locator("input[type='file'][accept='application/pdf']");
|
||||
|
||||
Reference in New Issue
Block a user