);
case 'statistics':
return (
-
+
Statistics
);
diff --git a/src/screens/EventVolunteers/Requests/Requests.spec.tsx b/src/screens/EventVolunteers/Requests/Requests.spec.tsx
index e51e28ab3f..cd15a20188 100644
--- a/src/screens/EventVolunteers/Requests/Requests.spec.tsx
+++ b/src/screens/EventVolunteers/Requests/Requests.spec.tsx
@@ -28,6 +28,7 @@ import {
} from './Requests.mocks';
import { toast } from 'react-toastify';
import { vi } from 'vitest';
+import styles from '../../../style/app.module.css';
vi.mock('react-toastify', () => ({
toast: {
@@ -235,3 +236,69 @@ describe('Testing Requests Screen', () => {
});
});
});
+
+describe('Requests Component Styling', () => {
+ const renderComponent = (): RenderResult => {
+ return render(
+
+
+
+
+
+
+ } />
+
+
+
+
+
+ ,
+ );
+ };
+
+ beforeAll(() => {
+ vi.mock('react-router-dom', async () => ({
+ ...(await vi.importActual('react-router-dom')),
+ useParams: () => ({ orgId: 'orgId', eventId: 'eventId' }),
+ }));
+ });
+
+ it('should apply correct styles to the container', async () => {
+ renderComponent();
+ const container = await screen.findByTestId('searchBy');
+ expect(container.parentElement).toHaveClass(styles.input);
+ });
+
+ it('should apply correct styles to the search button', async () => {
+ renderComponent();
+ const searchButton = await screen.findByTestId('searchBtn');
+ expect(searchButton).toHaveClass(styles.regularBtn);
+ expect(searchButton).toHaveStyle({
+ marginBottom: '10px',
+ });
+ });
+
+ it('should apply correct styles to volunteer images', async () => {
+ renderComponent();
+ const volunteerImages = await screen.findAllByTestId('volunteer_image');
+ volunteerImages.forEach((image) => {
+ expect(image).toHaveClass(styles.TableImages);
+ });
+ });
+
+ it('should apply correct styles to avatar container', async () => {
+ renderComponent();
+ const avatarContainers = document.querySelectorAll(
+ `.${styles.avatarContainer}`,
+ );
+ avatarContainers.forEach((container) => {
+ expect(container).toBeInTheDocument();
+ });
+ });
+
+ it('should apply correct styles to the input fields', async () => {
+ renderComponent();
+ const input = await screen.findByTestId('searchBy');
+ expect(input).toHaveClass(styles.inputFields);
+ });
+});
diff --git a/src/screens/EventVolunteers/Requests/Requests.tsx b/src/screens/EventVolunteers/Requests/Requests.tsx
index d8efd92a90..902e09e585 100644
--- a/src/screens/EventVolunteers/Requests/Requests.tsx
+++ b/src/screens/EventVolunteers/Requests/Requests.tsx
@@ -271,7 +271,7 @@ function requests(): JSX.Element {
/>