From cccd61363ff5758d5375f7c7d5b2427c1f7a3a2b Mon Sep 17 00:00:00 2001 From: nimat1 Date: Fri, 6 Dec 2024 21:41:40 +0000 Subject: [PATCH] Integration test mentorship overview (#155) --- .../tests/cms/mentorshipoverview.test.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 integration-test/tests/cms/mentorshipoverview.test.ts diff --git a/integration-test/tests/cms/mentorshipoverview.test.ts b/integration-test/tests/cms/mentorshipoverview.test.ts new file mode 100644 index 00000000..f1ad20d1 --- /dev/null +++ b/integration-test/tests/cms/mentorshipoverview.test.ts @@ -0,0 +1,12 @@ +import {expect, test} from '@playwright/test'; +test('GET /api/cms/v1/mentorship/overview returns correct data', async ({request}) => { +const response = await request.get('/api/cms/v1/mentorship/overview'); +expect(response.status()).toBe(200); +const data = await response.json(); +expect(data.page).toBeDefined(); +expect(data.page.title).toBe('Mentorship Programme'); +expect(data.mentorSection).toBeDefined(); +expect(data.mentorSection.title).toBe('Become a Mentor'); +expect(data.menteeSection).toBeDefined(); +expect(data.menteeSection.title).toBe('Become a Mentee'); +});