import { expect, test } from '@playwright/test' import { LINKS } from '../src/content/links' test('raw HTML contains the rel=me anchor (no JS needed)', async ({ request }) => { const res = await request.get('/') const html = await res.text() expect(html).toMatch( /]*href="https:\/\/mastodon\.saillant\.cc\/@clement"[^>]*rel="me"/, ) }) test('raw HTML contains every identity link', async ({ request }) => { const html = await (await request.get('/')).text() for (const l of LINKS) expect(html).toContain(`href="${l.href}"`) }) test('the demo boots: canvas mounts and hud shows', async ({ page }) => { await page.goto('/') await expect(page.locator('#demo canvas')).toBeVisible() await expect(page.locator('#tracker')).toBeVisible() }) test('reduced motion serves the readable fallback', async ({ browser }) => { const ctx = await browser.newContext({ reducedMotion: 'reduce' }) const page = await ctx.newPage() await page.goto('/') await expect(page.locator('#fallback h1')).toBeVisible() await expect(page.locator('#demo canvas')).toHaveCount(0) await ctx.close() })