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

Migrate scigateway tests to testing-library #1273

Merged
merged 31 commits into from
Mar 23, 2023

Conversation

kennethnym
Copy link
Member

Description

This PR migrates every unit tests scigateway to testing-library. I also improved some of the existing tests as well.

Testing instructions

Add a set up instructions describing how the reviewer should test the code

  • Review code
  • Check Actions build
  • Review changes to test coverage

Agile board tracking

connect to #1265

@codecov
Copy link

codecov bot commented Mar 17, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.24 🎉

Comparison is base (7ac0f60) 96.76% compared to head (e2ce0b8) 97.01%.

❗ Current head e2ce0b8 differs from pull request most recent head 0a86e5c. Consider uploading reports for the commit 0a86e5c to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1273      +/-   ##
===========================================
+ Coverage    96.76%   97.01%   +0.24%     
===========================================
  Files           43       43              
  Lines         1609     1609              
  Branches       437      437              
===========================================
+ Hits          1557     1561       +4     
+ Misses          48       45       -3     
+ Partials         4        3       -1     
Impacted Files Coverage Δ
src/App.tsx 87.09% <ø> (+6.45%) ⬆️
src/loginPage/loginPage.component.tsx 96.45% <ø> (-2.13%) ⬇️
src/notifications/notificationBadge.component.tsx 100.00% <ø> (ø)
src/accessibilityPage/contactUs.component.tsx 100.00% <100.00%> (ø)

... and 7 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

- also remove the use of jest legacy fake timers
Copy link
Member

@louise-davies louise-davies left a comment

Choose a reason for hiding this comment

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

Overall looks good other than my minor comment. I added a couple of commits to 1) remove the spam from the test console I found when I ran the tests locally and 2) to recreate the test you skipped in App.test.tsx. Let me know your thoughts on my changes :)

src/tour/tour.component.test.tsx Outdated Show resolved Hide resolved
@kennethnym kennethnym merged commit 48dbb13 into develop Mar 23, 2023
@louise-davies louise-davies deleted the enhancement/rtl-migration branch March 23, 2023 16:10
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