diff --git a/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.test.tsx b/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.test.tsx index 93992d371d..23ae09a99b 100644 --- a/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.test.tsx +++ b/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.test.tsx @@ -56,12 +56,13 @@ describe('MyGroupsSidebarItem Test', () => { , { mountedRoutes: { - '/': entityRouteRef, + '/catalog/:namespace/:kind/:name': entityRouteRef, }, }, ); - - expect(rendered.container).toBeEmptyDOMElement(); + expect( + rendered.getByText('Mounted at /catalog/:namespace/:kind/:name'), + ).toBeInTheDocument(); }); }); diff --git a/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.tsx b/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.tsx index bea58c766c..eb81cc0c27 100644 --- a/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.tsx +++ b/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.tsx @@ -62,7 +62,7 @@ export const MyGroupsSidebarItem = ({ // Not a member of any groups if (!groups?.length) { - return <>; + return null; } // Only member of one group