fix(school): send the school page its admissions policy, and read it exactly
The header's Selective flag read school_info.admissions_policy, which the detail endpoint never sent, so no school page could flag Selective while its search row did (staging E2E: The Grammar School at Leeds). The detail payload now carries it, and a contract test checks it carries every field the header's flags read. Sending it would have switched on two older copies of the tag logic #176 fixed in the rows. The Admissions section and the cut-off note both tested includes('selective'), so every non-selective secondary would have read "entry is by selective examination". The section also counted "None" as a faith: Burntwood reads "a faith-based admissions priority (None)" today. All of them now share isSelective() and hasReligiousCharacter(), which also treats "Not applicable" as no faith, as the place table already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
392ec29fdb
commit
ef4a2ccccb
9 files changed
+144
-13
No files matched your search
@@ -157,6 +157,13 @@ describe('compareToCutoff', () => {
|
||||
});
|
||||
|
||||
describe('describeCutoffAbsence', () => {
|
||||
it('does not read "Non-selective" as selective', () => {
|
||||
// A substring test matched "selective" inside "Non-selective".
|
||||
const s = describeCutoffAbsence({ localAuthority: 'Wandsworth', admissionsPolicy: 'Non-selective' });
|
||||
expect(s).not.toMatch(/entrance test/);
|
||||
expect(s).toMatch(/^Wandsworth has not published/);
|
||||
});
|
||||
|
||||
it('explains a selective school by how it admits, not as missing data', () => {
|
||||
const s = describeCutoffAbsence({ localAuthority: 'Kent', admissionsPolicy: 'Selective' });
|
||||
expect(s).toContain('entrance test');
|
||||
|
||||
Reference in new issue
Block a user