mirror of
https://github.com/affaan-m/ECC.git
synced 2026-11-11 18:46:05 +00:00
CodeRabbit correctly noted that hard-coding #2ea043 and #ff7b72 in the test decoupled the contrast assertions from the colors the view actually renders, so a palette change could leave them passing. The test now reads the legend glyphs, the legend colors, the riskColor() returns, and the body background back out of the rendered HTML, and asserts that the legend and canvas palettes agree before checking any ratio. Verified both directions: a mismatched canvas color fails the palette check, and a full revert to #3fb950 fails the luminance check at 1.01:1. Extends the coverage to the traffic level and the body background, which were previously unchecked. Co-Authored-By: CommandCodeBot <noreply@commandcode.ai>