Skip to content

Commit 8e45b14

Browse files
barpolar and scatterternary tests
1 parent 1d989fb commit 8e45b14

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

test/jasmine/tests/barpolar_test.js

+16
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,22 @@ describe('Test barpolar hover:', function() {
115115
extraText: 'r: 1<br>θ: 0°',
116116
color: '#1f77b4'
117117
}
118+
}, {
119+
desc: 'hovertemplate',
120+
traces: [{
121+
r: [1, 2, 3],
122+
theta: [0, 90, 180],
123+
hovertemplate: 'tpl',
124+
}],
125+
xval: 1,
126+
yval: 0,
127+
exp: {
128+
index: 0,
129+
x: 263.33,
130+
y: 200,
131+
hovertemplate: 'tpl',
132+
color: '#1f77b4'
133+
}
118134
}, {
119135
desc: 'with custom text scalar',
120136
traces: [{

test/jasmine/tests/scatterternary_test.js

+16
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,22 @@ describe('scatterternary hover', function() {
402402
.then(done);
403403
});
404404

405+
it('should pass along hovertemplate on hover', function(done) {
406+
var xval = 0.42;
407+
var yval = 0.37;
408+
var hovermode = 'closest';
409+
var scatterPointData;
410+
Plotly.restyle(gd, {
411+
hovertemplate: 'tpl'
412+
})
413+
.then(function() {
414+
scatterPointData = _hover(gd, xval, yval, hovermode);
415+
expect(scatterPointData[0].hovertemplate).toEqual('tpl');
416+
})
417+
.catch(failTest)
418+
.then(done);
419+
});
420+
405421
});
406422

407423
describe('Test scatterternary *cliponaxis*', function() {

0 commit comments

Comments
 (0)