Skip to content

Commit 9a0af27

Browse files
committed
Update SPLOM tests
1 parent f4c9e6e commit 9a0af27

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/jasmine/tests/splom_test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -945,17 +945,17 @@ describe('Test splom interactions:', function() {
945945

946946
function assertDims(msg, w, h) {
947947
var canvas = gd._fullLayout._glcanvas;
948-
expect(canvas.node().width).toBe(w, msg + '| canvas width');
949-
expect(canvas.node().height).toBe(h, msg + '| canvas height');
948+
expect(canvas.node().width / 2).toBe(w, msg + '| canvas width');
949+
expect(canvas.node().height / 2).toBe(h, msg + '| canvas height');
950950

951951
var gl = canvas.data()[0].regl._gl;
952952
if(/Chrome\/78/.test(window.navigator.userAgent)) {
953953
// N.B. for some reason 4096 is the max dimension allowed by Chrome 78
954954
expect(gl.drawingBufferWidth).toBe(Math.min(w, 4096), msg + '| drawingBufferWidth');
955955
expect(gl.drawingBufferHeight).toBe(Math.min(h, 4096), msg + '| drawingBufferHeight');
956956
} else {
957-
expect(gl.drawingBufferWidth).toBe(w, msg + '| drawingBufferWidth');
958-
expect(gl.drawingBufferHeight).toBe(h, msg + '| drawingBufferHeight');
957+
expect(gl.drawingBufferWidth / 2).toBe(w, msg + '| drawingBufferWidth');
958+
expect(gl.drawingBufferHeight / 2).toBe(h, msg + '| drawingBufferHeight');
959959
}
960960
}
961961

@@ -1222,7 +1222,7 @@ describe('Test splom update switchboard:', function() {
12221222

12231223
expect(toPlainArray(scene.matrixOptions.color))
12241224
.toBeCloseToArray([31, 119, 180, 255], 1, 'base color');
1225-
expect(scene.matrixOptions.size).toBe(3, 'base size');
1225+
expect(scene.matrixOptions.size).toBe(6, 'base size');
12261226
expect(fullLayout.xaxis.range).toBeCloseToArray([0.851, 3.148], 1, 'base xrng');
12271227

12281228
return Plotly.restyle(gd, 'marker.color', 'black');
@@ -1302,7 +1302,7 @@ describe('Test splom update switchboard:', function() {
13021302
['draw', 1]
13031303
]);
13041304

1305-
expect(scene.matrixOptions.size).toBe(10, msg);
1305+
expect(scene.matrixOptions.size).toBe(20, msg);
13061306
expect(gd._fullLayout.xaxis.range)
13071307
.toBeCloseToArray([0.753, 3.246], 1, 'xrng ' + msg);
13081308

@@ -1320,7 +1320,7 @@ describe('Test splom update switchboard:', function() {
13201320
['draw', 1]
13211321
]);
13221322

1323-
expect(scene.matrixOptions.sizes).toBeCloseToArray([2, 5, 10], 1, msg);
1323+
expect(scene.matrixOptions.sizes).toBeCloseToArray([4, 10, 20], 1, msg);
13241324
expect(gd._fullLayout.xaxis.range)
13251325
.toBeCloseToArray([0.853, 3.235], 1, 'xrng ' + msg);
13261326

0 commit comments

Comments
 (0)