feat(grafico): SecuenciaClaridad — la metáfora del manual, dibujada

This commit is contained in:
erikgh committed 2026-07-31 11:04:21 -06:00
1 parent 1b1b39c67f
commit 6783e32324
2 files changed
+167

No files matched your search

@@ -0,0 +1,33 @@
import { render } from '@testing-library/react';
import { describe, it, expect } from 'vitest';
import { SecuenciaClaridad } from '../SecuenciaClaridad';
describe('<SecuenciaClaridad />', () => {
it('is decorative: hidden from assistive tech', () => {
const { container } = render(<SecuenciaClaridad />);
const svg = container.querySelector('svg');
expect(svg).toHaveAttribute('aria-hidden', 'true');
expect(svg).toHaveAttribute('focusable', 'false');
});
it('draws the tangle of lines that stands for complexity', () => {
const { container } = render(<SecuenciaClaridad />);
expect(container.querySelectorAll('line').length).toBeGreaterThanOrEqual(18);
});
it('resolves into the mark itself, not a lookalike', () => {
const { container } = render(<SecuenciaClaridad variant="completa" />);
const resolucion = container.querySelectorAll('[data-resolucion]');
expect(resolucion).toHaveLength(3);
});
it('leaves the tension unresolved in the hero variant', () => {
const { container } = render(<SecuenciaClaridad variant="hero" />);
expect(container.querySelectorAll('[data-resolucion]')).toHaveLength(0);
});
it('shares the viewBox with the symbol so both scale alike', () => {
const { container } = render(<SecuenciaClaridad />);
expect(container.querySelector('svg')).toHaveAttribute('viewBox', '0 0 64 64');
});
});