test(e2e): add public commission success path coverage

This commit is contained in:
2026-02-12 22:19:02 +01:00
parent 1f29594b7a
commit be6969c30f
2 changed files with 23 additions and 0 deletions

View File

@@ -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

View File

@@ -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()
})
})