Skip to content

Commit

Permalink
Fixed-Issue-#1266 Bug Report When a new post is added, the latest pos…
Browse files Browse the repository at this point in the history
…t section in the organization's dashboard becomes distorted Updated
  • Loading branch information
gauravsingh94 committed Jan 7, 2024
1 parent 702cbe0 commit dd36013
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/screens/OrganizationDashboard/OrganizationDashboard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
<MockedProvider addTypename={false} link={link1}>
<BrowserRouter>
<Provider store={store}>
<I18nextProvider i18n={i18nForTest}>
<OrganizationDashboard />
</I18nextProvider>
</Provider>
</BrowserRouter>
</MockedProvider>
);
});

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!');
});
});

0 comments on commit dd36013

Please sign in to comment.