const { test, expect } = require('@playwright/test'); test.describe('E2E Tests: Portfolio Homepage', () => { test('should load page and display correct title and header', async ({ page }) => { await page.goto('/'); // Check title await expect(page).toHaveTitle(/Robert Müller/i); // Check header heading const heading = page.locator('h1'); await expect(heading).toBeVisible(); await expect(heading).toContainText('Robert Müller'); }); test('should contain interactive email link', async ({ page }) => { await page.goto('/'); // Check if mail link exists and has correct href const mailLink = page.locator('a[href^="mailto:"]'); await expect(mailLink).toBeVisible(); await expect(mailLink).toHaveAttribute('href', 'mailto:mail@robert-mueller.net'); }); });