Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 14f676d

Browse files
committed
don't hover on kde, to avoid local vs CI discrepancies
... and still tests what we want to test
1 parent 8cf9e02 commit 14f676d

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

test/jasmine/tests/violin_test.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -492,26 +492,37 @@ describe('Test violin hover:', function() {
492492
}, {
493493
desc: 'orientation:h | hovermode;y',
494494
mock: require('@mocks/violin_grouped_horz-multicategory.json'),
495+
patch: function(fig) {
496+
// don't hover on kde, to avoid local vs CI discrepancies
497+
fig.data.forEach(function(t) {
498+
t.hoveron = 'violins';
499+
});
500+
return fig;
501+
},
495502
pos: [430, 130],
496-
nums: ['max: 0.9', 'min: 0.1', 'q1: 0.2', 'q3: 0.7', 'x: 0.7963605, kde: 0.445', 'median: 0.4'],
497-
name: ['', '', '', '', '', 'kale'],
503+
nums: ['max: 0.9', 'min: 0.1', 'q1: 0.2', 'q3: 0.7', 'median: 0.4'],
504+
name: ['', '', '', '', 'kale'],
498505
axis: '2018 - day 2',
499-
hOrder: [0, 4, 3, 5, 2, 1]
506+
hOrder: [0, 3, 4, 2, 1]
500507
}, {
501508
desc: 'orientation:h | hovermode:closest',
502509
mock: require('@mocks/violin_grouped_horz-multicategory.json'),
503510
patch: function(fig) {
511+
// don't hover on kde, to avoid local vs CI discrepancies
512+
fig.data.forEach(function(t) {
513+
t.hoveron = 'violins';
514+
});
504515
fig.layout.hovermode = 'closest';
505516
return fig;
506517
},
507518
pos: [430, 130],
508519
nums: [
509520
'(max: 0.9, 2018 - day 2)', '(min: 0.1, 2018 - day 2)',
510521
'(q1: 0.2, 2018 - day 2)', '(q3: 0.7, 2018 - day 2)',
511-
'(x: 0.7963605, kde: 0.445, 2018 - day 2)', '(median: 0.4, 2018 - day 2)'
522+
'(median: 0.4, 2018 - day 2)'
512523
],
513-
name: ['', '', '', '', '', 'kale'],
514-
hOrder: [0, 4, 3, 5, 2, 1]
524+
name: ['', '', '', '', 'kale'],
525+
hOrder: [0, 3, 4, 2, 1]
515526
}]
516527
.forEach(function(specs) {
517528
it('should generate correct hover labels ' + specs.desc, function(done) {

0 commit comments

Comments
 (0)