#509 Add price sorting support and integration tests for creator list price filter + sort combination#533
Merged
Chucks1093 merged 2 commits intoJun 27, 2026
Conversation
…r creator list price filter + sort combination
|
@T-kesh Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
3 tasks
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.
PR Description
#509 Add integration test for creator list price range filter combined with sort param
Summary
This PR adds support for sorting creators by price and includes integration tests to verify that price range filtering works correctly when combined with price sorting parameters.
Changes Made
Added 'price' to the CREATOR_LIST_SORT_FIELDS array to enable price-based sorting
2. Updated sort field mapping (creators.sort.ts)
Mapped 'price' to 'priceSnapshot' in the field mapping
Added special handling in mapCreatorListSort() to handle nested relation sorting on priceSnapshot.currentPrice
Ensures null prices are sorted last
3. Added integration tests (creator-list-price-filter.integration.test.ts)
Test for price range filter + sort=price&order=desc - verifies filtered results are sorted highest price first
Test for price range filter + sort=price&order=asc - verifies filtered results are sorted lowest price first
Test to verify creators outside range are excluded regardless of sort position
Acceptance Criteria Met
✅ Only creators within the price range are returned
✅ Results are sorted by price descending within the filtered set
✅ Creators outside the range are absent regardless of their sort position
Testing
The tests use existing test data (3 creators with prices 1M, 3M, 5M stroops) and verify that when filtering to a range like [2M, 4M], only the 3M creator appears and is correctly sorted.
closes #509