test(frontend): improve test coverage and update edge case handling

- Refactor tests to handle empty `model_params` in AgentTypeForm.
- Add return type annotations (`: never`) for throwing functions in ErrorBoundary tests.
- Mock `useAuth` in home page tests for consistent auth state handling.
- Update Header test to validate updated `/dashboard` link.
This commit is contained in:
2026-01-03 01:19:35 +01:00
parent c72f6aa2f9
commit a79d923dc1
4 changed files with 18 additions and 9 deletions

View File

@@ -124,7 +124,7 @@ describe('Header', () => {
render(<Header />);
const homeLink = screen.getByRole('link', { name: /home/i });
expect(homeLink).toHaveAttribute('href', '/');
expect(homeLink).toHaveAttribute('href', '/dashboard');
});
it('renders admin link for superusers', () => {