Skip to content

Commit d693e09

Browse files
committed
add jasmine tests
1 parent 33fd07d commit d693e09

File tree

2 files changed

+378
-1
lines changed

2 files changed

+378
-1
lines changed

test/jasmine/tests/gl2d_click_test.js

+26
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Plotly.register([
2323
require('@lib/contourgl')
2424
]);
2525

26+
var mock0 = require('@mocks/gl2d_scatter-continuous-clustering.json');
2627
var mock1 = require('@mocks/gl2d_14.json');
2728
var mock2 = require('@mocks/gl2d_pointcloud-basic.json');
2829

@@ -445,6 +446,31 @@ describe('Test hover and click interactions', function() {
445446
.then(done);
446447
});
447448

449+
it('@gl scatter3d should propagate marker colors to hover labels', function(done) {
450+
var _mock = Lib.extendDeep({}, mock0);
451+
_mock.layout.width = 800;
452+
_mock.layout.height = 600;
453+
454+
var run = makeRunner([700, 300], {
455+
x: 15075859,
456+
y: 79183,
457+
curveNumber: 0,
458+
pointNumber: 0,
459+
bgcolor: 'rgb(202, 178, 214)',
460+
bordercolor: 'rgb(68, 68, 68)',
461+
fontSize: 13,
462+
fontFamily: 'Arial',
463+
fontColor: 'rgb(68, 68, 68)'
464+
}, {
465+
msg: 'pointcloud'
466+
});
467+
468+
Plotly.newPlot(gd, _mock)
469+
.then(run)
470+
.catch(failTest)
471+
.then(done);
472+
});
473+
448474
it('@gl should output correct event data for heatmapgl', function(done) {
449475
var _mock = Lib.extendDeep({}, mock3);
450476
_mock.data[0].type = 'heatmapgl';

0 commit comments

Comments
 (0)