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

Improve test coverage #298

Merged
merged 4 commits into from
Feb 23, 2024
Merged

Improve test coverage #298

merged 4 commits into from
Feb 23, 2024

Conversation

brianlove
Copy link
Contributor

  • Add tests for the filter/selection panel on the main dashboard testing changing the research field, switching to list view, adjusting the sort criteria and graphs, filtering by programming language and license, and finally resetting the filters
  • Don't run test coverage over pages since we test the components separately
  • Relocate the src/components/utils.js file to a new src/util/ directory since utilities aren't really components
  • Update deprecated and typoed props, testing dependencies, and the browserslist database

Relocate the utils file to its own directory instead of being in
`src/components/`.  Don't test the pages directory since we test
individual components on their own.
Update deprecated and typoed props, testing dependencies, and the
browserslist database.
Add some initial tests for the main dashboard page, checking that the
research field dropdown and summary/list view toggle work correctly.

Specify a port for the dev server to avoid conflicts with other apps.
@brianlove brianlove requested a review from jmelot February 21, 2024 18:38
@brianlove brianlove self-assigned this Feb 21, 2024
Copy link

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
549 167 30% 0% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: 753a65f by action🐍

Copy link

JavaScript Coverage

Summary

Lines Statements Branches Functions
Coverage: 81%
81.7% (384/470) 69.23% (198/286) 82.17% (83/101)
Modified Files • (81%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files81.769.2382.1781.12 
components78.5768.7279.0177.9 
   dashboard.js92.182.3596.9692.25128, 169, 218, 243, 270, 276, 295, 298, 305, 308, 414
   project_card.js84.617010084.6182, 88
   project_details.js000029–264
   project_metadata.js10094.1110010041
   summary.js77.1465.958575.75117–122, 241–251, 259, 274, 285
util94.5674.079595.18 
   index.js94.574.0794.7395.12141, 170, 179, 183
   testing.js100100100100 

Copy link
Contributor

@jmelot jmelot left a comment

Choose a reason for hiding this comment

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

Nice! Thank you! As discussed, we'll eventually want to update to make the tests more robust to changes in data, but this works for now

@jmelot jmelot merged commit dfe3065 into main Feb 23, 2024
3 checks passed
@jmelot jmelot deleted the improve-tests branch February 23, 2024 13:19
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.

2 participants