Skip to content

Commit ea877ee

Browse files
committed
add hover tests with polar.hole>0
1 parent 8e5833d commit ea877ee

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

test/jasmine/tests/barpolar_test.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,24 @@ describe('Test barpolar hover:', function() {
274274
extraText: 'r: 12<br>θ: 120°',
275275
color: '#1f77b4'
276276
}
277+
}, {
278+
desc: 'works on a subplot with hole>0',
279+
traces: [{
280+
r: [1, 2, 3],
281+
theta: [0, 90, 180]
282+
}],
283+
layout: {
284+
polar: {hole: 0.2}
285+
},
286+
xval: 1,
287+
yval: 0,
288+
exp: {
289+
index: 0,
290+
x: 290.67,
291+
y: 200,
292+
extraText: 'r: 1<br>θ: 0°',
293+
color: '#1f77b4'
294+
}
277295
}, {
278296
desc: 'on overlapping bars of same size, the narrower wins',
279297
traces: [{

test/jasmine/tests/scatterpolar_test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,14 @@ describe('Test scatterpolar hover:', function() {
150150
pos: [465, 90],
151151
nums: 'r: 4\nθ: d',
152152
name: 'angular cate...'
153+
}, {
154+
desc: 'on a subplot with hole>0',
155+
patch: function(fig) {
156+
fig.layout.polar.hole = 0.2;
157+
return fig;
158+
},
159+
nums: 'r: 1.108937\nθ: 115.4969°',
160+
name: 'Trial 3'
153161
}]
154162
.forEach(function(specs) {
155163
it('should generate correct hover labels ' + specs.desc, function(done) {

0 commit comments

Comments
 (0)