Remove deprecated middleware and update component tests for branding and auth enhancements

- Deleted `middleware.disabled.ts` as it is no longer needed.
- Refactored `HeroSection` and `HomePage` tests to align with updated branding and messaging.
- Modified `DemoCredentialsModal` to support auto-filled demo credentials in login links.
- Mocked `ThemeToggle`, `LocaleSwitcher`, and `DemoCredentialsModal` in relevant tests.
- Updated admin tests to use `QueryClientProvider` and refactored API mocks for `AdminPage`.
- Replaced test assertions for stats section and badges with new branding content.
This commit is contained in:
Felipe Cardoso
2025-11-24 15:04:49 +01:00
parent acfe59c8b3
commit 13abd159fa
8 changed files with 131 additions and 112 deletions

View File

@@ -32,11 +32,15 @@ jest.mock('@/lib/api/hooks/useAuth', () => ({
useLogin: () => mockUseLogin(),
}));
// Mock router
// Mock router
jest.mock('next/navigation', () => ({
useRouter: () => ({
push: jest.fn(),
}),
useSearchParams: () => ({
get: jest.fn(),
}),
}));
// Mock auth store