From 59453927e76ada5b8bf897d2eaf44dcd687a96c2 Mon Sep 17 00:00:00 2001 From: gauravsingh94 Date: Fri, 5 Jan 2024 20:06:36 +0530 Subject: [PATCH] Fixed-Issue-#1266 Bug Report When a new post is added, the latest post section in the organization's dashboard becomes distorted Updated --- .../OrganizationDashboard.module.css | 7 +++++- .../OrganizationDashboard.test.tsx | 23 ++++++++++++++++++- .../OrganizationDashboard.tsx | 2 +- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/screens/OrganizationDashboard/OrganizationDashboard.module.css b/src/screens/OrganizationDashboard/OrganizationDashboard.module.css index b65b822c49..f2445c67e9 100644 --- a/src/screens/OrganizationDashboard/OrganizationDashboard.module.css +++ b/src/screens/OrganizationDashboard/OrganizationDashboard.module.css @@ -22,6 +22,11 @@ justify-content: center; align-items: center; } + .BottomRow { - margin-top: 45px; + margin-top: 30px; +} + +.memeberShipCard { + height: 150px; } diff --git a/src/screens/OrganizationDashboard/OrganizationDashboard.test.tsx b/src/screens/OrganizationDashboard/OrganizationDashboard.test.tsx index cb221f94ce..568d5e6bc9 100644 --- a/src/screens/OrganizationDashboard/OrganizationDashboard.test.tsx +++ b/src/screens/OrganizationDashboard/OrganizationDashboard.test.tsx @@ -78,7 +78,6 @@ describe('Organisation Dashboard Page', () => { // Checking if posts are rendered expect(screen.getByText('Post 15')).toBeInTheDocument(); - // Checking if membership requests are rendered expect(screen.getByText('Jane Doe')).toBeInTheDocument(); const peopleBtn = screen.getByText('Members'); @@ -147,4 +146,26 @@ describe('Organisation Dashboard Page', () => { await wait(); expect(window.location).toBeAt('/orglist'); }); + + test('rendering of upcoming events', async () => { + render( + + + + + + + + + + ); + + await wait(); + + const upcomingEventsTitle = screen.getByText('Upcoming Events'); + expect(upcomingEventsTitle).toBeInTheDocument(); + + const upcomingEvents = screen.queryAllByTestId('upcomingEventItem'); + expect(upcomingEvents.length).toBeGreaterThanOrEqual(0); + }); }); diff --git a/src/screens/OrganizationDashboard/OrganizationDashboard.tsx b/src/screens/OrganizationDashboard/OrganizationDashboard.tsx index dc3e0489a1..59e5c0e339 100644 --- a/src/screens/OrganizationDashboard/OrganizationDashboard.tsx +++ b/src/screens/OrganizationDashboard/OrganizationDashboard.tsx @@ -228,7 +228,7 @@ function organizationDashboard(): JSX.Element { {t('viewAll')} - + {loadingOrgData ? ( [...Array(4)].map((_, index) => { return ;