-
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.
Merge branch 'main' of github.com:dricazenck/wcc-backend into update_…
…footer_landingPage_data
- Loading branch information
Showing
15 changed files
with
196 additions
and
124 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
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'; | ||
import { codeofconductExepctedInformation } from '../../utils/datafactory/codeofconduct.data'; | ||
test('GET /api/cms/v1/code-of-conduct returns correct data', async ({request}) => { | ||
const response = await request.get(`/api/cms/v1/code-of-conduct`); | ||
|
||
expect(response.status()).toBe(200); | ||
const body = await response.json(); | ||
|
||
const expectedResponse = codeofconductExepctedInformation; | ||
|
||
expect(body).toEqual(expectedResponse); | ||
}); |
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,6 @@ | ||
import {expect, test} from '@playwright/test'; | ||
|
||
test('GET /api/cms/v1/events returns success response code', async ({request}) => { | ||
const response = await request.get(`/api/cms/v1/events`); | ||
expect(response.status()).toBe(200); | ||
}); |
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/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'); | ||
}); |
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,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." | ||
} | ||
] | ||
} |
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
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
7 changes: 6 additions & 1 deletion
7
src/main/java/com/wcc/platform/domain/exceptions/PlatformInternalException.java
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,9 +1,14 @@ | ||
package com.wcc.platform.domain.exceptions; | ||
|
||
import com.wcc.platform.domain.cms.PageType; | ||
|
||
/** Platform generic exception. */ | ||
public class PlatformInternalException extends RuntimeException { | ||
|
||
public PlatformInternalException(final String message, final Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public PlatformInternalException(final PageType pageType, final Throwable cause) { | ||
super("Invalid Page type " + pageType, cause); | ||
} | ||
} |
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,4 +1,4 @@ | ||
package com.wcc.platform.repository; | ||
|
||
/** Generic page repository interface. */ | ||
public interface PageRepository<T> extends CrudRepository<T, String> {} | ||
public interface PageRepository extends CrudRepository<String, String> {} |
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
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
Oops, something went wrong.