From be6969c30f52296684cccc21b08c2811f9fb9b4b Mon Sep 17 00:00:00 2001 From: Citali Date: Thu, 12 Feb 2026 22:19:02 +0100 Subject: [PATCH] test(e2e): add public commission success path coverage --- TODO.md | 1 + e2e/public-rendering.pw.ts | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/TODO.md b/TODO.md index 4646042..6170609 100644 --- a/TODO.md +++ b/TODO.md @@ -326,6 +326,7 @@ This file is the single source of truth for roadmap and delivery progress. - [2026-02-12] Public rendering integration advanced with locale-aware navigation/news translations and a new public commission request entry route (`/[locale]/commissions`) that creates/reuses customer records and opens a `new` commission. - [2026-02-12] Public portfolio baseline added with `/{locale}/portfolio` and `/{locale}/portfolio/{slug}`, including published-artwork filters (gallery/album/category/tag), rendition image streaming via web `/api/media/file/:id`, and media-aware artwork detail rendering. - [2026-02-12] Public UX pass: commission request flow now reports explicit invalid budget range errors, and header navigation now falls back to localized defaults (`home`, `portfolio`, `news`, `commissions`) when no CMS menu exists; seed data now creates those default menu entries. +- [2026-02-12] Added `e2e/public-rendering.pw.ts` web coverage for fallback navigation visibility, portfolio routes, and commission submission validation (invalid budget range + successful submission path). ## How We Use This File diff --git a/e2e/public-rendering.pw.ts b/e2e/public-rendering.pw.ts index ceaf2dc..29755cd 100644 --- a/e2e/public-rendering.pw.ts +++ b/e2e/public-rendering.pw.ts @@ -35,4 +35,26 @@ test.describe("public rendering integration", () => { await expect(page).toHaveURL(/\/commissions\?error=budget_range_invalid/) }) + + test("public commission form accepts valid submission", async ({ page }, testInfo) => { + test.skip(testInfo.project.name !== "web-chromium") + + const customerName = `E2E Public Customer ${Date.now()}` + const commissionTitle = `E2E Public Commission ${Date.now()}` + const customerEmail = `public-commission-${Date.now()}@example.com` + + await page.goto("/commissions") + await page.locator('input[name="customerName"]').fill(customerName) + await page.locator('input[name="customerEmail"]').fill(customerEmail) + await page.locator('input[name="title"]').fill(commissionTitle) + await page + .locator('textarea[name="description"]') + .fill("E2E public request -> admin visibility") + await page.locator('input[name="budgetMin"]').fill("250") + await page.locator('input[name="budgetMax"]').fill("500") + await page.getByRole("button", { name: /submit|senden|envoyer/i }).click() + + await expect(page).toHaveURL(/\/commissions\?notice=submitted/) + await expect(page.getByText(/submitted|übermittelt|enviada|envoyée/i)).toBeVisible() + }) })