-
Notifications
You must be signed in to change notification settings - Fork 59
test: add stable leaderboard regression coverage #128
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
Merged
Sing-Li
merged 7 commits into
RocketChat:master
from
srijnabhargav:test/e2e-leaderboard-snapshot
Mar 27, 2026
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
309bb26
implement e2e
srijnabhargav cdbf903
remove json and point it to main one
srijnabhargav a29a3c6
remove log file
srijnabhargav e48f11d
update readme
srijnabhargav 37f6ae7
resolve merge conflicts
srijnabhargav ae79e99
fix(server): restore pre-merge app.js layout (no lockfile changes)
srijnabhargav 15882ec
Reverted the src/server changes so the PR does not rely on core code …
srijnabhargav File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Regression tests | ||
|
|
||
| This directory holds automated regression tests for stable leaderboard behavior. | ||
|
|
||
| `leaderboard-e2e.test.js` starts the current server code against a fixed Rocket.Chat snapshot and verifies that `/stats`, `/rank`, and selected `/contributor` and `/rank?username=` responses still match the checked-in expected output. | ||
|
|
||
| Fixtures: | ||
|
|
||
| - `../contrib/rocketchat/gsoc/2025/gsoc2025final.json` is the canonical snapshot used as the fixed leaderboard input. | ||
| - `fixtures/gsoc2025final.expected.json` is the checked-in golden output generated from the current stable ranking logic and used for regression comparisons. | ||
|
|
||
| Run from the repo root: | ||
|
|
||
| ```bash | ||
| npm test | ||
| ``` |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "organization": "RocketChat", | ||
| "organizationHomepage": "https://rocket.chat/", | ||
| "organizationGithubUrl": "https://github.com/RocketChat", | ||
| "authToken": "", | ||
| "adminPassword": "123456", | ||
| "delay": "10", | ||
| "serverPort": "62050", | ||
| "contributors": [], | ||
| "startDate": "2024-12-01", | ||
| "includedRepositories": [] | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@srijnabhargav "making it work with dotEnv" means absolutely NO CHANGES to the base code.
So please remove all changes to any file under
src/serverAnd fix the tests so they work.
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry sir and thank you for the clarification. I have updated the PR
What was wrong earlier:
What I changed now:
Validation: ran following commands
Result: the regression test passes on the current upstream server code.