fix(search): no "Not yet inspected" without Ofsted's word; ISI badge (H4)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
69da9d84db
commit
ab25d83b9d
9 files changed
+92
-38
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { gradeSourceLine, latestVisitLine, showLatestVisitLine } from '@/lib/ofstedStatus';
|
||||
import { gradeSourceLine, hasReportCard, latestVisitLine, showLatestVisitLine } from '@/lib/ofstedStatus';
|
||||
import type { OfstedInspection } from '@/lib/types';
|
||||
|
||||
const base = { report_card: {} } as unknown as OfstedInspection;
|
||||
@@ -45,3 +45,12 @@ describe('showLatestVisitLine', () => {
|
||||
latest_visit: { date: '2025-06-17', kind: 'graded', outcome: null } })).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
it('names a short inspection as Ofsted does', () => {
|
||||
expect(latestVisitLine({ date: '2023-02-01', kind: 'short', outcome: null })).toBe('Short inspection, 1 February 2023');
|
||||
});
|
||||
|
||||
it('treats a report card with only a safeguarding result as a report card (FE)', () => {
|
||||
expect(hasReportCard({ rc_inspection_date: '2026-05-12', report_card: {} })).toBe(true);
|
||||
expect(hasReportCard({ rc_inspection_date: null, report_card: {} })).toBe(false);
|
||||
});
|
||||
Reference in new issue
Block a user