Files
lcbp3/frontend/components/layout/__tests__/header.test.tsx
T
admin 7e8f4859cd
CI / CD Pipeline / build (push) Failing after 6m24s
CI / CD Pipeline / deploy (push) Has been skipped
feat(ai): add ADR-036 unified OCR architecture and frontend test coverage
- Add ADR-036 unified OCR architecture (typhoon-ocr via Ollama)
- Extend AI execution profiles for OCR sandbox configuration
- Add comprehensive frontend test coverage (components, hooks, services)
- Add backend test coverage for document-numbering services
- Update OCR sidecar with typhoon-ocr integration
- Add AI policy service and execution profile management
- Update AGENTS.md and architecture documentation
2026-06-14 06:34:07 +07:00

28 lines
1.5 KiB
TypeScript

// File: frontend/components/layout/__tests__/header.test.tsx
// Change Log
// - 2026-06-13: Add coverage for Header composition.
import { render, screen } from '@testing-library/react';
import { describe, expect, it, vi } from 'vitest';
import { Header } from '../header';
vi.mock('../user-menu', () => ({ UserMenu: () => <div>User menu</div> }));
vi.mock('../global-search', () => ({ GlobalSearch: () => <label>Search<input aria-label="Search" /></label> }));
vi.mock('../notifications-dropdown', () => ({ NotificationsDropdown: () => <button>Notifications</button> }));
vi.mock('../sidebar', () => ({ MobileSidebar: () => <button>Mobile sidebar</button> }));
vi.mock('../theme-toggle', () => ({ ThemeToggle: () => <button>Theme</button> }));
vi.mock('../project-switcher', () => ({ ProjectSwitcher: () => <button>Project</button> }));
describe('Header', () => {
it('renders application title and composed controls', () => {
render(<Header />);
expect(screen.getByText('LCBP3-DMS')).toBeInTheDocument();
expect(screen.getByLabelText('Search')).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Mobile sidebar' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Project' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Theme' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Notifications' })).toBeInTheDocument();
expect(screen.getByText('User menu')).toBeInTheDocument();
});
});