import React from 'react';
import { MemoryRouter } from 'react-router-dom';
import { render, screen } from '@testing-library/react';
import Footer from './Footer';

jest.mock('../../ui-kit/components/MDTypography', () => ({
  __esModule: true,
  default: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,
}));

describe('Footer', () => {
  it('renders copyright, developer credit, and Terms link', () => {
    render(
      <MemoryRouter>
        <Footer />
      </MemoryRouter>,
    );

    expect(screen.getByText(/© 2026 Hesychia/i)).toBeInTheDocument();
    expect(screen.getByRole('link', { name: /AI ML Operations, LLC/i })).toHaveAttribute(
      'href',
      'https://www.aimloperations.com',
    );
    expect(screen.getByRole('link', { name: /Terms of Service/i })).toHaveAttribute(
      'href',
      '/terms_of_service/',
    );
  });
});
