mirror of
https://github.com/konvajs/konva.git
synced 2025-09-19 19:07:59 +08:00
removed data url dependencies from functional tests
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@
|
|||||||
<p>atomated test counts updated on 06-02-2013</p>
|
<p>atomated test counts updated on 06-02-2013</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="unitTests.html">Unit Tests (724)</a></li>
|
<li><a href="unitTests.html">Unit Tests (724)</a></li>
|
||||||
<li><a href="functionalTests.html">Functional Tests (168)</a></li>
|
<li><a href="functionalTests.html">Functional Tests (171)</a></li>
|
||||||
<li><a href="integrationTests.html">Integration Tests (46)</a></li>
|
<li><a href="integrationTests.html">Integration Tests (46)</a></li>
|
||||||
<li><a href="manualTests.html">Manual Tests</a></li>
|
<li><a href="manualTests.html">Manual Tests</a></li>
|
||||||
<li><a href="performanceTests.html">Performance Tests</a></li>
|
<li><a href="performanceTests.html">Performance Tests</a></li>
|
||||||
|
@@ -28,7 +28,6 @@ Test.Modules.DD = {
|
|||||||
function remove() {
|
function remove() {
|
||||||
circle.remove();
|
circle.remove();
|
||||||
layer.draw();
|
layer.draw();
|
||||||
testDataUrl(layer.toDataURL(), 'cleared', 'canvas should be cleared after removing shape onclick');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
circle.on('click', function() {
|
circle.on('click', function() {
|
||||||
@@ -119,7 +118,6 @@ Test.Modules.DD = {
|
|||||||
events.push('mouseup');
|
events.push('mouseup');
|
||||||
});
|
});
|
||||||
|
|
||||||
testDataUrl(layer.toDataURL(), 'drag circle before', 'start data url is incorrect');
|
|
||||||
|
|
||||||
test(!Kinetic.Global.isDragging(), 'Global isDragging() should be false');
|
test(!Kinetic.Global.isDragging(), 'Global isDragging() should be false');
|
||||||
test(!Kinetic.Global.isDragReady(), 'Global isDragReady()) should be false');
|
test(!Kinetic.Global.isDragReady(), 'Global isDragReady()) should be false');
|
||||||
@@ -169,7 +167,15 @@ Test.Modules.DD = {
|
|||||||
test(!Kinetic.Global.isDragging(), 'Global isDragging() should be false');
|
test(!Kinetic.Global.isDragging(), 'Global isDragging() should be false');
|
||||||
test(!Kinetic.Global.isDragReady(), 'Global isDragReady()) should be false');
|
test(!Kinetic.Global.isDragReady(), 'Global isDragReady()) should be false');
|
||||||
|
|
||||||
testDataUrl(layer.toDataURL(), 'drag circle after', 'end data url is incorrect');
|
//console.log(greenCircle.getPosition());
|
||||||
|
//console.log(circle.getPosition());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
test(greenCircle.getX() === 40, 'green circle x should be 40');
|
||||||
|
test(greenCircle.getY() === 40, 'green circle y should be 40');
|
||||||
|
test(circle.getX() === 100, 'circle x should be 100');
|
||||||
|
test(circle.getY() === 100, 'circle y should be 100');
|
||||||
|
|
||||||
showHit(layer);
|
showHit(layer);
|
||||||
|
|
||||||
@@ -228,8 +234,6 @@ Test.Modules.DD = {
|
|||||||
events.push('mouseup');
|
events.push('mouseup');
|
||||||
});
|
});
|
||||||
|
|
||||||
testDataUrl(layer.toDataURL(), 'drag circle before', 'start data url is incorrect');
|
|
||||||
|
|
||||||
test(!Kinetic.Global.isDragging(), 'Global isDragging() should be false');
|
test(!Kinetic.Global.isDragging(), 'Global isDragging() should be false');
|
||||||
test(!Kinetic.Global.isDragReady(), 'Global isDragReady()) should be false');
|
test(!Kinetic.Global.isDragReady(), 'Global isDragReady()) should be false');
|
||||||
|
|
||||||
@@ -371,9 +375,6 @@ Test.Modules.DD = {
|
|||||||
|
|
||||||
var top = stage.content.getBoundingClientRect().top;
|
var top = stage.content.getBoundingClientRect().top;
|
||||||
|
|
||||||
//console.log(layer.toDataURL())
|
|
||||||
testDataUrl(layer.toDataURL(), 'drag layer before', 'start data url is incorrect');
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* simulate drag and drop
|
* simulate drag and drop
|
||||||
*/
|
*/
|
||||||
@@ -394,8 +395,10 @@ Test.Modules.DD = {
|
|||||||
});
|
});
|
||||||
Kinetic.DD._endDragAfter({dragEndNode:circle2});
|
Kinetic.DD._endDragAfter({dragEndNode:circle2});
|
||||||
|
|
||||||
//console.log(layer.toDataURL())
|
console.log(layer.getPosition())
|
||||||
testDataUrl(layer.toDataURL(), 'drag layer after', 'end data url is incorrect');
|
|
||||||
|
test(layer.getX() === -189, 'layer x should be -189');
|
||||||
|
test(layer.getY() === 13, 'layer y should be 13');
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -645,14 +648,16 @@ Test.Modules.EVENT = {
|
|||||||
|
|
||||||
var top = stage.content.getBoundingClientRect().top;
|
var top = stage.content.getBoundingClientRect().top;
|
||||||
|
|
||||||
testDataUrl(layer.toDataURL(), 'modify fill and stroke before', 'start data url is incorrect');
|
test(circle.getFill() === 'red', 'circle fill should be red');
|
||||||
|
test(circle.getStroke() === 'black', 'circle stroke should be black');
|
||||||
|
|
||||||
stage._mousemove({
|
stage._mousemove({
|
||||||
clientX: 377,
|
clientX: 377,
|
||||||
clientY: 101 + top
|
clientY: 101 + top
|
||||||
});
|
});
|
||||||
|
|
||||||
testDataUrl(layer.toDataURL(), 'modify fill and stroke after', 'mid data url is incorrect');
|
test(circle.getFill() === 'yellow', 'circle fill should be yellow');
|
||||||
|
test(circle.getStroke() === 'purple', 'circle stroke should be purple');
|
||||||
|
|
||||||
// move mouse back out of circle
|
// move mouse back out of circle
|
||||||
stage._mousemove({
|
stage._mousemove({
|
||||||
@@ -664,7 +669,8 @@ Test.Modules.EVENT = {
|
|||||||
clientY: 138 + top
|
clientY: 138 + top
|
||||||
});
|
});
|
||||||
|
|
||||||
testDataUrl(layer.toDataURL(), 'modify fill and stroke before', 'end data url is incorrect');
|
test(circle.getFill() === 'red', 'circle fill should be red');
|
||||||
|
test(circle.getStroke() === 'black', 'circle stroke should be black');
|
||||||
},
|
},
|
||||||
'mousedown mouseup mouseover mouseout mousemove click dblclick / touchstart touchend touchmove tap dbltap': function(containerId) {
|
'mousedown mouseup mouseover mouseout mousemove click dblclick / touchstart touchend touchmove tap dbltap': function(containerId) {
|
||||||
var stage = new Kinetic.Stage({
|
var stage = new Kinetic.Stage({
|
||||||
|
Reference in New Issue
Block a user