diff --git a/src/components/ProjectSidebar.test.tsx b/src/components/ProjectSidebar.test.tsx
index be2ff20f..f3aaf27c 100644
--- a/src/components/ProjectSidebar.test.tsx
+++ b/src/components/ProjectSidebar.test.tsx
@@ -19,12 +19,12 @@ vi.mock('@tanstack/react-query', () => ({
})
}));
-// Mock the LoginArea component
-vi.mock('@/components/auth/LoginArea', () => ({
- LoginArea: ({ className }: { className?: string }) => (
-
Login Area
- )
-}));
+// Mock window.open for help button test
+const mockWindowOpen = vi.fn();
+Object.defineProperty(window, 'open', {
+ value: mockWindowOpen,
+ writable: true
+});
const mockUseProjects = vi.mocked(useProjects);
const mockUseLocalStorage = vi.mocked(useLocalStorage);
@@ -81,7 +81,7 @@ describe('ProjectSidebar', () => {
expect(screen.queryByLabelText('Collapse sidebar')).not.toBeInTheDocument();
});
- it('renders login area at the bottom', () => {
+ it('renders settings and help buttons at the bottom', () => {
render(
{
/>
);
- expect(screen.getByTestId('login-area')).toBeInTheDocument();
+ expect(screen.getByText('Settings')).toBeInTheDocument();
+ expect(screen.getByLabelText('Help')).toBeInTheDocument();
});
it('shows new project button', () => {
@@ -102,4 +103,21 @@ describe('ProjectSidebar', () => {
expect(screen.getByText('New Project')).toBeInTheDocument();
});
+
+ it('opens help documentation when help button is clicked', () => {
+ render(
+
+ );
+
+ const helpButton = screen.getByLabelText('Help');
+ fireEvent.click(helpButton);
+
+ expect(mockWindowOpen).toHaveBeenCalledWith(
+ 'https://soapbox.pub/shakespeare-resources/',
+ '_blank'
+ );
+ });
});
\ No newline at end of file
diff --git a/src/components/ProjectSidebar.tsx b/src/components/ProjectSidebar.tsx
index 2c3a1635..2136eb08 100644
--- a/src/components/ProjectSidebar.tsx
+++ b/src/components/ProjectSidebar.tsx
@@ -1,10 +1,9 @@
import React, { useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
-import { Plus, Folder, GitBranch, Loader2, ChevronDown, Star, Columns2, X } from 'lucide-react';
+import { Plus, Folder, GitBranch, Loader2, ChevronDown, Star, Columns2, X, Settings, HelpCircle } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { Skeleton } from '@/components/ui/skeleton';
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from '@/components/ui/dropdown-menu';
-import { LoginArea } from '@/components/auth/LoginArea';
import { useProjects } from '@/hooks/useProjects';
import { useProjectSessionStatus } from '@/hooks/useProjectSessionStatus';
import { useLocalStorage } from '@/hooks/useLocalStorage';
@@ -224,9 +223,28 @@ export function ProjectSidebar({
- {/* Account Selector at Bottom */}
-
-
+ {/* Settings and Help at Bottom */}
+
+
+
+
+
);