Skip to content

#509 Add price sorting support and integration tests for creator list price filter + sort combination#533

Merged
Chucks1093 merged 2 commits into
accesslayerorg:mainfrom
T-kesh:feature/509-price-sort-filter-integration-test
Jun 27, 2026
Merged

#509 Add price sorting support and integration tests for creator list price filter + sort combination#533
Chucks1093 merged 2 commits into
accesslayerorg:mainfrom
T-kesh:feature/509-price-sort-filter-integration-test

Conversation

@T-kesh

@T-kesh T-kesh commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

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

  1. Added price sort field to constants (creator-list-sort.constants.ts)

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

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@Chucks1093 Chucks1093 merged commit 952d8d0 into accesslayerorg:main Jun 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add integration test for creator list price range filter combined with sort param

2 participants