From 0f1e928ac50b1434bd1b6ca3bd906ce32b1d3407 Mon Sep 17 00:00:00 2001 From: Badmus Damola Khadijah Date: Wed, 24 Jun 2026 22:09:18 +0100 Subject: [PATCH 1/2] ref-form: Open mentee registration form --- playwright-tests/pages/base.page.ts | 4 +++- playwright-tests/tests/becomeAMentee.page.spec.ts | 6 ++++-- src/pages/mentorship/mentee-registration.tsx | 14 ++++++++------ src/utils/mentorshipConstants.ts | 2 +- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/playwright-tests/pages/base.page.ts b/playwright-tests/pages/base.page.ts index ef0d357..5990f00 100644 --- a/playwright-tests/pages/base.page.ts +++ b/playwright-tests/pages/base.page.ts @@ -60,7 +60,9 @@ export class BasePage { Instagram: links.filter({ has: page.getByTestId('InstagramIcon') }), Email: links.filter({ has: page.getByTestId('EmailIcon') }), Slack: page.locator('a[href*="join.slack.com"]').last(), - 'Send us a report': page.getByText('Send us a report on GitHub', { exact: true }), + 'Send us a report': page.getByText('Send us a report on GitHub', { + exact: true, + }), }; } 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..7f42a9b 100644 --- a/src/pages/mentorship/mentee-registration.tsx +++ b/src/pages/mentorship/mentee-registration.tsx @@ -212,12 +212,14 @@ 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', - }), + ...(!registrationOpen + ? { + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + minHeight: '70vh', + } + : {}), }} > Date: Sat, 27 Jun 2026 17:00:40 +0100 Subject: [PATCH 2/2] Fix sonarqube warn --- src/pages/mentorship/mentee-registration.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/pages/mentorship/mentee-registration.tsx b/src/pages/mentorship/mentee-registration.tsx index 7f42a9b..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,14 +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, }} >