@@ -60,11 +60,11 @@ describe('Test hover and click interactions', function() {
60
60
]
61
61
] ,
62
62
'colorscale' : 'Jet' ,
63
- 'contours' : {
63
+ /* 'contours': {
64
64
'start': 2,
65
65
'end': 10,
66
66
'size': 1
67
- } ,
67
+ },*/
68
68
'uid' : 'ad5624' ,
69
69
'zmin' : 0 ,
70
70
'zmax' : 20
@@ -339,6 +339,44 @@ describe('Test hover and click interactions', function() {
339
339
340
340
341
341
} ) ;
342
+
343
+ it ( 'contourgl' , function ( done ) {
344
+
345
+ var modifiedMockCopy = Lib . extendDeep ( { } , mock3 ) ;
346
+
347
+ Plotly . plot ( gd , modifiedMockCopy . data , modifiedMockCopy . layout )
348
+
349
+ . then ( new Promise ( function ( ) {
350
+
351
+ gd . on ( 'plotly_hover' , function ( data ) {
352
+ futureData = data ;
353
+ } ) ;
354
+
355
+ hover ( 540 , 150 ) ;
356
+
357
+ window . setTimeout ( function ( ) {
358
+
359
+ expect ( futureData . points . length ) . toEqual ( 1 ) ;
360
+
361
+ var pt = futureData . points [ 0 ] ;
362
+
363
+ expect ( Object . keys ( pt ) ) . toEqual ( [
364
+ 'x' , 'y' , 'curveNumber' , 'pointNumber' , 'data' , 'fullData' , 'xaxis' , 'yaxis'
365
+ ] ) ;
366
+
367
+ expect ( pt . x ) . toEqual ( 2 ) ;
368
+ expect ( pt . y ) . toEqual ( 3 ) ;
369
+ expect ( pt . curveNumber ) . toEqual ( 0 ) ;
370
+ expect ( pt . pointNumber ) . toEqual ( [ 2 , 3 , 17 ] ) ;
371
+ expect ( pt . fullData . length ) . toEqual ( 1 ) ;
372
+ expect ( typeof pt . data . uid ) . toEqual ( 'string' ) ;
373
+ expect ( pt . xaxis . domain . length ) . toEqual ( 2 ) ;
374
+ expect ( pt . yaxis . domain . length ) . toEqual ( 2 ) ;
375
+
376
+ done ( ) ;
377
+ } , 350 ) ;
378
+ } ) ) ;
379
+ } ) ;
342
380
} ) ;
343
381
344
382
describe ( 'click event is fired on click' , function ( ) {
0 commit comments