19 lines
736 B
TypeScript
19 lines
736 B
TypeScript
import { render, screen } from '@testing-library/react';
|
|
import { describe, it, expect } from 'vitest';
|
|
import { ComoEmpezar } from '../ComoEmpezar';
|
|
|
|
describe('<ComoEmpezar />', () => {
|
|
it('renders the on-ramp steps', () => {
|
|
render(<ComoEmpezar />);
|
|
expect(screen.getByText('Escríbeme')).toBeInTheDocument();
|
|
expect(screen.getByText('Sesión de diagnóstico')).toBeInTheDocument();
|
|
});
|
|
it('links the CTA to WhatsApp with a prefilled message', () => {
|
|
render(<ComoEmpezar />);
|
|
const cta = screen.getByRole('link', { name: /Agenda tu sesión de diagnóstico/i });
|
|
const href = cta.getAttribute('href') ?? '';
|
|
expect(href).toMatch(/^https:\/\/wa\.me\//);
|
|
expect(href).toContain('text=');
|
|
});
|
|
});
|