import { render } from '@testing-library/react';
import React from 'react';
import { describe, expect, it } from 'vitest';
import { LandingPageHeader } from './LandingPageHeader';

describe('LandingPageHeader', () => {
  it('renders the component without crashing', () => {
    const { container } = render(
      <LandingPageHeader title="test-title" subtitle="test-title" />,
    );

    expect(container).toBeTruthy();
  });

  it('renders a title and subtitle', () => {
    const mockTitle = 'test-title';
    const mockSubtitle = 'test-subtitle';
    const { container } = render(
      <LandingPageHeader title={mockTitle} subtitle={mockSubtitle} />,
    );

    const title = container.querySelector('.title');
    const subtitle = container.querySelector('.subtitle');

    expect(title?.textContent).toBe(mockTitle);
    expect(subtitle?.textContent).toBe(mockSubtitle);
  });
});
