// e2e/example.spec.ts import { test, expect } from '@playwright/test' test('navigate to /contact and check if h1 contains "Contactez nous"', async ({ page }) => { // Start from the index page (the baseURL is set via the webServer in the playwright.config.ts) await page.goto('http://localhost:3000/') // Find an element with the text 'About Page' and click on it await page.click('text=Contactez-nous') // The new URL should be "/about" (baseURL is used there) await expect(page).toHaveURL('http://localhost:3000/contact') // The new page should contain an h1 with "About Page" await expect(page.locator('h1')).toContainText('Contactez nous') })