Skip to content

Commit 5243590

Browse files
committed
modif update data in click test so that text bboxs aren't an issue
1 parent 0e53d32 commit 5243590

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/jasmine/tests/click_test.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,13 @@ describe('Test click interactions:', function() {
197197
});
198198

199199
it('when set to \'reset+autorange\' (the default) should follow updated auto ranges', function(done) {
200-
var newAutoRangeX = [-3.004307330498139, 2.0373089852019897],
201-
newAutoRangeY = [-0.8770465137596604, 1.275194639444453];
200+
var updateData = {
201+
x: [[1e-4, 0, 1e3]],
202+
y: [[30, 0, 30]]
203+
};
204+
205+
var newAutoRangeX = [-4.482371794871794, 3.4823717948717943],
206+
newAutoRangeY = [-0.8892256657741471, 1.6689872212461876];
202207

203208
Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(function() {
204209
expect(gd.layout.xaxis.range).toBeCloseToArray(autoRangeX);
@@ -209,7 +214,7 @@ describe('Test click interactions:', function() {
209214
expect(gd.layout.xaxis.range).toBeCloseToArray(zoomRangeX);
210215
expect(gd.layout.yaxis.range).toBeCloseToArray(zoomRangeY);
211216

212-
return Plotly.restyle(gd, 'y', [[1, 2, 1]]);
217+
return Plotly.restyle(gd, updateData);
213218
}).then(function() {
214219
expect(gd.layout.xaxis.range).toBeCloseToArray(zoomRangeX);
215220
expect(gd.layout.yaxis.range).toBeCloseToArray(zoomRangeY);

0 commit comments

Comments
 (0)