diff --git a/src/components/LeftDrawerEvent/LeftDrawerEvent.test.tsx b/src/components/LeftDrawerEvent/LeftDrawerEvent.test.tsx index 0fabcd2c55..92d0ac32ad 100644 --- a/src/components/LeftDrawerEvent/LeftDrawerEvent.test.tsx +++ b/src/components/LeftDrawerEvent/LeftDrawerEvent.test.tsx @@ -18,7 +18,7 @@ const props: InterfaceLeftDrawerProps = { title: 'Test Event', description: 'Test Description', organization: { - _id: 'Test Organization', + _id: 'TestOrganization', }, }, hideDrawer: false, @@ -218,4 +218,21 @@ describe('Testing Left Drawer component for the Event Dashboard', () => { expect(truncatedEventTitle).toContain('...'); expect(truncatedEventDescription).toContain('...'); }); + test('Testing all events button', async () => { + localStorage.setItem('UserType', 'SUPERADMIN'); + render( + + + + + + + + ); + + userEvent.click(screen.getByTestId('allEventsBtn')); + expect(global.window.location.pathname).toBe( + `/orgevents/id=${props.event.organization._id}` + ); + }); }); diff --git a/src/components/LeftDrawerEvent/LeftDrawerEvent.tsx b/src/components/LeftDrawerEvent/LeftDrawerEvent.tsx index 2e3ac65cde..2d41b4503f 100644 --- a/src/components/LeftDrawerEvent/LeftDrawerEvent.tsx +++ b/src/components/LeftDrawerEvent/LeftDrawerEvent.tsx @@ -130,6 +130,20 @@ const leftDrawerEvent = ({ eventId={event._id} key={`${event?._id || 'loading'}Stats`} /> + {/* Profile Section & Logout Btn */}