"""Every admin page links to every other admin page. Two pages had drifted in opposite directions -- providers.html was missing Proficiency and proficiency.html was missing Providers -- so you could not navigate between them in either direction without editing the URL. Neither gap was noticeable from the page you were on, which is why a test is worth more here than care. The page list is derived from the routes the router actually serves, so a new admin page fails this until it is linked from the others, rather than quietly launching unreachable. """ from __future__ import annotations import re from pathlib import Path import pytest FRONTEND = Path(__file__).resolve().parent.parent / "admin" / "frontend" # href -> file that serves it. Kept explicit rather than globbed so that # adding a page is a deliberate two-line edit here, not an accident. PAGES = { "/admin/": "index.html", "/admin/models": "models.html", "/admin/profiles": "profiles.html", "/admin/proficiency": "proficiency.html", "/admin/decisions": "decisions.html", "/admin/quota": "quota.html", "/admin/controls": "controls.html", "/admin/providers": "providers.html", } NAV_RE = re.compile(r'