/* global describe, it, expect, vi */ import React from 'react'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { axe } from 'jest-axe'; import { NavigationMenu } from './NavigationMenu'; import type { NavSection } from './types'; // ── Mock icon ───────────────────────────────────────────────────────────────── // Avoids importing real DS icon SVGs — keeps tests free of styled-system deps. const MockIcon = () => React.createElement('svg', { 'data-testid': 'section-icon' }); // ── Fixtures ────────────────────────────────────────────────────────────────── // Mirrors the mock data in NavigationMenu.stories.tsx const MOCK_SECTIONS: NavSection[] = [ { value: 'dashboard', title: 'Dashboard', icon: React.createElement(MockIcon), items: [ { label: 'Quick Start', href: '/dashboard/quick-start' }, { label: 'Resume Session', href: '/dashboard/resume-session' }, { label: 'Progress', href: '/dashboard/progress' }, ], }, { value: 'scenarios', title: 'Scenarios', icon: React.createElement(MockIcon), items: [ { label: 'MyQueue', href: '/scenarios/my-queue' }, { label: 'Conversation Studio', href: '/scenarios/conversation-studio' }, ], }, { value: 'help', title: 'Help', icon: React.createElement(MockIcon), items: [ { label: 'How it Works', href: '/help/how-it-works' }, { label: 'Contact Support', href: '/help/contact-support' }, ], }, ]; // ── Tests ───────────────────────────────────────────────────────────────────── describe('NavigationMenu', () => { // ── Rendering ─────────────────────────────────────────────────────────────── describe('Rendering', () => { it('renders a