@@ -60,11 +60,11 @@ describe('Test hover and click interactions', function() {
6060 ]
6161 ] ,
6262 'colorscale' : 'Jet' ,
63- 'contours' : {
63+ /* 'contours': {
6464 'start': 2,
6565 'end': 10,
6666 'size': 1
67- } ,
67+ },*/
6868 'uid' : 'ad5624' ,
6969 'zmin' : 0 ,
7070 'zmax' : 20
@@ -339,6 +339,44 @@ describe('Test hover and click interactions', function() {
339339
340340
341341 } ) ;
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+ } ) ;
342380 } ) ;
343381
344382 describe ( 'click event is fired on click' , function ( ) {
0 commit comments