import { render, screen } from '@testing-library/react';
import { describe, it, expect } from 'vitest';
import { Hero } from '../Hero';
describe('', () => {
it('renders the eyebrow', () => {
render();
expect(screen.getByText(/tu estratega de crecimiento/i)).toBeInTheDocument();
});
it('renders the headline copy', () => {
const { container } = render();
expect(container.textContent).toMatch(/Tu negocio/i);
expect(container.textContent).toMatch(/más esfuerzo/i);
expect(container.textContent).toMatch(/más claridad/i);
});
it('renders the CTA', () => {
render();
expect(screen.getByRole('link', { name: /define tu siguiente movimiento/i })).toHaveAttribute('href', '#contacto');
});
it('offers a secondary route into the process for readers not ready to convert', () => {
render();
expect(screen.getByRole('link', { name: /ver cómo trabajo/i })).toHaveAttribute('href', '#mecanismo');
});
it('does NOT render scarcity (cupos/cohorte)', () => {
const { container } = render();
expect(container.textContent).not.toMatch(/cupos|cohorte|generación fundadora/i);
});
it('does not pre-empt the Dolores section with its own copy', () => {
const { container } = render();
// The hero used to rotate the same four quotes that Dolores renders in
// full further down. Duplicating them spent the emotional beat early and
// competed with the headline.
expect(container.textContent).not.toMatch(/Trabajo más y gano casi lo mismo/i);
});
it('carries the brand metaphor as its visual anchor', () => {
const { container } = render();
expect(container.querySelectorAll('svg').length).toBeGreaterThan(0);
});
});