Add failing test where after cloning a selected item, it isn't added to the Project#selectedItems array.

This commit is contained in:
Jonathan Puckey 2011-06-21 01:31:07 +02:00
parent 3a9da3c0a0
commit 4c306b9997

View file

@ -168,6 +168,36 @@ test('After simplifying a path using #simplify(), the path should stay fullySele
}, true);
});
test('After simplifying a path using #simplify(), the path should stay fullySelected', function() {
var path = new Path();
for (var i = 0; i < 30; i++) {
path.add(i * 10, 10);
};
path.fullySelected = true;
equals(function() {
return path.selected;
}, true);
path.simplify();
equals(function() {
return path.selected;
}, true);
equals(function() {
return path.fullySelected;
}, true);
});
test('After cloning a selected item, it should be added to the Project#selectedItems array', function() {
var path = new Path.Circle(new Size(80, 50), 35);
path.selected = true;
var copy = path.clone();
equals(function() {
return paper.project.selectedItems.length
}, 2);
});
test('After simplifying a path using #simplify(), the path should stay selected', function() {
var path = new Path();
for (var i = 0; i < 30; i++) {