joshwcomeau / guppy

🐠A friendly application manager and task runner for React.js
ISC License
3.27k stars 154 forks source link

Test for button components #346

Closed AWolf81 closed 5 years ago

AWolf81 commented 5 years ago

Related Issue:

309

Summary: Most test cases are snapshot tests. For testing styled-components I've used mount so the styles are available in the snapshot. Not sure if there is a better way to test them but I think that's OK.

Added unit tests for:

@idoberko2 would be awesome if you could also review these tests and let me know if there is something to improve.

I think next I'll add tests for EjectButton & BigClickableButton & for ProjectConfigurationModal. Probably in two PRs to separate them a bit as the ProjectConfigurationModal has more to test.

codecov[bot] commented 5 years ago

Codecov Report

Merging #346 into master will increase coverage by 1.53%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #346      +/-   ##
==========================================
+ Coverage   24.91%   26.44%   +1.53%     
==========================================
  Files         152      152              
  Lines        3625     3608      -17     
  Branches      388      389       +1     
==========================================
+ Hits          903      954      +51     
+ Misses       2450     2399      -51     
+ Partials      272      255      -17
Impacted Files Coverage Δ
src/components/Button/FillButton.js 100% <100%> (+100%) :arrow_up:
src/components/Button/ButtonBase.js 100% <100%> (+100%) :arrow_up:
src/components/Button/StrokeButton.js 100% <100%> (+100%) :arrow_up:
src/components/ButtonWithIcon/ButtonWithIcon.js 100% <0%> (+100%) :arrow_up:
AWolf81 commented 5 years ago

@idoberko2 OK, I've changed the points from your comments. Have I addressed everything?

How is your progress of the Modal test?