From c530f3f546af7b779b0399969d848e1e9c8635e1 Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Mon, 28 Mar 2022 13:33:51 -0500 Subject: [PATCH] Minor corrections Signed-off-by: Andre Wanlin --- .../MyGroupsSidebarItem/MyGroupsSidebarItem.test.tsx | 7 ++++--- .../components/MyGroupsSidebarItem/MyGroupsSidebarItem.tsx | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) 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