Add tests for Item#sendToBack & Item#bringToFront.

This commit is contained in:
Jonathan Puckey 2013-03-03 20:08:49 +01:00
parent 3cdb11fe36
commit 343dac35b1

View file

@ -143,6 +143,26 @@ test('insertBelow(item)', function() {
}, true);
});
test('sendToBack()', function() {
var project = paper.project;
var firstPath = new Path();
var secondPath = new Path();
secondPath.sendToBack();
equals(function() {
return secondPath.index == 0;
}, true);
});
test('bringToFront()', function() {
var project = paper.project;
var firstPath = new Path();
var secondPath = new Path();
firstPath.bringToFront();
equals(function() {
return firstPath.index == 1;
}, true);
});
test('isDescendant(item) / isAncestor(item)', function() {
var project = paper.project;
var path = new Path();