File tree 1 file changed +25
-0
lines changed 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,31 @@ describe('hover info', function() {
244
244
} ) ;
245
245
} ) ;
246
246
247
+ describe ( 'hover info none' , function ( ) {
248
+ var mockCopy = Lib . extendDeep ( { } , mock ) ;
249
+
250
+ mockCopy . data [ 0 ] . hoverinfo = 'none' ;
251
+
252
+ beforeEach ( function ( done ) {
253
+ Plotly . plot ( createGraphDiv ( ) , mockCopy . data , mockCopy . layout ) . then ( done ) ;
254
+ } ) ;
255
+
256
+ it ( 'does not render if hover is set to none' , function ( ) {
257
+ var gd = document . getElementById ( 'graph' ) ;
258
+ Fx . hover ( 'graph' , evt , 'xy' ) ;
259
+
260
+ var hoverTrace = gd . _hoverdata [ 0 ] ;
261
+
262
+ expect ( hoverTrace . curveNumber ) . toEqual ( 0 ) ;
263
+ expect ( hoverTrace . pointNumber ) . toEqual ( 17 ) ;
264
+ expect ( hoverTrace . x ) . toEqual ( 0.388 ) ;
265
+ expect ( hoverTrace . y ) . toEqual ( 1 ) ;
266
+
267
+ expect ( d3 . selectAll ( 'g.axistext' ) . size ( ) ) . toEqual ( 0 ) ;
268
+ expect ( d3 . selectAll ( 'g.hovertext' ) . size ( ) ) . toEqual ( 0 ) ;
269
+ } ) ;
270
+ } ) ;
271
+
247
272
describe ( 'hoverformat' , function ( ) {
248
273
249
274
var data = [ {
You can’t perform that action at this time.
0 commit comments