Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration test collaborators #156

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions integration-test/tests/cms/collaborators.test.ts
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}) => {
dricazenck marked this conversation as resolved.
Show resolved Hide resolved
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');
});
19 changes: 10 additions & 9 deletions integration-test/tests/cms/mentorshipoverview.test.ts
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');
});
Loading