diff --git a/playwright-tests/tests/becomeAMentee.page.spec.ts b/playwright-tests/tests/becomeAMentee.page.spec.ts index 71d32bc..b033db4 100644 --- a/playwright-tests/tests/becomeAMentee.page.spec.ts +++ b/playwright-tests/tests/becomeAMentee.page.spec.ts @@ -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, }) => { // Navigate to Mentorship page await page.goto('/mentorship'); @@ -22,7 +24,7 @@ test('Validate "Become a Mentee" section and Find a Mentor button', async ({ ]; await expect(mentorshipPage.menteeListItems).toHaveText(items); - + await homePage.findMentorButton.click(); await expect(page).toHaveURL(/\/mentorship\/mentors/); }); diff --git a/src/pages/mentorship/mentee-registration.tsx b/src/pages/mentorship/mentee-registration.tsx index ac85c4b..956edf7 100644 --- a/src/pages/mentorship/mentee-registration.tsx +++ b/src/pages/mentorship/mentee-registration.tsx @@ -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({ resolver: zodResolver(menteeFormSchema), @@ -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, }} >