feat(inflexion): la curva que se dobla en el punto, sin fork

This commit is contained in:
erikgh committed 2026-07-31 12:15:51 -06:00
1 parent aa6b348674
commit 2296fa4868
2 files changed
+45 -50

No files matched your search

@@ -5,16 +5,33 @@ import { IlustracionInflexion } from '../IlustracionInflexion';
describe('<IlustracionInflexion />', () => {
it('is decorative: hidden from assistive tech', () => {
const { container } = render(<IlustracionInflexion />);
expect(container.querySelector('svg')).toHaveAttribute('aria-hidden', 'true');
const svg = container.querySelector('svg');
expect(svg).toHaveAttribute('aria-hidden', 'true');
expect(svg).toHaveAttribute('focusable', 'false');
});
it('draws the growth line, the drift-away line and the strategy line', () => {
it('shares the unified canvas with the other scene illustrations', () => {
const { container } = render(<IlustracionInflexion />);
expect(container.querySelectorAll('path')).toHaveLength(3);
expect(container.querySelector('svg')).toHaveAttribute('viewBox', '0 0 220 120');
});
it('is a single bend at the inflection point, not a fork', () => {
const { container } = render(<IlustracionInflexion />);
// The previous version drew three diverging paths (growth / drift /
// strategy) — the same fork as ParaQuien. The rework is one continuous
// line that bends at the point: two segments, pre- and post-inflection.
expect(container.querySelectorAll('path')).toHaveLength(2);
});
it('marks the inflection point itself', () => {
const { container } = render(<IlustracionInflexion />);
expect(container.querySelectorAll('circle').length).toBeGreaterThanOrEqual(1);
});
it('bends from the present (azul) into clarity (dorado)', () => {
const { container } = render(<IlustracionInflexion />);
const clases = Array.from(container.querySelectorAll('path')).map((p) => p.getAttribute('class') ?? '');
expect(clases.some((c) => c.includes('text-azul-profundo'))).toBe(true);
expect(clases.some((c) => c.includes('text-dorado'))).toBe(true);
});
});