From dd36013417beb2cc08ee371111f8077ec97156b1 Mon Sep 17 00:00:00 2001 From: gauravsingh94 Date: Sun, 7 Jan 2024 05:57:08 +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.test.tsx | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/screens/OrganizationDashboard/OrganizationDashboard.test.tsx b/src/screens/OrganizationDashboard/OrganizationDashboard.test.tsx index f1bde5c5a5..a7a7fe2fd1 100644 --- a/src/screens/OrganizationDashboard/OrganizationDashboard.test.tsx +++ b/src/screens/OrganizationDashboard/OrganizationDashboard.test.tsx @@ -195,4 +195,28 @@ describe('Organisation Dashboard Page', () => { expect(window.location.pathname).toBe('/orglist'); }); + + test('Clicking viewAllMembershipRequests triggers toast.success', async () => { + await act(async () => { + render( + + + + + + + + + + ); + }); + + await wait(); + + const viewMSBtn = screen.getByTestId('viewAllMembershipRequests'); + fireEvent.click(viewMSBtn); + + // Ensure that toast.success is called with 'Coming soon!' + expect(toast.success).toBeCalledWith('Coming soon!'); + }); });