import { test, expect } from '@playwright/test'; const PAGES = ['/', '/tutorials', '/videos', '/about', '/login', '/claude', '/chatgpt', '/computer-use', '/ai-video']; test.describe('Public pages', () => { for (const path of PAGES) { test(`${path} loads`, async ({ page }) => { const response = await page.goto(path); expect(response?.status()).toBe(200); await expect(page.locator('h1').first()).toBeVisible(); }); } test('a tutorial page renders its article and outline', async ({ page }) => { await page.goto('/claude/claude-code-best-practices'); await expect(page.locator('h1')).toContainText('Claude Code'); await expect(page.locator('article h2').first()).toBeVisible(); }); test('unknown track returns 404', async ({ page }) => { const response = await page.goto('/not-a-track'); expect(response?.status()).toBe(404); }); });