import { expect, test } from '@playwright/test'; import { tools } from '../../src/lib/tools'; /** * The tool registry, its icon map, the route files and the page headings all * live in different files. This catches the case where one of them drifts and a * registered tool 404s or renders under a different title. */ for (const tool of tools) { test(`the registry entry "${tool.title}" renders at /tools/${tool.slug}`, async ({ page }) => { const response = await page.goto(`/tools/${tool.slug}`); expect(response?.status()).toBe(200); await expect(page.getByRole('heading', { level: 1, name: tool.title })).toBeVisible(); }); }