mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 11:46:35 +00:00
assertReadable takes a selector list and measures contrast on whatever it finds. An entry marked optional is skipped when it matches nothing, so a list whose entries are all optional can measure nothing at all - and then the call asserts nothing while reporting green. Reject such a list before the browser is touched. A plain string normalises to a required entry, so only a deliberately all-optional list is refused, and an empty list with it. web-app-matomo found the defect the hard way in CI run 38818071194. Its KPI card check listed four optional selectors, all of them trend modifiers that the dashboard only renders at a non-zero change; every card read 0%, so KPICard emitted kpiTrendNeutral and SitesTableSite left its evolution cell unclassed, nothing matched, and the test failed on the minimum-measured guard rather than on contrast. The sibling evolution-badge check has the same all-optional shape and was green only by luck. Give every all-optional call site an anchor that is already proven visible in its own spec: .kpiCardEvolutionTrend and .evolutionBadge for matomo, header.header for web-app-dashboard (waitForDashboardReady asserts it unconditionally) and #login .panel-body for web-app-espocrm. The espocrm case needs care: #btn-login and #sign-in each exist in only one branch of the sso conditional, so neither is variant-safe, while assertLightAndDark measures .panel-body on the line above. The matomo theme rule is part of the fix, not a cosmetic extra. Without it the new anchor keeps Matomo's hardcoded #76838f, which measures 3.60 against --design-surface-1 and 3.82 against --design-surface-2 in light mode and would fail the 4.5 threshold the anchor now enforces. The role already replaces Matomo's hardcoded trend colours; this closes the same gap for the neutral caption. Equal-specificity rules resolve by order and the role's block is concatenated about 204 KB after Matomo's in the single served bundle, measured by byte offset in the failing run's own trace. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 lines
0 B
Python
0 lines
0 B
Python
The file is empty.