Skip to content

Commit 89bf4db

Browse files
committed
Update scattergl_test pixel coordinates.
Default respolution is now double the prior value
1 parent d666f09 commit 89bf4db

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/jasmine/tests/scattergl_test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,26 +146,26 @@ describe('end-to-end scattergl tests', function() {
146146
return Plotly.restyle(gd, 'visible', 'legendonly');
147147
})
148148
.then(function() {
149-
expect(readPixel(gd.querySelector('.gl-canvas-context'), 108, 100)[0]).toBe(0);
149+
expect(readPixel(gd.querySelector('.gl-canvas-context'), 216, 200)[0]).toBe(0);
150150
assertDrawCall('legendonly', 0);
151151

152152
return Plotly.restyle(gd, 'visible', true);
153153
})
154154
.then(function() {
155-
expect(readPixel(gd.querySelector('.gl-canvas-context'), 108, 100)[0]).not.toBe(0);
155+
expect(readPixel(gd.querySelector('.gl-canvas-context'), 216, 200)[0]).not.toBe(0);
156156
assertDrawCall('back to visible', 1);
157157

158158
return Plotly.restyle(gd, 'visible', false);
159159
})
160160
.then(function() {
161-
expect(readPixel(gd.querySelector('.gl-canvas-context'), 108, 100)[0]).toBe(0);
161+
expect(readPixel(gd.querySelector('.gl-canvas-context'), 216, 200)[0]).toBe(0);
162162
assertDrawCall('visible false', 0);
163163

164164
return Plotly.restyle(gd, 'visible', true);
165165
})
166166
.then(function() {
167167
assertDrawCall('back up', 1);
168-
expect(readPixel(gd.querySelector('.gl-canvas-context'), 108, 100)[0]).not.toBe(0);
168+
expect(readPixel(gd.querySelector('.gl-canvas-context'), 216, 200)[0]).not.toBe(0);
169169
})
170170
.then(done, done.fail);
171171
});
@@ -346,12 +346,12 @@ describe('end-to-end scattergl tests', function() {
346346
Plotly.newPlot(gd, mock.data, mock.layout)
347347
.then(delay(1000))
348348
.then(function() {
349-
expect(readPixel(gd.querySelector('.gl-canvas-context'), 100, 80)[0]).not.toBe(0);
349+
expect(readPixel(gd.querySelector('.gl-canvas-context'), 200, 160)[0]).not.toBe(0);
350350

351351
return Plotly.restyle(gd, {fill: 'none'});
352352
})
353353
.then(function() {
354-
expect(readPixel(gd.querySelector('.gl-canvas-context'), 100, 80)[0]).toBe(0);
354+
expect(readPixel(gd.querySelector('.gl-canvas-context'), 200, 160)[0]).toBe(0);
355355
})
356356
.then(done, done.fail);
357357
});

0 commit comments

Comments
 (0)