feat(search): print the school page's type and flags in search rows
Both rows now take their type label and tags from lib/schoolFacts, so a parent reads the same words in the list and on the page: "State school" instead of "Academy converter", "Girls' school" instead of "Girls", the religious character instead of "Faith priority", and a Nursery class flag on primaries. Who-can-apply tags are outlined with an inset ring, which keeps them the size of their neighbours; the Selective tag no longer borrows the status colour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ca47d08186
commit
ad9d3b67f7
6 files changed
+88
-42
No files matched your search
@@ -34,3 +34,21 @@ describe('SchoolRow religious character', () => {
|
||||
expect(screen.getByText('Church of England')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
describe('SchoolRow shares the school page flags', () => {
|
||||
it("prints the type in the search filter's terms", () => {
|
||||
render(<SchoolRow school={{ ...base, type_group: 'state' }} />);
|
||||
expect(screen.getByText('State school')).toBeInTheDocument();
|
||||
expect(screen.queryByText('Free schools')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('flags a nursery class', () => {
|
||||
render(<SchoolRow school={{ ...base, nursery_provision: 'Has Nursery Classes' }} />);
|
||||
expect(screen.getByText('Nursery class')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("flags a boys' school", () => {
|
||||
render(<SchoolRow school={{ ...base, gender: 'Boys' }} />);
|
||||
expect(screen.getByText("Boys' school")).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user