import { render, screen } from '@testing-library/react';
import Home from './page';

describe('Home page', () => {
  it('renders the TOWER heading', () => {
    render(<Home />);
    expect(screen.getByRole('heading', { name: /insignia tower/i })).toBeInTheDocument();
  });

  it('renders a link to the search page', () => {
    render(<Home />);
    expect(screen.getByRole('link', { name: /search/i })).toHaveAttribute('href', '/search');
  });

  it('renders a link to the groups page', () => {
    render(<Home />);
    expect(screen.getByRole('link', { name: /groups/i })).toHaveAttribute('href', '/groups');
  });
});
