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 5, 2024
1 parent 1f2553a commit 5945392
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
justify-content: center;
align-items: center;
}

.BottomRow {
margin-top: 45px;
margin-top: 30px;
}

.memeberShipCard {
height: 150px;
}
23 changes: 22 additions & 1 deletion src/screens/OrganizationDashboard/OrganizationDashboard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -147,4 +146,26 @@ describe('Organisation Dashboard Page', () => {
await wait();
expect(window.location).toBeAt('/orglist');
});

test('rendering of upcoming events', async () => {
render(
<MockedProvider addTypename={false} link={link1}>
<BrowserRouter>
<Provider store={store}>
<I18nextProvider i18n={i18nForTest}>
<OrganizationDashboard />
</I18nextProvider>
</Provider>
</BrowserRouter>
</MockedProvider>
);

await wait();

const upcomingEventsTitle = screen.getByText('Upcoming Events');
expect(upcomingEventsTitle).toBeInTheDocument();

const upcomingEvents = screen.queryAllByTestId('upcomingEventItem');
expect(upcomingEvents.length).toBeGreaterThanOrEqual(0);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function organizationDashboard(): JSX.Element {
{t('viewAll')}
</Button>
</div>
<Card.Body className={styles.cardBody}>
<Card.Body className={styles.memeberShipCard}>
{loadingOrgData ? (
[...Array(4)].map((_, index) => {
return <CardItemLoading key={index} />;
Expand Down

0 comments on commit 5945392

Please sign in to comment.