Skip to content

Migrate Tests to React Native Testing library #3170

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

Merged
merged 33 commits into from
Aug 18, 2021

Conversation

arpitBhalla
Copy link
Member

@arpitBhalla arpitBhalla commented Aug 10, 2021

What kind of change does this PR introduce?
Closes #2922
Migrate existing tests from enzyme to react native testing library. This is 4th and final PR for migration. Earlier PRs:- #3046, #3150, #3169

  • Accessory
  • Avatar
  • Badge
  • BottomSheet
  • Button
  • ButtonGroup
  • Card
  • CheckBox
  • Chip
  • Divider
  • FAB
  • FeaturedTile
  • Header
  • Icon
  • Image
  • Input
  • LinearProgress
  • ListItem
  • Overlay
  • PricingCard
  • SearchBar
  • SearchBar-android
  • SearchBar-default
  • SearchBar-ios
  • Slider
  • SocialIcon
  • SpeedDial
  • Switch
  • Text
  • ThemeProvider
  • Tile
  • Tooltip
  • colors
  • makeStyles
  • Tab
  • TabItem
  • withBadge
  • withTheme

Did you add tests for your changes?
Yes i have added few more test case as well.

If relevant, did you update the documentation?
Not required

Summary
Existing code uses enzyme for testing this PR would change it to react native testing library.
Related #2922

Does this PR introduce a breaking change?
No

Other information
GSoC task of @arpitBhalla

arpitBhalla and others added 12 commits July 18, 2021 18:57
Co-authored-by: Arpit Bhalla <68342121+arpit-bhalla@users.noreply.github.com>
Co-authored-by: Arpit Bhalla <68342121+arpit-bhalla@users.noreply.github.com>
Co-authored-by: Arpit Bhalla <68342121+arpit-bhalla@users.noreply.github.com>
Co-authored-by: Arpit Bhalla <68342121+arpit-bhalla@users.noreply.github.com>
Co-authored-by: Arpit Bhalla <68342121+arpit-bhalla@users.noreply.github.com>
Co-authored-by: Arpit Bhalla <68342121+arpit-bhalla@users.noreply.github.com>
Co-authored-by: Arpit Bhalla <68342121+arpit-bhalla@users.noreply.github.com>
Co-authored-by: Arpit Bhalla <68342121+arpit-bhalla@users.noreply.github.com>
Co-authored-by: Arpit Bhalla <68342121+arpit-bhalla@users.noreply.github.com>
Co-authored-by: Arpit Bhalla <68342121+arpit-bhalla@users.noreply.github.com>
Co-authored-by: Arpit Bhalla <68342121+arpit-bhalla@users.noreply.github.com>
@netlify
Copy link

netlify bot commented Aug 10, 2021

❌ Deploy Preview for react-native-elements failed.

🔨 Explore the source changes: e1812b0

🔍 Inspect the deploy log: https://app.netlify.com/sites/react-native-elements/deploys/611a882601bce70008c479ee

@codecov
Copy link

codecov bot commented Aug 10, 2021

Codecov Report

Merging #3170 (e1812b0) into next (4bb9449) will increase coverage by 3.38%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #3170      +/-   ##
==========================================
+ Coverage   80.53%   83.91%   +3.38%     
==========================================
  Files          80       80              
  Lines        1654     1654              
  Branches      692      693       +1     
==========================================
+ Hits         1332     1388      +56     
+ Misses        317      262      -55     
+ Partials        5        4       -1     
Impacted Files Coverage Δ
src/ButtonGroup/ButtonGroup.tsx 96.49% <ø> (-3.51%) ⬇️
src/Dialog/Dialog.tsx 100.00% <ø> (ø)
src/Divider/Divider.tsx 92.30% <ø> (-7.70%) ⬇️
src/FAB/FAB.tsx 100.00% <ø> (ø)
src/Header/Header.tsx 95.83% <ø> (+4.16%) ⬆️
src/Overlay/Overlay.tsx 100.00% <ø> (ø)
src/PricingCard/components/PricingButton.tsx 80.00% <ø> (-20.00%) ⬇️
src/Slider/Slider.tsx 73.80% <ø> (+13.33%) ⬆️
src/Slider/components/SliderThumb.tsx 100.00% <ø> (ø)
src/SpeedDial/SpeedDial.tsx 100.00% <ø> (ø)
... and 27 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bb9449...e1812b0. Read the comment docs.

@pranshuchittora pranshuchittora merged commit 1edab6e into react-native-elements:next Aug 18, 2021
@arpitBhalla arpitBhalla deleted the rn-testing4 branch December 20, 2021 07:38
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.

Migration of tests to React Native Testing Library
2 participants