feat(ui): redesign landing page search and empty states
All checks were successful
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 42s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 1m12s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s

- Hide empty state placeholder on initial load

- Add prominent hero mode to FilterBar when no search is active

- Fix SchoolCard test TypeScript and assertion errors
This commit is contained in:
Tudor
2026-03-05 13:00:34 +00:00
parent 2b808959c5
commit d4abb56c22
4 changed files with 38 additions and 24 deletions

View File

@@ -2,11 +2,12 @@
* SchoolCard Component Tests
*/
import '@testing-library/jest-dom';
import { render, screen, fireEvent } from '@testing-library/react';
import { SchoolCard } from '@/components/SchoolCard';
import type { School } from '@/lib/types';
const mockSchool: School = {
const mockSchool = {
urn: 100001,
school_name: 'Test Primary School',
local_authority: 'Westminster',
@@ -16,9 +17,8 @@ const mockSchool: School = {
latitude: 51.5074,
longitude: -0.1278,
rwm_expected_pct: 75.5,
rwm_higher_pct: 25.3,
prev_rwm_expected_pct: 70.0,
};
} as School;
describe('SchoolCard', () => {
it('renders school information correctly', () => {
@@ -58,6 +58,6 @@ describe('SchoolCard', () => {
render(<SchoolCard school={mockSchool} />);
// Should show upward trend (75.5 > 70.0)
expect(screen.getByText('')).toBeInTheDocument();
expect(screen.getByTitle('Previous year: 70.0%')).toBeInTheDocument();
});
});