mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
remove old checks
This commit is contained in:
parent
d660efe9fa
commit
44bf0a69ca
@ -61,10 +61,8 @@ suite('Caching', function() {
|
|||||||
context.fillStyle = 'green';
|
context.fillStyle = 'green';
|
||||||
context.fill();
|
context.fill();
|
||||||
|
|
||||||
if (!window.isPhantomJS) {
|
compareLayerAndCanvas(layer, canvas, 200);
|
||||||
compareLayerAndCanvas(layer, canvas, 200);
|
cloneAndCompareLayer(layer, 150);
|
||||||
cloneAndCompareLayer(layer, 150);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('cache rectangle with fill and stroke', function() {
|
test('cache rectangle with fill and stroke', function() {
|
||||||
@ -178,9 +176,7 @@ suite('Caching', function() {
|
|||||||
layer.add(rect);
|
layer.add(rect);
|
||||||
stage.add(layer);
|
stage.add(layer);
|
||||||
|
|
||||||
if (!window.isPhantomJS) {
|
|
||||||
cloneAndCompareLayer(layer, 10);
|
cloneAndCompareLayer(layer, 10);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('cache rectangle with fill and simple shadow', function() {
|
test('cache rectangle with fill and simple shadow', function() {
|
||||||
@ -390,9 +386,7 @@ suite('Caching', function() {
|
|||||||
|
|
||||||
layer.add(group);
|
layer.add(group);
|
||||||
stage.add(layer);
|
stage.add(layer);
|
||||||
if (!window.isPhantomJS) {
|
|
||||||
cloneAndCompareLayer(layer, 200);
|
cloneAndCompareLayer(layer, 200);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('cache group with several shape with transform', function() {
|
test('cache group with several shape with transform', function() {
|
||||||
|
@ -804,9 +804,7 @@ suite('Shape', function() {
|
|||||||
context.strokeStyle = 'black';
|
context.strokeStyle = 'black';
|
||||||
context.strokeText('Test TEXT', 50, 75);
|
context.strokeText('Test TEXT', 50, 75);
|
||||||
|
|
||||||
if (!window.isPhantomJS) {
|
compareLayerAndCanvas(layer, canvas, 254);
|
||||||
compareLayerAndCanvas(layer, canvas, 254);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// ======================================================
|
// ======================================================
|
||||||
@ -1440,9 +1438,7 @@ suite('Shape', function() {
|
|||||||
layer2.add(rect2);
|
layer2.add(rect2);
|
||||||
stage.add(layer2);
|
stage.add(layer2);
|
||||||
|
|
||||||
if (!window.isPhantomJS) {
|
compareLayers(layer1, layer2, 30);
|
||||||
compareLayers(layer1, layer2, 30);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// ======================================================
|
// ======================================================
|
||||||
|
@ -21,9 +21,7 @@ suite('Filter', function() {
|
|||||||
circle.blurRadius(0);
|
circle.blurRadius(0);
|
||||||
layer.draw();
|
layer.draw();
|
||||||
|
|
||||||
if (!window.isPhantomJS) {
|
cloneAndCompareLayer(layer, 50);
|
||||||
cloneAndCompareLayer(layer, 50);
|
|
||||||
}
|
|
||||||
Konva.pixelRatio = 1;
|
Konva.pixelRatio = 1;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -111,8 +111,6 @@ suite('Blob', function() {
|
|||||||
layer.add(blob);
|
layer.add(blob);
|
||||||
stage.add(layer);
|
stage.add(layer);
|
||||||
|
|
||||||
if (!window.isPhantomJS) {
|
cloneAndCompareLayer(layer, 100);
|
||||||
cloneAndCompareLayer(layer, 100);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -142,9 +142,8 @@ suite('RegularPolygon', function() {
|
|||||||
height: 100,
|
height: 100,
|
||||||
width: 100
|
width: 100
|
||||||
});
|
});
|
||||||
if (!window.isPhantomJS) {
|
|
||||||
cloneAndCompareLayer(layer, 254);
|
cloneAndCompareLayer(layer, 254);
|
||||||
}
|
|
||||||
Konva.pixelRatio = undefined;
|
Konva.pixelRatio = undefined;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -140,9 +140,7 @@ suite('Text', function() {
|
|||||||
layer2.add(text1.clone().cache({ pixelRatio: 2 }));
|
layer2.add(text1.clone().cache({ pixelRatio: 2 }));
|
||||||
stage.add(layer1, layer2);
|
stage.add(layer1, layer2);
|
||||||
|
|
||||||
if (!window.isPhantomJS) {
|
compareLayers(layer1, layer2, 220);
|
||||||
compareLayers(layer1, layer2, 220);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('text cache with fill and shadow and some scale', function() {
|
test('text cache with fill and shadow and some scale', function() {
|
||||||
@ -745,7 +743,7 @@ suite('Text', function() {
|
|||||||
x: 10,
|
x: 10,
|
||||||
fillLinearGradientStartPoint: { x: 0, y: 0 },
|
fillLinearGradientStartPoint: { x: 0, y: 0 },
|
||||||
fillLinearGradientEndPoint: { x: 300, y: 0 },
|
fillLinearGradientEndPoint: { x: 300, y: 0 },
|
||||||
fillLinearGradientColorStops: [0, 'yellow', 0.5, 'yellow', 1, 'red'],
|
fillLinearGradientColorStops: [0, 'yellow', 1, 'red'],
|
||||||
text: 'Text with gradient!!',
|
text: 'Text with gradient!!',
|
||||||
draggable: true
|
draggable: true
|
||||||
});
|
});
|
||||||
@ -761,7 +759,7 @@ suite('Text', function() {
|
|||||||
|
|
||||||
var start = { x: 0, y: 0 };
|
var start = { x: 0, y: 0 };
|
||||||
var end = { x: 300, y: 0 };
|
var end = { x: 300, y: 0 };
|
||||||
var colorStops = [0, 'yellow', 0.5, 'yellow', 1, 'red'];
|
var colorStops = [0, 'yellow', 1, 'red'];
|
||||||
var grd = ctx.createLinearGradient(start.x, start.y, end.x, end.y);
|
var grd = ctx.createLinearGradient(start.x, start.y, end.x, end.y);
|
||||||
|
|
||||||
// build color stops
|
// build color stops
|
||||||
@ -772,11 +770,7 @@ suite('Text', function() {
|
|||||||
|
|
||||||
ctx.fillText(text.text(), text.x(), text.y() + text.fontSize() / 2);
|
ctx.fillText(text.text(), text.x(), text.y() + text.fontSize() / 2);
|
||||||
|
|
||||||
// TODO: why this doesn't work in CI
|
compareLayerAndCanvas(layer, canvas, 250);
|
||||||
// TODO: remove all isPhantomJS
|
|
||||||
if (!window.isPhantomJS) {
|
|
||||||
compareLayerAndCanvas(layer, canvas, 250);
|
|
||||||
}
|
|
||||||
// delete Konva.pixelRatio;
|
// delete Konva.pixelRatio;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user