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
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// 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();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user