Skip to content

Commit 7e44c9c

Browse files
committed
add boxmode: 'overlay' hover test case
1 parent 9ca410a commit 7e44c9c

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

test/jasmine/tests/box_test.js

+19-6
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,7 @@ describe('Test box hover:', function() {
180180
desc: 'base',
181181
nums: ['0.55', '0', '0.3', '0.6', '0.7'],
182182
name: ['radishes', '', '', '', ''],
183-
axis: 'day 1',
184-
183+
axis: 'day 1'
185184
}, {
186185
desc: 'with mean',
187186
patch: function(fig) {
@@ -192,8 +191,7 @@ describe('Test box hover:', function() {
192191
},
193192
nums: ['0.55', '0', '0.3', '0.6', '0.7', '0.45'],
194193
name: ['radishes', '', '', '', '', ''],
195-
axis: 'day 1',
196-
194+
axis: 'day 1'
197195
}, {
198196
desc: 'with sd',
199197
patch: function(fig) {
@@ -204,14 +202,29 @@ describe('Test box hover:', function() {
204202
},
205203
nums: ['0.55', '0', '0.3', '0.6', '0.7', '0.45 ± 0.2362908'],
206204
name: ['radishes', '', '', '', '', ''],
207-
axis: 'day 1',
205+
axis: 'day 1'
208206
}, {
209207
desc: 'with boxpoints fences',
210208
mock: require('@mocks/boxplots_outliercolordflt.json'),
211209
pos: [350, 200],
212210
nums: ['8.15', '0.75', '6.8', '10.25', '23.25', '5.25', '12'],
213211
name: ['', '', '', '', '', '', ''],
214-
axis: 'trace 0',
212+
axis: 'trace 0'
213+
}, {
214+
desc: 'with overlaid boxes',
215+
patch: function(fig) {
216+
fig.layout.boxmode = 'overlay';
217+
return fig;
218+
},
219+
nums: [
220+
'0.3', '0.45', '0.6', '1', '0.55', '0.2',
221+
'0.6', '0.7', '0.45', '0.1', '0.6', '0.9'
222+
],
223+
name: [
224+
'', 'kale', '', '', 'radishes', '',
225+
'', '', 'carrots', '', '', ''
226+
],
227+
axis: 'day 1'
215228
}, {
216229
desc: 'hoveron points | hovermode closest',
217230
patch: function(fig) {

0 commit comments

Comments
 (0)