import { render, screen } from '@testing-library/react'; import { InspectionNotice } from '@/components/school/InspectionNotice'; it('names ISI and links its reports for an ISI school (audit H4)', () => { render(); expect(screen.getByText('Inspected by the Independent Schools Inspectorate (ISI)')).toBeInTheDocument(); expect(screen.getByRole('link', { name: /ISI reports/ })).toHaveAttribute('href', 'https://www.isi.net/reports/'); }); it('says "Not yet inspected" for a school Ofsted lists without an inspection', () => { render(); expect(screen.getByText('Not yet inspected')).toBeInTheDocument(); expect(screen.getByRole('link', { name: /Ofsted reports/ })).toHaveAttribute( 'href', 'https://reports.ofsted.gov.uk/inspection-reports/find-inspection-report/provider/ELS/150031'); }); it('renders nothing without inspection data, including an unknown listing', () => { const { container } = render(); expect(container).toBeEmptyDOMElement(); });