test(e2e): add public commission success path coverage
This commit is contained in:
@@ -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()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user