diff --git a/job-application-demo/e2e/job-application.spec.ts b/job-application-demo/e2e/job-application.spec.ts index 4cc49d2..7714085 100644 --- a/job-application-demo/e2e/job-application.spec.ts +++ b/job-application-demo/e2e/job-application.spec.ts @@ -24,11 +24,10 @@ test.describe('Job Application Form', () => { ).toBeVisible(); }); - // Skipped: HTML5 validation prevents testing custom validation messages - test.skip('should show validation errors for incomplete required fields', async ({ + test('should show validation errors for incomplete required fields', async ({ page, }) => { - // Fill some fields to bypass HTML5 validation + // Fill some fields but leave others empty to trigger custom validation await page.getByLabel(/full name/i).fill('John Doe'); await page.getByLabel(/email/i).fill('john@example.com'); // Leave other required fields empty diff --git a/job-application-demo/package.json b/job-application-demo/package.json index c94c06a..d701ffd 100644 --- a/job-application-demo/package.json +++ b/job-application-demo/package.json @@ -10,7 +10,7 @@ "test": "vitest", "test:ui": "vitest --ui", "test:coverage": "vitest --coverage", - "test:e2e": "pnpm test:e2e --project=chromium --project=firefox", + "test:e2e": "playwright test --project=chromium --project=firefox --reporter=list", "test:e2e:ui": "playwright test --project=chromium --project=firefox --ui", "test:e2e:report": "playwright show-report" },