From 23f034d1026159758764def02ef1c6e3e47db2ec Mon Sep 17 00:00:00 2001
From: Kanhaiya yadav <93936630+kanhaiya04@users.noreply.github.com>
Date: Mon, 13 Nov 2023 22:08:33 +0530
Subject: [PATCH] created a return button on event dashboard (#1057)
---
.../LeftDrawerEvent/LeftDrawerEvent.test.tsx | 19 ++++++++++++++++++-
.../LeftDrawerEvent/LeftDrawerEvent.tsx | 14 ++++++++++++++
2 files changed, 32 insertions(+), 1 deletion(-)
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 */}