Skip to content

Commit 839db41

Browse files
committed
Move tests to gl-specific file
1 parent 5297bf1 commit 839db41

File tree

2 files changed

+35
-27
lines changed

2 files changed

+35
-27
lines changed

test/jasmine/tests/gl_plot_interact_test.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,3 +414,38 @@ describe('Test gl plot interactions', function() {
414414
});
415415
});
416416
});
417+
418+
describe('Test gl plot side effects', function() {
419+
describe('when present with rangeslider', function() {
420+
421+
var gd;
422+
423+
beforeEach(function() {
424+
gd = createGraphDiv();
425+
});
426+
427+
afterEach(destroyGraphDiv);
428+
429+
it('should not draw the rangeslider', function(done) {
430+
var data = [{
431+
x: [1,2,3],
432+
y: [2,3,4],
433+
type: 'scattergl'
434+
}, {
435+
x: [1,2,3],
436+
y: [2,3,4],
437+
type: 'scatter'
438+
}];
439+
440+
var layout = {
441+
xaxis: { rangeslider: { visible: true } }
442+
};
443+
444+
Plotly.plot(gd, data, layout).then(function() {
445+
var rangeSlider = document.getElementsByClassName('range-slider')[0];
446+
expect(rangeSlider).not.toBeDefined();
447+
done();
448+
});
449+
});
450+
});
451+
});

test/jasmine/tests/range_slider_test.js

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -308,33 +308,6 @@ describe('the range slider', function() {
308308
expect(layoutOut).toEqual(expected);
309309
});
310310
});
311-
312-
describe('when used with gl traces', function() {
313-
314-
beforeEach(function() {
315-
gd = createGraphDiv();
316-
});
317-
318-
afterEach(destroyGraphDiv);
319-
320-
it('should not be drawn with GL2d', function(done) {
321-
var data = [{
322-
x: [1,2,3],
323-
y: [2,3,4],
324-
type: 'scattergl'
325-
}, {
326-
x: [1,2,3],
327-
y: [2,3,4],
328-
type: 'scattergl'
329-
}];
330-
331-
Plotly.plot(gd, data, mock.layout).then(function() {
332-
rangeSlider = document.getElementsByClassName('range-slider')[0];
333-
expect(rangeSlider).not.toBeDefined();
334-
done();
335-
});
336-
});
337-
});
338311
});
339312

340313

0 commit comments

Comments
 (0)