generated from Real-Dev-Squad/website-template
-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: added test for lazy load discord groups page (#2310)
* feat: added pagination for lazy loading in the /groups route to load the discord groups asynchrounously instead of all at once * feat: Implement pagination for lazy loading in - Added feature-flag-based () lazy loading to . - Introduced support for , , and __TEXT __DATA __OBJC others dec hex query parameters for pagination. - Validated query parameters and returned structured pagination metadata (, __TEXT __DATA __OBJC others dec hex, , ). - Updated response structure to include enriched group membership information. - Modified test cases in : - Added tests for cursor-based lazy loading behavior. - Handled scenarios with and without cursors. - Verified error handling for database query failures. * fix: test cases * fix: correct paginated group roles endpoint and dynamic link generation - Fixed incorrect and link generation in the endpoint. - Ensured dynamically includes the correct path (). - Dynamically constructed and links using and . - Refactored function: - Simplified conditional logic for feature flag. - Added error handling for invalid page and size parameters. - Removed hardcoding of URLs in response links to make them adaptive to the environment. - Improved logging for easier debugging when issues arise. - Added handling to ensure old behavior (non-dev mode) works as expected. * test: added test for the validateLazyLoadingParams * chore remove test from here as moving tests in a different PR * fix: failing tests * test: added test for getPaginatedGroupRolesByPage model functions * test: add tests for getPaginatedAllGroupRoles function in the controller * chore: remove comments from the code --------- Co-authored-by: Vikas Singh <[email protected]>
- Loading branch information
1 parent
9a75c3c
commit a9bdb4d
Showing
3 changed files
with
233 additions
and
10 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
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