Testing¶
Three suites, 88 checks.
make check # library: 32 tests + TOKENS.md freshness
cd poc && make check # lint, situ, 25 unit tests, 31 browser tests, calibration
Library tests (tests/)¶
The linter's own rules, the token generator, and the situ bridge. Fast, no browser. Notable:
test_the_menu_lists_every_class_the_stylesheet_definesTOKENS.mdis generated from the stylesheet, so it cannot drift — but a generator can still omit a category. This asserts the other direction. A menu with something missing is worse than no menu.test_every_aliased_token_exists- The situ bridge points
--ui-*at our tokens. A typo there fails silently — the custom property resolves to nothing and the widget renders unstyled — so the one thing worth checking is that every token it names is really declared. Its sibling holds the commented-out opt-in block to the same bar, because it is documentation people paste.
Application tests (poc/test_poc.py)¶
Routes render, components resolve, the i18n catalogues are complete.
Browser tests (poc/test_browser.py)¶
What a static gate structurally cannot see. Three times something passed every static check and
was wrong on screen: a sidebar hidden by a layout rule keyed on an attribute, three progress bars
with zero width because a percentage inside a col-auto collapses, and a row menu clipped by its
scroll container. Those are layout and overflow relationships, and they need a browser.
The sweep covers all 50 routes at 1440 / 390 / 320 px, in both themes, at 200% text, and with forced colours. See Accessibility for the full table.
Write the gate so it fails for the right reason
Two habits earn their keep. Implement the exceptions: the target-size check applies WCAG
2.5.8's label, pointer-events and spacing exemptions rather than skipping them, because a
check that flags correct things is one people learn to ignore. And assert the claim, not
the implementation: the folded-sidebar test presses Tab and looks for a focus ring rather
than asserting a class, so it keeps working when the implementation changes.
Calibration¶
Its own page. Run last, because it needs the demo server on :8080.
The notes¶
notes/ holds 22 numbered engineering notes — why a decision was taken, what was measured, what
was wrong first. They are not documentation and are not maintained as such, but when a rule here
looks arbitrary, the note usually explains it.