From 108d31eaa48b993d188d7d61619ac377e20f8029 Mon Sep 17 00:00:00 2001 From: Anshul Kahar <22511126.dypit@dypvp.edu.in> Date: Wed, 25 Sep 2024 10:17:59 +0530 Subject: [PATCH] fix --- .../OrganizationCard/OrganizationCard.test.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/UserPortal/OrganizationCard/OrganizationCard.test.tsx b/src/components/UserPortal/OrganizationCard/OrganizationCard.test.tsx index 9e89860144..56f7b215ad 100644 --- a/src/components/UserPortal/OrganizationCard/OrganizationCard.test.tsx +++ b/src/components/UserPortal/OrganizationCard/OrganizationCard.test.tsx @@ -238,6 +238,16 @@ describe('Testing OrganizationCard Component [User Portal]', () => { // Modal should be shown expect(screen.getByText('Leaving organization ?')).toBeInTheDocument(); // Adjust this as per your modal content + + const closeButton = screen.getByText('Cancel'); // Assuming the modal has a "Close" button, adjust as per your modal content + fireEvent.click(closeButton); + + await wait(); + + // Assert that the modal is no longer in the document + expect( + screen.queryByText('Leaving organization ?'), + ).not.toBeInTheDocument(); }); test('Component should be rendered properly if organization Image is not undefined', async () => {