diff --git a/tests/js/manualTests.js b/tests/js/manualTests.js index dadee563..e86e3baf 100644 --- a/tests/js/manualTests.js +++ b/tests/js/manualTests.js @@ -1388,5 +1388,34 @@ Test.Modules.DRAG_AND_DROP = { stage.add(layer); + }, + '*transition stage width': function(containerId) { + var stage = new Kinetic.Stage({ + container: containerId, + width: 578, + height: 200 + }); + + var layer = new Kinetic.Layer(); + + layer.canvas.element.style.backgroundColor = 'blue'; + + var rect = new Kinetic.Rect({ + x: 10, + y: 10, + width: 100, + height: 50, + fill: 'red' + }); + + layer.add(rect); + stage.add(layer); + + stage.transitionTo({ + width: 300, + duration: 2 + }); + + } }; diff --git a/tests/js/unit/stageTests.js b/tests/js/unit/stageTests.js index cb9283ac..2af34aa1 100644 --- a/tests/js/unit/stageTests.js +++ b/tests/js/unit/stageTests.js @@ -6,6 +6,7 @@ Test.Modules.STAGE = { height: 200 }); }, + 'instantiate stage with dom element': function(containerId) { var containerDom = document.getElementById(containerId); var stage = new Kinetic.Stage({