@@ -683,7 +683,13 @@ describe('hover info on stacked subplots', function() {
683683 } ) ;
684684
685685 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 } ;
687693
688694 beforeEach ( function ( done ) {
689695 Plotly . plot ( createGraphDiv ( ) , mock . data , mock . layout ) . then ( done ) ;
@@ -727,11 +733,11 @@ describe('hover info on stacked subplots', function() {
727733 expect ( d3 . selectAll ( 'g.hovertext' ) . size ( ) ) . toEqual ( 3 ) ;
728734 var textNodes = d3 . selectAll ( 'g.hovertext' ) . selectAll ( 'text' ) ;
729735
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 ' ) ;
731737 expect ( textNodes [ 0 ] [ 1 ] . innerHTML ) . toEqual ( '1' ) ;
732- expect ( textNodes [ 1 ] [ 0 ] . innerHTML ) . toEqual ( 'trace 1 ' ) ;
738+ expect ( textNodes [ 1 ] [ 0 ] . innerHTML ) . toEqual ( 'Wh ' ) ;
733739 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... ' ) ;
735741 expect ( textNodes [ 2 ] [ 1 ] . innerHTML ) . toEqual ( '3' ) ;
736742 } ) ;
737743 } ) ;
0 commit comments