Skip to content

Commit 9251311

Browse files
committed
Loosen test precision
1 parent 22112f9 commit 9251311

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

test/jasmine/assets/read_pixel.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
'use strict';
22

3-
module.exports = function(canvas, x, y) {
3+
module.exports = function(canvas, x, y, w, h) {
44
if(!canvas) return null;
55

6+
if(!w) w = 1;
7+
if(!h) h = 1;
8+
69
var gl = canvas.getContext('webgl');
710

8-
var pixels = new Uint8Array(4);
11+
var pixels = new Uint8Array(4 * w * h);
912

10-
gl.readPixels(x, y, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
13+
gl.readPixels(x, y, w, h, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
1114

1215
return pixels;
1316
};

test/jasmine/tests/gl_plot_interact_test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1582,8 +1582,9 @@ describe('Test gl2d plots', function() {
15821582
.then(done);
15831583
});
15841584

1585-
it('should be able to toggle visibility', function(done) {
1585+
fit('should be able to toggle visibility', function(done) {
15861586
var _mock = Lib.extendDeep({}, mock);
1587+
_mock.data[0].line.width = 5;
15871588

15881589
Plotly.plot(gd, _mock)
15891590
.then(delay(20))

0 commit comments

Comments
 (0)