Skip to content

Commit 36b4e25

Browse files
committed
update jasmine tests for new scattergl auto-ranges
1 parent 39ef5a9 commit 36b4e25

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

test/jasmine/tests/gl2d_click_test.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,11 +534,22 @@ describe('@gl Test hover and click interactions', function() {
534534

535535
describe('@noCI @gl Test gl2d lasso/select:', function() {
536536
var mockFancy = require('@mocks/gl2d_14.json');
537+
delete mockFancy.layout.xaxis.autorange;
538+
delete mockFancy.layout.yaxis.autorange;
539+
mockFancy.layout.xaxis.range = [-2.951309064136961, 2.0954721318818916];
540+
mockFancy.layout.yaxis.range = [-0.9248866483012275, 1.3232607344525835];
541+
537542
var mockFast = Lib.extendDeep({}, mockFancy, {
538543
data: [{mode: 'markers'}],
539544
layout: {
540-
xaxis: {type: 'linear'},
541-
yaxis: {type: 'linear'}
545+
xaxis: {
546+
type: 'linear',
547+
range: [-3.869222222222223, 73.55522222222223]
548+
},
549+
yaxis: {
550+
type: 'linear',
551+
range: [-0.7402222222222222, 17.144222222222222]
552+
}
542553
}
543554
});
544555

test/jasmine/tests/gl2d_plot_interact_test.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ describe('@gl Test gl plot side effects', function() {
209209

210210
describe('@gl Test gl2d plots', function() {
211211
var gd;
212-
213212
var mock = require('@mocks/gl2d_10.json');
214213

215214
beforeEach(function() {
@@ -255,9 +254,9 @@ describe('@gl Test gl2d plots', function() {
255254
var relayoutCallback = jasmine.createSpy('relayoutCallback');
256255

257256
var originalX = [-0.3037383177570093, 5.303738317757009];
258-
var originalY = [-0.5, 6.1];
259-
var newX = [-0.5, 5];
260-
var newY = [-1.7, 4.95];
257+
var originalY = [-0.5806379476536665, 6.218528262566369];
258+
var newX = [-0.5516431924882629, 5.082159624413145];
259+
var newY = [-1.7947747709072441, 5.004391439312791];
261260
var precision = 1;
262261

263262
Plotly.newPlot(gd, _mock)
@@ -584,8 +583,8 @@ describe('@gl Test gl2d plots', function() {
584583
});
585584
})
586585
.then(function() {
587-
expect(gd.layout.xaxis.range).toBeCloseToArray([-7.6, 23.6], 1);
588-
expect(gd.layout.yaxis.range).toBeCloseToArray([0.2, 15.8], 1);
586+
expect(gd.layout.xaxis.range).toBeCloseToArray([-8.2, 24.2], 1);
587+
expect(gd.layout.yaxis.range).toBeCloseToArray([-0.12, 16.1], 1);
589588
})
590589
.catch(fail)
591590
.then(done);

0 commit comments

Comments
 (0)