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

code-of-conduct integration test #143

Merged
merged 3 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
17 changes: 17 additions & 0 deletions integration-test/tests/cms/codeofconduct.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {expect, test} from '@playwright/test';
import { codeofconductExepctedInformation } from '../../utils/datafactory/codeofconduct.data';
test('GET /api/cms/v1/code-of-conduct returns correct team data', async ({request}) => {
const response = await request.get(`https://wcc-backend.fly.dev/api/cms/v1/code-of-conduct`);
dricazenck marked this conversation as resolved.
Show resolved Hide resolved

if (response.status() === 200) {
dricazenck marked this conversation as resolved.
Show resolved Hide resolved
console.log('API Test Passed: Status 200');
} else {
console.error('API Test Failed');
}

const body = await response.json();
dricazenck marked this conversation as resolved.
Show resolved Hide resolved

const expectedResponse = codeofconductExepctedInformation;

expect(body).toEqual(expectedResponse);
});
38 changes: 38 additions & 0 deletions integration-test/utils/datafactory/codeofconduct.data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
export const codeofconductExepctedInformation = {
"page": {
"title": "Code of Conduct",
"description": "At Women Coding Community we are committed to a vibrant, supportive community where women can network, share experiences, and foster professional relationships, regardless of age, gender, visible or invisible disability, ethnicity, gender expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual orientation or preferred programming language(s)."
},
"items": [
{
"title": "Our Standards",
"description": "To ensure a positive experience for all members, we expect participants to exhibit the following behaviors:",
"items": [
"Respect: Treat everyone with respect, dignity, and empathy. Listen and communicate thoughtfully.",
"Inclusivity: Actively seek to acknowledge and respect the diversity of our community.",
"Collaboration: Share knowledge generously and assist others when possible, fostering a collaborative atmosphere.",
"Constructive Communication: Engage in constructive, positive communication. Provide and gracefully accept constructive criticism.",
"Professionalism: Be professional in all interactions within the community. Avoid behavior or language that may be considered inappropriate or offensive."
]
},
{
"title": "Unacceptable Behavior",
"description": "The following behaviors are considered harassment and are unacceptable within our community:",
"items": [
"Violence, threats of violence, or violent language directed against another member or group.",
"Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.",
"Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.",
"Inappropriate photography or recording.",
"Advocating for, or encouraging, any of the above behavior."
]
},
{
"title": "Enforcement",
"description": "Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. Instances of abusive, harassing, or otherwise unacceptable behavior can be reported by <a href=\"mailto:[email protected]\">email</a>. All complaints will be reviewed and investigated promptly and fairly."
},
{
"title": "Consequences",
"description": "Actions determined to be contrary to these guidelines may result in consequences ranging from a warning to expulsion from the community, future events depending on the severity of the behavior."
}
]
}
Loading