@@ -4547,17 +4547,6 @@ describe('hovermode: (x|y)unified', function() {
4547
4547
} ) ;
4548
4548
}
4549
4549
4550
- function assertFont ( fontFamily , fontSize , fontColor ) {
4551
- var hover = getHoverLabel ( ) ;
4552
- var text = hover . select ( 'text.legendtext' ) ;
4553
- var node = text . node ( ) ;
4554
-
4555
- var textStyle = window . getComputedStyle ( node ) ;
4556
- expect ( textStyle . fontFamily . split ( ',' ) [ 0 ] ) . toBe ( fontFamily , 'wrong font family' ) ;
4557
- expect ( textStyle . fontSize ) . toBe ( fontSize , 'wrong font size' ) ;
4558
- expect ( textStyle . fill ) . toBe ( fontColor , 'wrong font color' ) ;
4559
- }
4560
-
4561
4550
it ( 'set smart defaults for spikeline in x unified' , function ( done ) {
4562
4551
Plotly . newPlot ( gd , [ { y : [ 4 , 6 , 5 ] } ] , { 'hovermode' : 'x unified' , 'xaxis' : { 'color' : 'red' } } )
4563
4552
. then ( function ( gd ) {
@@ -6011,6 +6000,17 @@ describe('hovermode: (x|y)unified', function() {
6011
6000
} ) ;
6012
6001
6013
6002
it ( 'should use hoverlabel.font or legend.font or layout.font' , function ( done ) {
6003
+ function assertFont ( fontFamily , fontSize , fontColor ) {
6004
+ var hover = getHoverLabel ( ) ;
6005
+ var text = hover . select ( 'text.legendtext' ) ;
6006
+ var node = text . node ( ) ;
6007
+
6008
+ var textStyle = window . getComputedStyle ( node ) ;
6009
+ expect ( textStyle . fontFamily . split ( ',' ) [ 0 ] ) . toBe ( fontFamily , 'wrong font family' ) ;
6010
+ expect ( textStyle . fontSize ) . toBe ( fontSize , 'wrong font size' ) ;
6011
+ expect ( textStyle . fill ) . toBe ( fontColor , 'wrong font color' ) ;
6012
+ }
6013
+
6014
6014
var mockCopy = Lib . extendDeep ( { } , mock ) ;
6015
6015
6016
6016
// Set layout.font
0 commit comments