Sayali: add test endpoint for setting user teamCode#2060
Open
sayali-2308 wants to merge 1 commit intodevelopmentfrom
Open
Sayali: add test endpoint for setting user teamCode#2060sayali-2308 wants to merge 1 commit intodevelopmentfrom
sayali-2308 wants to merge 1 commit intodevelopmentfrom
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a test endpoint to support testing of Task #14 (PRIORITY MEDIUM): Show the number of team members next to team name in 'PR Action Done' bar charts.
This endpoint allows testers to assign a
teamCodeto a user profile without needing direct MongoDB access, enabling verification that member counts update correctly in the PR Action Done chart.Implements # 14 (Priority Medium - PR Review Team Analytics Dashboard - PR Insights Frontend)
Related PRs (if any):
This backend PR is related to the frontend PR OneCommunityGlobal/HighestGoodNetworkApp#4864
To test this backend PR you need to checkout the frontend PR
Sayali_Add_Member_Count_To_PR_Actions_Chart.Main changes explained:
src/routes/testRoutes.js— adds a POST endpoint/api/test/set-team-codethat updates a user'steamCodefield by userId, used for testing member count display in the PR Action Done chartsrc/app.jsto register the test routeHow to test:
Sayali_Add_Member_Count_To_PR_Actions_Chartnpm run buildandnpm run startto run the backend locallyPOST http://localhost:4500/api/login{ "email": "devadmin@hgn.net", "password": "#############" }GET http://localhost:4500/api/userprofilewith Bearer token_idfrom the responsePOST http://localhost:4500/api/test/set-team-code{ "userId": "<copied_id>", "teamCode": "Team E" }success: truewith updated user showingteamCode: "Team E"Screenshots or videos of changes:
Get userprofile
Set-team-code
Check pr-review-insights
Note: