From c3eff6abdcedec85cc9c7e0bb8cc8069f59bc839 Mon Sep 17 00:00:00 2001 From: yyh <92089059+lyzno1@users.noreply.github.com> Date: Thu, 16 Apr 2026 13:36:20 +0800 Subject: [PATCH] fix(web): set app card dropdown menu to non-modal (#35302) --- web/app/components/apps/__tests__/app-card.spec.tsx | 9 ++++++++- web/app/components/apps/app-card.tsx | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/web/app/components/apps/__tests__/app-card.spec.tsx b/web/app/components/apps/__tests__/app-card.spec.tsx index 2d01dfb320..84f8b87fa7 100644 --- a/web/app/components/apps/__tests__/app-card.spec.tsx +++ b/web/app/components/apps/__tests__/app-card.spec.tsx @@ -208,14 +208,16 @@ vi.mock('@/app/components/base/ui/dropdown-menu', () => { DropdownMenu: ({ children, open = false, + modal, onOpenChange, }: { children: React.ReactNode open?: boolean + modal?: boolean onOpenChange?: (open: boolean) => void }) => ( -
+
{children}
@@ -461,6 +463,11 @@ describe('AppCard', () => { expect(screen.getByTestId('dropdown-menu')).toBeInTheDocument() }) + it('should render dropdown menu as non-modal', () => { + render() + expect(screen.getByTestId('dropdown-menu')).toHaveAttribute('data-modal', 'false') + }) + it('should show edit option when dropdown menu is opened', async () => { render() diff --git a/web/app/components/apps/app-card.tsx b/web/app/components/apps/app-card.tsx index fe3e67b577..ba85ce5178 100644 --- a/web/app/components/apps/app-card.tsx +++ b/web/app/components/apps/app-card.tsx @@ -514,7 +514,7 @@ const AppCard = ({ app, onlineUsers = [], onRefresh }: AppCardProps) => { )} >
- +