Skip to content

Commit

Permalink
Add test image and test for non-animatable properties
Browse files Browse the repository at this point in the history
  • Loading branch information
nvh committed Sep 15, 2016
1 parent 66801fc commit 44b09ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Binary file added test/phantomjs/static/test2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions test/tests/LayerStatesTest.coffee
Expand Up @@ -94,6 +94,13 @@ describe "LayerStates", ->
layer.animateTo 'stateA', instant: true
layer.html.should.equal "fff"

it "should switch non animatable properties", ->
layer = new Layer
layer.states.stateA = {x: 100, image:"static/test2.png"}
layer.animateTo 'stateA', instant: true
layer.x.should.equal 100
layer.image.should.equal "static/test2.png"

it "should not convert html to a color value if used in a state", ->
layer = new Layer
layer.states.stateA = {x: 100, html: 'aaa'}
Expand Down

0 comments on commit 44b09ae

Please sign in to comment.