Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions playwright-tests/tests/becomeAMentee.page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { HomePage } from '@pages/home.page';
import { MentorshipPage } from '@pages/mentorship.page';

test('Validate "Become a Mentee" section and Find a Mentor button', async ({
page, mentorshipPage, homePage
page,
mentorshipPage,
homePage,
Comment thread
Deejarh marked this conversation as resolved.
}) => {
// Navigate to Mentorship page
await page.goto('/mentorship');
Expand All @@ -22,7 +24,7 @@ test('Validate "Become a Mentee" section and Find a Mentor button', async ({
];

await expect(mentorshipPage.menteeListItems).toHaveText(items);

Comment thread
Deejarh marked this conversation as resolved.
await homePage.findMentorButton.click();
await expect(page).toHaveURL(/\/mentorship\/mentors/);
});
15 changes: 9 additions & 6 deletions src/pages/mentorship/mentee-registration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ const MenteeRegistrationPage = () => {
const theme = useTheme();
const isMobile = useMediaQuery(theme.breakpoints.down('md'));
const registrationOpen = IS_REGISTRATION_OPEN;
const closedRegistrationStyles = registrationOpen
? {}
: {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
minHeight: '70vh',
};

const formMethods = useForm<MenteeFormData>({
resolver: zodResolver(menteeFormSchema),
Expand Down Expand Up @@ -212,12 +220,7 @@ const MenteeRegistrationPage = () => {
px: { xs: 2, sm: 3 },
maxWidth: isMobile ? '100%' : theme.custom?.innerBox?.maxWidth,
margin: '0 auto',
...(!registrationOpen && {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
minHeight: '70vh',
}),
...closedRegistrationStyles,
}}
>
<Box
Expand Down
2 changes: 1 addition & 1 deletion src/utils/mentorshipConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,4 @@ export const PREFERENCE_LEVELS = ['Low', 'Medium', 'High', 'Not Applicable'];
* Mentee registration toggle.
* Set to `true` to open the registration form, `false` to show the closed page.
*/
export const IS_REGISTRATION_OPEN = false;
export const IS_REGISTRATION_OPEN = true;
Loading