25 lines
1022 B
TypeScript
25 lines
1022 B
TypeScript
import { render, screen } from '@testing-library/react';
|
|
import { describe, it, expect } from 'vitest';
|
|
import { Hero } from '../Hero';
|
|
|
|
describe('<Hero />', () => {
|
|
it('renders the eyebrow', () => {
|
|
render(<Hero variant="editorial" />);
|
|
expect(screen.getByText(/tu estratega de crecimiento/i)).toBeInTheDocument();
|
|
});
|
|
it('renders the headline copy', () => {
|
|
render(<Hero variant="hormozi" />);
|
|
expect(screen.getByText(/Tu negocio/i)).toBeInTheDocument();
|
|
expect(screen.getByText(/más esfuerzo/i)).toBeInTheDocument();
|
|
expect(screen.getByText(/más claridad/i)).toBeInTheDocument();
|
|
});
|
|
it('renders the CTA', () => {
|
|
render(<Hero variant="editorial" />);
|
|
expect(screen.getByRole('link', { name: /define tu siguiente movimiento/i })).toBeInTheDocument();
|
|
});
|
|
it('does NOT render scarcity (cupos/cohorte)', () => {
|
|
const { container } = render(<Hero variant="editorial" />);
|
|
expect(container.textContent).not.toMatch(/cupos|cohorte|generación fundadora/i);
|
|
});
|
|
});
|