Add and enhance tests for mobile navigation, demo modal, and forbidden page metadata

- Added new test cases for mobile navigation links and buttons in `Header` component.
- Enhanced `Home` tests to verify demo modal behavior (open/close functionality).
- Added metadata validation test for the forbidden page.
- Introduced comprehensive test suite for the DemoTour page, covering structure, navigation, categories, accessibility, and CTAs.
This commit is contained in:
2025-11-16 19:38:46 +01:00
parent 14e5839476
commit c9f4772196
5 changed files with 377 additions and 4 deletions

View File

@@ -4,9 +4,15 @@
*/
import { render, screen } from '@testing-library/react';
import ForbiddenPage from '@/app/forbidden/page';
import ForbiddenPage, { metadata } from '@/app/forbidden/page';
describe('ForbiddenPage', () => {
it('has correct metadata', () => {
expect(metadata).toBeDefined();
expect(metadata.title).toBe('403 - Forbidden');
expect(metadata.description).toBe('You do not have permission to access this resource');
});
it('renders page heading', () => {
render(<ForbiddenPage />);