diff --git a/services/platform/app/components/user-button.test.tsx b/services/platform/app/components/user-button.test.tsx index 0e59f28af..38a07cfb5 100644 --- a/services/platform/app/components/user-button.test.tsx +++ b/services/platform/app/components/user-button.test.tsx @@ -16,6 +16,7 @@ vi.mock('@/lib/i18n/client', () => ({ const translations: Record = { // auth.userButton.* 'userButton.defaultName': 'User', + 'userButton.helpLearning': 'Help & learning center', 'userButton.helpFeedback': 'Help & feedback', 'userButton.logOut': 'Log out', 'userButton.manageAccount': 'Manage account', @@ -344,7 +345,11 @@ describe('UserButton', () => { within(menu).getByRole('menuitem', { name: 'Language' }), ).toBeInTheDocument(); - // Session items: asserted present, never activated. + // Session items: asserted present, never activated. The in-app learning + // center sits alongside the external feedback link. + expect( + within(menu).getByRole('menuitem', { name: 'Help & learning center' }), + ).toBeInTheDocument(); expect( within(menu).getByRole('menuitem', { name: 'Help & feedback' }), ).toBeInTheDocument(); diff --git a/services/platform/app/components/user-button.tsx b/services/platform/app/components/user-button.tsx index f34f63449..c8f7e958e 100644 --- a/services/platform/app/components/user-button.tsx +++ b/services/platform/app/components/user-button.tsx @@ -14,6 +14,7 @@ import { Link, useNavigate, useParams } from '@tanstack/react-router'; import { LogOut, HelpCircle, + GraduationCap, Monitor, Sun, Moon, @@ -550,6 +551,15 @@ export function UserButton({ }); } helpGroup.push( + { + type: 'item', + label: t('userButton.helpLearning'), + icon: GraduationCap, + onClick: () => { + void navigate({ to: '/dashboard/help' }); + }, + className: 'py-2.5', + }, { type: 'item', label: t('userButton.helpFeedback'), diff --git a/services/platform/app/features/help/components/lesson-video.test.tsx b/services/platform/app/features/help/components/lesson-video.test.tsx new file mode 100644 index 000000000..6eb4c10a3 --- /dev/null +++ b/services/platform/app/features/help/components/lesson-video.test.tsx @@ -0,0 +1,42 @@ +import { describe, expect, it } from 'vitest'; + +import { checkAccessibility } from '@/tests/utils/a11y'; +import { render, screen } from '@/tests/utils/render'; + +import { LessonVideo } from './lesson-video'; + +describe('LessonVideo', () => { + it('renders a "coming soon" placeholder when no video is configured', () => { + render(); + // The placeholder copy comes from the real `help.video.unavailable` string. + expect(screen.getByRole('note')).toBeInTheDocument(); + expect(screen.queryByText(/coming soon/i)).toBeInTheDocument(); + // No