@@ -683,7 +683,13 @@ describe('hover info on stacked subplots', function() {
683
683
} ) ;
684
684
685
685
describe ( 'hover info on stacked subplots with shared y-axis' , function ( ) {
686
- var mock = require ( '@mocks/stacked_subplots_shared_yaxis.json' ) ;
686
+ var mock = Lib . extendDeep ( require ( '@mocks/stacked_subplots_shared_yaxis.json' ) ) ;
687
+ mock . data [ 0 ] . name = 'Who put the bomp in the bomp bah bomp bah bomp' ;
688
+ mock . data [ 0 ] . hoverlabel = { namelength : - 1 } ;
689
+ mock . data [ 1 ] . name = 'Who put the ram in the rama lama ding dong' ;
690
+ mock . data [ 1 ] . hoverlabel = { namelength : [ 2 , 4 ] } ;
691
+ mock . data [ 2 ] . name = 'Who put the bop in the bop shoo bop shoo bop' ;
692
+ mock . layout . hoverlabel = { namelength : 10 } ;
687
693
688
694
beforeEach ( function ( done ) {
689
695
Plotly . plot ( createGraphDiv ( ) , mock . data , mock . layout ) . then ( done ) ;
@@ -727,11 +733,11 @@ describe('hover info on stacked subplots', function() {
727
733
expect ( d3 . selectAll ( 'g.hovertext' ) . size ( ) ) . toEqual ( 3 ) ;
728
734
var textNodes = d3 . selectAll ( 'g.hovertext' ) . selectAll ( 'text' ) ;
729
735
730
- expect ( textNodes [ 0 ] [ 0 ] . innerHTML ) . toEqual ( 'trace 0 ' ) ;
736
+ expect ( textNodes [ 0 ] [ 0 ] . innerHTML ) . toEqual ( 'Who put the bomp in the bomp bah bomp bah bomp ' ) ;
731
737
expect ( textNodes [ 0 ] [ 1 ] . innerHTML ) . toEqual ( '1' ) ;
732
- expect ( textNodes [ 1 ] [ 0 ] . innerHTML ) . toEqual ( 'trace 1 ' ) ;
738
+ expect ( textNodes [ 1 ] [ 0 ] . innerHTML ) . toEqual ( 'Wh ' ) ;
733
739
expect ( textNodes [ 1 ] [ 1 ] . innerHTML ) . toEqual ( '2.1' ) ;
734
- expect ( textNodes [ 2 ] [ 0 ] . innerHTML ) . toEqual ( 'trace 2 ' ) ;
740
+ expect ( textNodes [ 2 ] [ 0 ] . innerHTML ) . toEqual ( 'Who put... ' ) ;
735
741
expect ( textNodes [ 2 ] [ 1 ] . innerHTML ) . toEqual ( '3' ) ;
736
742
} ) ;
737
743
} ) ;
0 commit comments