Tests needed for Css.Transitions
#324 implemented CSS transitions. Great start!
However, we need lots of tests before these can be released with any confidence. 😄
Anyone interested in contributing some?
Hi there! I would like to contribute here. Let me know how best to start on this?
I've started going through transitions source and tests for other modules.
Awesome, thanks @tsawan!
The module just had documentation merged in https://github.com/rtfeldman/elm-css/pull/382 in case those are helpful!
@rtfeldman please have a look at this gist and let me know if I am on the right track. note that I had to change Transitions source to export Transition(..), Animatable(..), propToString, durationTransition.
https://gist.github.com/tsawan/059301b64d5220fdecc26cd35a822d66
@rtfeldman I guess exposing durationTransition was a mistake since I should only be testing public API. Let me know if it's ok to export propToString and timingFunctionToString helper functions from the Transitions.elm so I can try to finish this off?
@tsawan Thank you for this, and really sorry I took so long responding!
I would definitely not change the exposing of the module. What I'd do instead is to render a trivial stylesheet all the way to a String (e.g. "p { background-color: blue; }) and then test the compiled string.
Check out expectPropertyWorks in tests/Properties.elm - I'd start by copying that, and then modifying it for your purposes!
@rtfeldman I am a bit stuck on tests for functions that take TimingFunction (e.g,. background3). Since Css.Transitions.TimingFunction is not exposed, I can't add type signatures.
@rtfeldman PR submitted.