import { test, expect } from '@playwright/test'; test('contact form submission', async ({ page }) => { await page.goto('/contact-us'); await page.fill('#name', 'Test User'); await page.fill('#email', 'test@example.com'); await page.fill('#message', 'Test message'); // Mock form submission await page.route('**/submit-contact', async route => { await route.fulfill({ status: 200, body: 'OK' }); }); await page.click('button[type="submit"]'); // Check for success message or redirect await expect(page.locator('body')).toContainText('submitted'); });