- templates/detect_frontend.py: finds plain HTML, React/Vue/Angular/Svelte apps and PyQt web views; prints location, stack, main colours, font and every token block (CSS custom properties, <style> tags, Tailwind config). - templates/frontend.md: shared report / keep / restyle procedure, written so rpa-dashboard-ai can point to it. - SKILL.md steps 1, 2 and 6 point to it. - tests: detection self-check; fixture c-web-existing-frontend; eval entries c-keep and c-restyle (new pages only, per-question grading, checks on what changed in the existing files), both passing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.5 KiB
Tests
Run everything from the repo root:
uv run --with pytest --with playwright pytest tests
-
test_*.py: assert-based self-checks for template logic (lint of unfilled Python templates, the custom palette, presets in step with the template). -
page_check/: Seam 1. Loads a dashboard page in headless Chromium with no backend, pushes contract envelopes throughwindow.__pyMsg, and asserts on what is visible. Every case runs in light, dark and narrow (800px) mode.- By default it checks the no-AI template, filled with test values. To check a
generated page instead, set
PAGE_CHECK_HTML=path/to/dashboard.html. - The page sees a fake Qt bridge. Every action the page sends is recorded in
window.__callsas[slot, ...args]. - To add a case, write a
test_*.pyfile inpage_check/that uses thepageandpush(event, data)fixtures fromconftest.py.
- By default it checks the no-AI template, filled with test values. To check a
generated page instead, set
-
evals/: Seam 2. Runs the skills on a fixture project withclaude -p, then grades the reply and runs the page check on the page it built:uv run --with pytest --with playwright python tests/evals/run_eval.py a-emptyResults go to
evals/results/<fixture>.json. To add a fixture, add an entry toFIXTURESinrun_eval.py. An entry with a"fixture"key reuses another fixture folder with different answers:c-keepandc-restyleboth run onc-web-existing-frontend, and also check what changed in the files it already had. -
fixtures/<letter>-<name>/: small test projects for the evals.