From 50547c4d1d890417725373e434154f8f437d869d Mon Sep 17 00:00:00 2001 From: joana Date: Sun, 23 Nov 2025 16:26:35 +0000 Subject: [PATCH 1/5] Remove mentee registration option from mentorship dropdown --- src/utils/staticContent.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/utils/staticContent.ts b/src/utils/staticContent.ts index 84af62a..053b205 100644 --- a/src/utils/staticContent.ts +++ b/src/utils/staticContent.ts @@ -22,10 +22,6 @@ export const headerSetup = { title: 'Mentor Registration', path: '/mentorship/mentor-registration', }, - { - title: 'Mentee Registration', - path: '/mentorship/mentor-registration', - }, { title: 'Resources', path: '/mentorship/resources', From 8b589e5f0098059fc6394938231b9790052440d1 Mon Sep 17 00:00:00 2001 From: joana Date: Sun, 21 Dec 2025 19:36:29 +0000 Subject: [PATCH 2/5] Create file for playright test --- .../tests/becomeAMentee.page.spec.ts | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 playwright-tests/tests/becomeAMentee.page.spec.ts diff --git a/playwright-tests/tests/becomeAMentee.page.spec.ts b/playwright-tests/tests/becomeAMentee.page.spec.ts new file mode 100644 index 0000000..aee771c --- /dev/null +++ b/playwright-tests/tests/becomeAMentee.page.spec.ts @@ -0,0 +1,36 @@ +import { expect } from '@playwright/test'; +import { test } from '@utils/fixtures'; + +test.describe('Become a mentee Page', () => { + test('MENT-004: Verify title and cards are correctly displayed', async ({ + mentorshipPage, + basePage, + }) => { + await basePage.navigateToPath('/mentorship'); + });}) + + + + // test.describe('Mentorship Feedback Section', () => { + // test('MENT-004: Verify title and cards are correctly displayed', async ({ + // mentorshipPage, + // basePage, + // }) => { + // await basePage.navigateToPath('/mentorship'); + + // await expect(mentorshipPage.testimonialsTitle).toBeVisible(); + + // await expect(mentorshipPage.testimonialCards).toHaveCount(3); + + // await expect(mentorshipPage.firstTestimonialCardIcon).toBeVisible(); + + // await expect(mentorshipPage.firstTestimonialCardText).toBeVisible(); + // await expect(mentorshipPage.firstTestimonialCardText).not.toBeEmpty(); + + // await expect(mentorshipPage.firstTestimonialCardAuthor).toHaveText( + // /^.+,\s*Mentor\s+\d{4}$/, + // ); + + // await expect(mentorshipPage.showMoreButton).toBeVisible(); + // }); + // }); \ No newline at end of file From 1e372c0be8bc705f5175b88a94aaf65fc024fda1 Mon Sep 17 00:00:00 2001 From: joana Date: Sun, 11 Jan 2026 16:34:25 +0000 Subject: [PATCH 3/5] test: add title, description tests --- .../tests/becomeAMentee.page.spec.ts | 84 +++++++++++-------- 1 file changed, 51 insertions(+), 33 deletions(-) diff --git a/playwright-tests/tests/becomeAMentee.page.spec.ts b/playwright-tests/tests/becomeAMentee.page.spec.ts index aee771c..c1fea1f 100644 --- a/playwright-tests/tests/becomeAMentee.page.spec.ts +++ b/playwright-tests/tests/becomeAMentee.page.spec.ts @@ -1,36 +1,54 @@ import { expect } from '@playwright/test'; import { test } from '@utils/fixtures'; -test.describe('Become a mentee Page', () => { - test('MENT-004: Verify title and cards are correctly displayed', async ({ - mentorshipPage, - basePage, - }) => { - await basePage.navigateToPath('/mentorship'); - });}) - - - - // test.describe('Mentorship Feedback Section', () => { - // test('MENT-004: Verify title and cards are correctly displayed', async ({ - // mentorshipPage, - // basePage, - // }) => { - // await basePage.navigateToPath('/mentorship'); - - // await expect(mentorshipPage.testimonialsTitle).toBeVisible(); - - // await expect(mentorshipPage.testimonialCards).toHaveCount(3); - - // await expect(mentorshipPage.firstTestimonialCardIcon).toBeVisible(); - - // await expect(mentorshipPage.firstTestimonialCardText).toBeVisible(); - // await expect(mentorshipPage.firstTestimonialCardText).not.toBeEmpty(); - - // await expect(mentorshipPage.firstTestimonialCardAuthor).toHaveText( - // /^.+,\s*Mentor\s+\d{4}$/, - // ); - - // await expect(mentorshipPage.showMoreButton).toBeVisible(); - // }); - // }); \ No newline at end of file +test('Validate "Become a Mentee" section and Find a Mentor button', async ({ + page, + homePage, +}) => { + // Navigate to Mentorship page + await page.goto('/mentorship'); + + // Scroll to "Become a Mentee" section + const sectionTitle = page.getByRole('heading', { + level: 4, + name: /Become a Mentee/i, + }); + await sectionTitle.scrollIntoViewIfNeeded(); + + // Validate title + await expect(sectionTitle).toBeVisible(); + + // Validate description text + const description = page.getByRole('heading', { + level: 5, + name: /You should become a mentee if you:/i, + }); + await expect(description).toBeVisible(); + + // List items + const items = [ + 'Want to start a career in software engineering', + 'Want to find a better job', + 'Want to be promoted at work', + 'Want to apply for a leadership position', + 'Need support in advancing your career', + ]; + + for (const item of items) { + await expect(page.getByText(item)).toBeVisible(); + } + + // Validate "Find a mentor" button + const findMentorButton = page.getByRole('button', { + name: 'Find a mentor', + }); + await expect(findMentorButton).toBeVisible(); + await expect(findMentorButton).toBeEnabled(); + + // Click the button + await findMentorButton.click(); + + // Verify redirection + await expect(page).toHaveURL(/\/mentorship\/mentors/); + await expect(page).toHaveTitle(/Meet Our Mentors/i); +}); From 80321654b2cb4a4175beee9fc549e53a2daa43c8 Mon Sep 17 00:00:00 2001 From: joana Date: Sun, 11 Jan 2026 16:37:31 +0000 Subject: [PATCH 4/5] playwright --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 54571ee..105821d 100644 --- a/package.json +++ b/package.json @@ -58,5 +58,6 @@ "engines": { "node": ">=20", "pnpm": ">=9" - } + }, + "packageManager": "pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0" } From c58ff9aef131d61daa7ac30953afd27f1b4ce94f Mon Sep 17 00:00:00 2001 From: joana Date: Sun, 11 Jan 2026 16:51:31 +0000 Subject: [PATCH 5/5] test: add button testing --- playwright-tests/tests/becomeAMentee.page.spec.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/playwright-tests/tests/becomeAMentee.page.spec.ts b/playwright-tests/tests/becomeAMentee.page.spec.ts index c1fea1f..731989f 100644 --- a/playwright-tests/tests/becomeAMentee.page.spec.ts +++ b/playwright-tests/tests/becomeAMentee.page.spec.ts @@ -3,7 +3,6 @@ import { test } from '@utils/fixtures'; test('Validate "Become a Mentee" section and Find a Mentor button', async ({ page, - homePage, }) => { // Navigate to Mentorship page await page.goto('/mentorship'); @@ -44,11 +43,8 @@ test('Validate "Become a Mentee" section and Find a Mentor button', async ({ }); await expect(findMentorButton).toBeVisible(); await expect(findMentorButton).toBeEnabled(); - - // Click the button await findMentorButton.click(); // Verify redirection await expect(page).toHaveURL(/\/mentorship\/mentors/); - await expect(page).toHaveTitle(/Meet Our Mentors/i); });