test(stammbaum): assert r=6 marriage dot fill is var(--c-primary) (#361)

Cycle-2 follow-up from Sara. The radius assertion proves the geometry
side of the WCAG 1.4.11 contract; the fill-token assertion proves the
colour side. Together they catch an accidental "neutralise the dot"
diff (e.g. swap to var(--c-ink-3) or a literal light token) before the
permanent axe-core gate ships in #692.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-28 20:56:15 +02:00
parent 89bb0b5d65
commit e7931335ce

View File

@@ -342,6 +342,13 @@ describe('StammbaumTree viewBox', () => {
const dot = document.querySelector('svg circle');
expect(dot).not.toBeNull();
expect(dot!.getAttribute('r')).toBe('6');
// Cycle-2 follow-up from Sara: codify the colour-token side of the
// WCAG 1.4.11 contrast contract at the unit level. The permanent axe-
// core gate lives in #692; this assertion prevents an accidental
// "neutralise the dot" diff (e.g. swap to var(--c-ink-3) or a literal
// light token) from stripping the 3:1 contrast guarantee before #692
// ships.
expect(dot!.getAttribute('fill')).toBe('var(--c-primary)');
});
it('centers two spouse nodes within the minimum viewBox', async () => {