-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integration test collaborators (#156)
* Integration test collaborators * Fix format of mentorship/overview
- Loading branch information
Showing
2 changed files
with
22 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'); | ||
}); |