diff --git a/integration-test/tests/cms/collaborators.test.ts b/integration-test/tests/cms/collaborators.test.ts new file mode 100644 index 00000000..b4c61f45 --- /dev/null +++ b/integration-test/tests/cms/collaborators.test.ts @@ -0,0 +1,12 @@ +import {expect, test} from '@playwright/test'; + +test('GET /api/cms/v1/collaborators returns correct data', async ({request}) => { + const response = await request.get('/api/cms/v1/collaborators'); + expect(response.status()).toBe(200); + expect(response).toBeDefined(); + const data = await response.json(); + expect(data.page).toBeDefined(); + expect(data.page.title).toBe('Team'); + expect(data.contact).toBeDefined(); + expect(data.contact.title).toBe('Contact us'); +}); \ No newline at end of file diff --git a/integration-test/tests/cms/mentorshipoverview.test.ts b/integration-test/tests/cms/mentorshipoverview.test.ts index f1ad20d1..bf46665d 100644 --- a/integration-test/tests/cms/mentorshipoverview.test.ts +++ b/integration-test/tests/cms/mentorshipoverview.test.ts @@ -1,12 +1,13 @@ 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'); + 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'); });