diff --git a/frontend/src/components/navigation/MoreDrawer.test.tsx b/frontend/src/components/navigation/MoreDrawer.test.tsx index 95048ef7..34752591 100644 --- a/frontend/src/components/navigation/MoreDrawer.test.tsx +++ b/frontend/src/components/navigation/MoreDrawer.test.tsx @@ -346,7 +346,7 @@ describe('MoreDrawer', () => { expect(screen.queryByText('Session s1')).not.toBeInTheDocument() }) - it('navigates to the activity item and closes the drawer when a row is clicked', () => { + it('navigates to the activity item without a close that would replace the new route', () => { const navigateMock = vi.fn() vi.mocked(useNavigate).mockReturnValue(navigateMock) mockAuth() @@ -358,6 +358,6 @@ describe('MoreDrawer', () => { fireEvent.click(screen.getByRole('button', { name: /Session s1/ })) expect(navigateMock).toHaveBeenCalledWith('/repos/1/sessions/s1') - expect(handleClose).toHaveBeenCalled() + expect(handleClose).not.toHaveBeenCalled() }) }) diff --git a/frontend/src/components/navigation/MoreDrawer.tsx b/frontend/src/components/navigation/MoreDrawer.tsx index 690aef2b..fd82c588 100644 --- a/frontend/src/components/navigation/MoreDrawer.tsx +++ b/frontend/src/components/navigation/MoreDrawer.tsx @@ -185,12 +185,7 @@ export function MoreDrawer({ isOpen, onClose }: MoreDrawerProps) { {isOpen && ( - { - navigate(path) - onClose() - }} - /> + navigate(path)} /> )} {isSessionDetail && (