import { test, expect } from '@chromatic-com/playwright'; import { loginViaAPI, navigateTo, assertNotBroken, assertNoDebugText } from '../helpers'; import { TEST_USERS, ROUTES } from '../design-tokens'; test.describe('FONCTIONNEL — Pages Admin', () => { test.beforeEach(async ({ page }) => { await loginViaAPI(page, TEST_USERS.admin.email, TEST_USERS.admin.password); }); for (const route of ROUTES.admin) { test(`${route.name} (${route.path}) — se charge sans crash`, async ({ page }) => { await navigateTo(page, route.path); await assertNotBroken(page); await assertNoDebugText(page); const main = page.locator('main, [role="main"]').first(); await expect(main).toBeVisible({ timeout: 15_000 }); }); } });