Skip to content
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

DCAT-2: Fix the usage score order #5

Merged
merged 1 commit into from
Jan 28, 2025
Merged

DCAT-2: Fix the usage score order #5

merged 1 commit into from
Jan 28, 2025

Conversation

eudoroolivares2016
Copy link
Contributor

@eudoroolivares2016 eudoroolivares2016 commented Jan 27, 2025

Overview

What is the feature?

Users expect that the usage sort method return the most utilized collection first. This is how results are sort on Earthdata Search. We should ensure there are aligned

What is the Solution?

Updated usage sort parameter to sort by most utilized first per

What areas of the application does this impact?

Sorting on the main data catalog page

Testing

Reproduction steps

  • **Environment for testing:Prod
  • **Collection to test with:Any
  1. On the search interface use the lp daac query parameter to search for lpdaac collections
  2. Ensure that when sorting by Usage that our results match those we'd expect from CMR/Earthdata search
  3. Ensure that navigating to http://localhost:5173/?keyword=lp%20daac&sort_key=-usage_score directly parses that url-parameter and sorts this the same way

Attachments

image

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@codecov-commenter
Copy link

codecov-commenter commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.79%. Comparing base (1920e11) to head (a9081fa).

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #5   +/-   ##
=======================================
  Coverage   99.79%   99.79%           
=======================================
  Files          22       22           
  Lines         487      488    +1     
  Branches      153      151    -2     
=======================================
+ Hits          486      487    +1     
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@eudoroolivares2016 eudoroolivares2016 marked this pull request as ready for review January 28, 2025 01:27
DCAT-2: Trying to ensure test passing

DCAT-2: Test removing the waitFor

DCAT-2: Use env var for more consistency

DCAT-2: Increase timeout that available to the waitFor

DCAT-2: Fix the usage score order
@@ -416,8 +416,8 @@ describe('DataCatalog', () => {

// Click the Next button
await waitFor(async () => {
await user.click(screen.getByRole('button', { name: 'Next' }))
})
await user.click(await screen.findByRole('button', { name: 'Next' }))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was getting timeout issues with this intermittently only on GA though

@eudoroolivares2016 eudoroolivares2016 merged commit b78f202 into main Jan 28, 2025
6 checks passed
@eudoroolivares2016 eudoroolivares2016 deleted the DCAT-2 branch January 28, 2025 17:14
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.

4 participants