Skip to content

Commit

Permalink
Revert "Feat : Write Unittests for `src/components/UserPortal/Organiz…
Browse files Browse the repository at this point in the history
…ationCard/OrganizationCard.tsx` (#2393)"

This reverts commit becd2d1.
  • Loading branch information
sethdivyansh committed Nov 2, 2024
1 parent 31027a7 commit f345556
Showing 1 changed file with 1 addition and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import { act } from '@testing-library/react';
import React, { act } from 'react';
import { fireEvent, render, screen } from '@testing-library/react';
import { MockedProvider } from '@apollo/react-testing';
import { I18nextProvider } from 'react-i18next';
Expand Down Expand Up @@ -226,38 +225,6 @@ describe('Testing OrganizationCard Component [User Portal]', () => {
await wait();
});

test('Visit organization', async () => {
const cardProps = {
...props,
id: '3',
image: 'organizationImage',
userRegistrationRequired: true,
membershipRequestStatus: 'accepted',
};

render(
<MockedProvider addTypename={false} link={link}>
<BrowserRouter>
<Provider store={store}>
<I18nextProvider i18n={i18nForTest}>
<OrganizationCard {...cardProps} />
</I18nextProvider>
</Provider>
</BrowserRouter>
</MockedProvider>,
);

await wait();

expect(screen.getByTestId('manageBtn')).toBeInTheDocument();

fireEvent.click(screen.getByTestId('manageBtn'));

await wait();

expect(window.location.pathname).toBe(`/user/organization/${cardProps.id}`);
});

test('Send membership request', async () => {
props = {
...props,
Expand Down

0 comments on commit f345556

Please sign in to comment.