From 421b07e87655c25b258ba70fefb5e17c9456f6f1 Mon Sep 17 00:00:00 2001 From: Iryna Lypnyk Date: Sun, 3 May 2026 21:00:38 +0100 Subject: [PATCH 1/2] test: fix outdated mentor registration page text assertion (#201) --- playwright-tests/tests/home.page.spec.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/playwright-tests/tests/home.page.spec.ts b/playwright-tests/tests/home.page.spec.ts index a624bc1..a13bcee 100644 --- a/playwright-tests/tests/home.page.spec.ts +++ b/playwright-tests/tests/home.page.spec.ts @@ -89,9 +89,7 @@ test.describe('Validate Home Page', () => { await basePage.clickElement(homePage.joinAsMentorBtn); await basePage.verifyURL('/mentorship/mentor-registration'); - await basePage.verifyPageContainsText( - 'Welcome to the MentorRegistrationPage', - ); + await basePage.verifyPageContainsText('WCC: Registration Form for Mentors'); }); test('HP-004: Volunteer section', async ({ homePage, basePage }) => { From a5bc34706ea35616ca9c3f1bd39dae8f63b87232 Mon Sep 17 00:00:00 2001 From: Iryna Lypnyk Date: Thu, 25 Jun 2026 21:38:46 +0300 Subject: [PATCH 2/2] test: fix failing Playwright E2E tests (#288) --- playwright-tests/pages/base.page.ts | 8 ++++++-- playwright-tests/pages/home.page.ts | 4 +++- playwright-tests/utils/datafactory/nav.tests.ts | 2 +- src/lib/responses/mentorship.json | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/playwright-tests/pages/base.page.ts b/playwright-tests/pages/base.page.ts index ef0d357..e1a2ee7 100644 --- a/playwright-tests/pages/base.page.ts +++ b/playwright-tests/pages/base.page.ts @@ -32,7 +32,9 @@ export class BasePage { this.blogLink = page.getByRole('button', { name: 'Blog' }); this.jobsLink = page.getByRole('button', { name: 'Jobs' }); this.aboutUsDropdown = page.getByRole('button', { name: 'About Us' }); - this.findMentorButton = page.getByRole('button', { name: 'Find a mentor' }); + this.findMentorButton = page.getByRole('link', { + name: 'Check our mentors', + }); this.menuitem = (itemTitle: string) => page.getByRole('menuitem', { name: itemTitle }); @@ -60,7 +62,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/pages/home.page.ts b/playwright-tests/pages/home.page.ts index dda131b..5d0fa2e 100644 --- a/playwright-tests/pages/home.page.ts +++ b/playwright-tests/pages/home.page.ts @@ -48,7 +48,9 @@ export class HomePage extends BasePage { name: 'Learn more about volunteering', }); - this.findMentorButton = page.getByRole('button', { name: 'Find a mentor' }); + this.findMentorButton = page.getByRole('link', { + name: 'Check our mentors', + }); this.heroTitle = page .getByTestId('hero-container') diff --git a/playwright-tests/utils/datafactory/nav.tests.ts b/playwright-tests/utils/datafactory/nav.tests.ts index da46b55..87bd325 100644 --- a/playwright-tests/utils/datafactory/nav.tests.ts +++ b/playwright-tests/utils/datafactory/nav.tests.ts @@ -57,7 +57,7 @@ export const aboutUsMenuItems = items.map(([name, url, text]) => ({ expectedText: text, })); const mentorshipItems = [ - ['Overview', '/'], + ['Overview', '/mentorship'], ['Mentors', '/mentorship/mentors'], ['Study Groups', '/mentorship/study-groups'], ['Resources', '/mentorship/resources'], diff --git a/src/lib/responses/mentorship.json b/src/lib/responses/mentorship.json index 67c93e9..c108fe9 100644 --- a/src/lib/responses/mentorship.json +++ b/src/lib/responses/mentorship.json @@ -28,7 +28,7 @@ "uri": "/mentorship/mentors" }, "items": [ - "Want to start career in software engineering", + "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",