-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1008 from OneCommunityGlobal/revert-946-Shereen_P…
…urchase_Equipment Revert "Shereen purchase equipment"
- Loading branch information
Showing
92 changed files
with
4,809 additions
and
1,534 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,20 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# Post Badge | ||
|
||
> ## Positive case | ||
1. ❌ Receives a POST request in the **/api/userProfile** route | ||
2. ✅ Returns 200 if the badge is successfully removed and all instances of the badge are removed from user profiles. | ||
3. ✅ Clears cache if cache exists. | ||
|
||
> ## Negative case | ||
1. ❌ Returns error 404 if the API does not exist | ||
2. ✅ Returns 403 if the user does not have permission to delete badges | ||
3. ✅ Returns 400 if an no badge is found | ||
4. ✅ Returns 500 if the removeBadgeFromProfile fails. | ||
5. ✅ Returns 500 if the remove method fails. | ||
|
||
> ## Edge case |
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,19 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# Post Badge | ||
|
||
> ## Positive case | ||
1. ❌ Receives a POST request in the **/api/userProfile** route | ||
2. ✅ Returns 200 if all is successful | ||
3. ✅ Removes `allBadges` from cache if all is successful and the cache is not empty | ||
|
||
> ## Negative case | ||
1. ❌ Returns error 404 if the API does not exist | ||
2. ✅ Returns 403 if the user is not authorized | ||
3. ✅ Returns 400 if an error occurs in `findById` | ||
4. ✅ Returns 400 if no badge is found | ||
|
||
> ## Edge case |
11 changes: 11 additions & 0 deletions
11
requirements/mouseoverTextController/createMouseoverText.md
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,11 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# createMouseoverText | ||
|
||
> ## Positive case | ||
1. ✅ Return 201 if create new mouseoverText successfully. | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 500 if any error when saving the new mouseoverText | ||
> ## Edge case |
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,11 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# getMouseoverText | ||
|
||
> ## Positive case | ||
1. ✅ Return 200 if find mouseoverText successfully. | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 404 if any error when finding the mouseoverText | ||
> ## Edge case |
12 changes: 12 additions & 0 deletions
12
requirements/mouseoverTextController/updateMouseoverText.md
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 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# updateMouseoverText | ||
|
||
> ## Positive case | ||
1. ✅ Return 201 if updating mouseoverText successfully. | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 500 if any error when finding the mouseoverText by Id | ||
2. ✅ Returns error 400 if any error when saving the mouseoverText | ||
> ## Edge case |
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,18 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# createNewPreset | ||
|
||
> ## Positive case | ||
1. ✅ Receives a POST request in the **/api/rolePreset** route | ||
2. ✅ Return 201 if create New Presets successfully. | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 403 if user doesn't have permissions for putRole | ||
2. ✅ Returns 400 if missing presetName | ||
3. ✅ Returns 400 if missing roleName | ||
4. ✅ Returns 400 if missing premissions | ||
5. ✅ Returns error 400 when saving new presets | ||
|
||
> ## Edge case |
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,17 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# deletePresetById | ||
|
||
> ## Positive case | ||
1. ✅ Return 200 if removing preset by id successfully. | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 403 if user doesn't have permissions for putRole | ||
2. ✅ Returns 400 if error in finding by id | ||
3. ✅ Returns 400 if the route doesn't exist | ||
4. ✅ Returns 400 if any error when removing results | ||
|
||
> ## Edge case |
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,15 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# getPresetsByRole | ||
|
||
> ## Positive case | ||
1. ✅ Receives a GET request in the **/api/rolePreset** route | ||
2. ✅ Return 200 if get Presets by roleName successfully. | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 403 if user doesn't have permissions for putRole | ||
2. ✅ Returns 400 when catching any error in finding roleName | ||
|
||
> ## Edge case |
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,17 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# updatePresetById | ||
|
||
> ## Positive case | ||
1. ✅ Return 200 if update preset by id successfully. | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 403 if user doesn't have permissions for putRole | ||
2. ✅ Returns 400 if the router doesn't exist | ||
3. ✅ Returns 400 if error in finding by id | ||
3. ✅ Returns 400 if any error when saving results | ||
|
||
> ## Edge case |
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,18 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# Get User Profiles | ||
|
||
> ## Positive case | ||
1. ✅ Receives a GET request in the **/api/userProfile** route | ||
2. ✅ Returns 200 if all is successful | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 404 if the API does not exist | ||
2. ✅ Returns 403 if the user does not have permission | ||
3. ✅ Returns 400 if and error occurs when querying DB | ||
4. ✅ returns 400 if an error occurs when removing the WBS | ||
|
||
> ## Edge case |
20 changes: 0 additions & 20 deletions
20
requirements/userProfileController/getUserProfiles-usecase.md
This file was deleted.
Oops, something went wrong.
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,16 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# Get User Profiles | ||
|
||
> ## Positive case | ||
1. ✅ Receives a GET request in the **/api/userProfile** route | ||
2. ✅ Returns 200 if all is successful | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 404 if the API does not exist | ||
2. ✅ Returns 500 if any errors occur when finding all WBS | ||
|
||
> ## Edge case |
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,16 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# Get User Profiles | ||
|
||
> ## Positive case | ||
1. ✅ Receives a GET request in the **/api/userProfile** route | ||
2. ✅ Returns 200 if all is successful | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 404 if the API does not exist | ||
2. ✅ Returns 404 if an error occurs in the aggregation query | ||
|
||
> ## Edge case |
31 changes: 0 additions & 31 deletions
31
requirements/userProfileController/postUserProfile-usecase.md
This file was deleted.
Oops, something went wrong.
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,16 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# Get User Profiles | ||
|
||
> ## Positive case | ||
1. ✅ Receives a GET request in the **/api/userProfile** route | ||
2. ✅ Returns 200 if all is successful | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 404 if the API does not exist | ||
2. ✅ Returns 404 if an error occurs when querying the database. | ||
|
||
> ## Edge case |
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,18 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# Get User Profiles | ||
|
||
> ## Positive case | ||
1. ✅ Receives a GET request in the **/api/userProfile** route | ||
2. ✅ Returns 201 if all is successful | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 404 if the API does not exist | ||
2. ✅ Returns 403 if the user does not have permission | ||
3. ✅ Returns 400 if `req.body` does not contain `wbsName` or `isActive` | ||
4. ✅ returns 500 if an error occurs when saving | ||
|
||
> ## Edge case |
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,7 +1,12 @@ | ||
const eventtypes = { | ||
ActionCreated: 'Action Created', | ||
ActionEdited: 'Action Edited', | ||
ActionDeleted: 'Action Deleted', | ||
}; | ||
/** | ||
* Unused legacy code. Commented out to avoid confusion. | ||
* Commented by: Shengwei Peng | ||
* Date: 2024-03-22 | ||
*/ | ||
// const eventtypes = { | ||
// ActionCreated: 'Action Created', | ||
// ActionEdited: 'Action Edited', | ||
// ActionDeleted: 'Action Deleted', | ||
// }; | ||
|
||
module.exports = eventtypes; | ||
// module.exports = eventtypes; |
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,19 +1,24 @@ | ||
export const URL_TO_BLUE_SQUARE_PAGE = | ||
const URL_TO_BLUE_SQUARE_PAGE = | ||
'https://www.onecommunityglobal.org/hands-off-administration-policy'; | ||
|
||
// Since the notification banner is blue background, added white color for hyperlink style. | ||
export const NEW_USER_BLUE_SQUARE_NOTIFICATION_MESSAGE = ` | ||
<p> Welcome as one of our newest members to the One Community team and family! | ||
Heads up we’ve removed a <a href=${URL_TO_BLUE_SQUARE_PAGE}>“blue square”</a> that | ||
was issued due to not completing your hours and/or summary this past week. The reason we removed | ||
this blue square is because you didn’t have the full week available to complete your volunteer | ||
const NEW_USER_BLUE_SQUARE_NOTIFICATION_MESSAGE = ` | ||
<p> Welcome as one of our newest members to the One Community team and family! | ||
Heads up we’ve removed a <a href=${URL_TO_BLUE_SQUARE_PAGE}>“blue square”</a> that | ||
was issued due to not completing your hours and/or summary this past week. The reason we removed | ||
this blue square is because you didn’t have the full week available to complete your volunteer | ||
time with us. </p> | ||
<p> If you’d like to learn more about this policy and/or blue squares, click here: | ||
<a href=${URL_TO_BLUE_SQUARE_PAGE}> “Blue Square FAQ”</a> | ||
<p> If you’d like to learn more about this policy and/or blue squares, click here: | ||
<a href=${URL_TO_BLUE_SQUARE_PAGE}> “Blue Square FAQ”</a> | ||
</p> | ||
<p>Welcome again, we’re glad to have you joining us! </p> | ||
<p>With Gratitude,</br>One Community </p> | ||
`; | ||
|
||
module.exports = { | ||
NEW_USER_BLUE_SQUARE_NOTIFICATION_MESSAGE, | ||
URL_TO_BLUE_SQUARE_PAGE, | ||
}; |
Oops, something went wrong.