diff --git a/app/page.tsx b/app/page.tsx index c4e0510..0084139 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,6 +1,7 @@ import { Hero } from '@/components/sections/Hero'; import { FraseAncla } from '@/components/sections/FraseAncla'; import { ParaQuien } from '@/components/sections/ParaQuien'; +import { Mecanismo } from '@/components/sections/Mecanismo'; export default function Home() { return ( @@ -8,6 +9,7 @@ export default function Home() { + ); } diff --git a/components/sections/Mecanismo.tsx b/components/sections/Mecanismo.tsx new file mode 100644 index 0000000..16723be --- /dev/null +++ b/components/sections/Mecanismo.tsx @@ -0,0 +1,29 @@ +'use client'; + +import { motion } from 'framer-motion'; +import { Container } from '@/components/primitives/Container'; +import { mecanismo } from '@/lib/content'; +import { fadeInUp, staggerContainer, viewportOnce } from '@/lib/motion'; + +export function Mecanismo() { + return ( +
+ + {mecanismo.eyebrow} + {mecanismo.title} + + {mecanismo.steps.map((step) => ( + +
{step.n}
+

{step.name}

+

{step.desc}

+
+ ))} +
+
+
+ ); +} diff --git a/components/sections/__tests__/Mecanismo.test.tsx b/components/sections/__tests__/Mecanismo.test.tsx new file mode 100644 index 0000000..d6123c0 --- /dev/null +++ b/components/sections/__tests__/Mecanismo.test.tsx @@ -0,0 +1,16 @@ +import { render, screen } from '@testing-library/react'; +import { describe, it, expect } from 'vitest'; +import { Mecanismo } from '../Mecanismo'; + +describe('', () => { + it('renders the 3 steps in order', () => { + render(); + expect(screen.getByText('Inmersión')).toBeInTheDocument(); + expect(screen.getByText('Desafiar supuestos')).toBeInTheDocument(); + expect(screen.getByText('Estrategia ejecutable')).toBeInTheDocument(); + }); + it('renders step numbers 01/02/03', () => { + const { container } = render(); + expect(container.textContent).toMatch(/01.+02.+03/); + }); +});