Define failing test about Item cloning hierarchy.

Cloned items should be inserted right above their originals.
This commit is contained in:
Jürg Lehni 2013-07-19 18:10:58 -07:00
parent 588abe7189
commit 14888bca50

View file

@ -165,4 +165,16 @@ test('Group with clipmask', function() {
group = new Group([path, path2]);
group.clipped = true;
cloneAndCompare(group);
});
});
test('Item#clone() Hierarchy', function() {
var path1 = new Path.Circle([150, 150], 60);
var path2 = new Path.Circle([150, 150], 60);
var clone = path1.clone();
equals(function() {
return clone.isAbove(path1);
}, true);
equals(function() {
return clone.isBelow(path2);
}, true);
});