Files
kilo-cv/tests/e2e/cv.spec.js
2026-02-23 13:48:13 +01:00

40 lines
1.4 KiB
JavaScript

import { test, expect } from '@playwright/test';
test.describe('CV Page', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/');
});
test('displays hero section with name', async ({ page }) => {
await expect(page.locator('h1')).toContainText('Tuan-Dat Tran');
});
test('displays job title', async ({ page }) => {
const heroTitle = page.locator('section').first().locator('h2');
await expect(heroTitle).toContainText('DevOps Engineer');
});
test('displays experience section', async ({ page }) => {
await expect(page.getByRole('heading', { name: 'Berufserfahrung' })).toBeVisible();
});
test('displays skills section', async ({ page }) => {
await expect(page.getByRole('heading', { name: 'Skills' })).toBeVisible();
});
test('displays education section', async ({ page }) => {
await expect(page.getByRole('heading', { name: 'Ausbildung' })).toBeVisible();
});
test('displays projects section', async ({ page }) => {
await expect(page.getByRole('heading', { name: 'Projekte' })).toBeVisible();
});
test('contact links are present', async ({ page }) => {
const heroSection = page.locator('section').first();
await expect(heroSection.getByRole('link', { name: 'Email' })).toBeVisible();
await expect(heroSection.getByRole('link', { name: 'GitHub' })).toBeVisible();
await expect(heroSection.getByRole('link', { name: 'LinkedIn' })).toBeVisible();
});
});