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

describe('AccountDeletionPage', () => {
  it('renders Hesychia deletion steps and retention copy without auth', () => {
    render(
      <MemoryRouter>
        <AccountDeletionPage />
      </MemoryRouter>,
    );

    expect(
      screen.getByRole('heading', { name: /Hesychia — Request account deletion/i }),
    ).toBeInTheDocument();
    expect(screen.getByText(/ai\.hesychia\.chat/i)).toBeInTheDocument();
    expect(
      screen.getByRole('heading', { name: /How to delete your account/i }),
    ).toBeInTheDocument();
    expect(screen.getByText(/Delete my account/i)).toBeInTheDocument();
    expect(
      screen.getByRole('heading', { name: /Deactivated immediately/i }),
    ).toBeInTheDocument();
    expect(
      screen.getByRole('heading', { name: /Data retained after soft-delete/i }),
    ).toBeInTheDocument();
    expect(screen.getByRole('heading', { name: /Retention period/i })).toBeInTheDocument();
    expect(screen.getByText(/no automatic hard-purge schedule/i)).toBeInTheDocument();
    expect(
      screen.getByRole('heading', { name: /Cannot access your account/i }),
    ).toBeInTheDocument();
    expect(screen.getByText(/30 days/i)).toBeInTheDocument();
  });
});
