@@ -378,6 +378,37 @@ describe('Test gl3d plots', function() {
378378 . then ( done ) ;
379379 } ) ;
380380
381+ it ( '@gl should display correct hover labels and emit correct event data (surface case with connectgaps enabled)' , function ( done ) {
382+ var surfaceConnectgaps = require ( '@mocks/gl3d_surface_connectgaps' ) ;
383+ var _mock = Lib . extendDeep ( { } , surfaceConnectgaps ) ;
384+
385+ function _hover ( ) {
386+ mouseEvent ( 'mouseover' , 300 , 200 ) ;
387+ return delay ( 20 ) ( ) ;
388+ }
389+
390+ Plotly . plot ( gd , _mock )
391+ . then ( delay ( 20 ) )
392+ . then ( function ( ) {
393+ gd . on ( 'plotly_hover' , function ( eventData ) {
394+ ptData = eventData . points [ 0 ] ;
395+ } ) ;
396+ } )
397+ . then ( _hover )
398+ . then ( function ( ) {
399+ assertHoverText ( 'x: 0.2' , 'y: 2' , 'z: 1,001.25' ) ;
400+ assertEventData ( 0.2 , 2 , 1001.25 , 0 , [ 1 , 2 ] ) ;
401+ assertHoverLabelStyle ( d3 . selectAll ( 'g.hovertext' ) , {
402+ bgcolor : 'rgb(68, 68, 68)' ,
403+ bordercolor : 'rgb(255, 255, 255)' ,
404+ fontSize : 13 ,
405+ fontFamily : 'Arial' ,
406+ fontColor : 'rgb(255, 255, 255)'
407+ } , 'initial' ) ;
408+ } )
409+ . then ( done ) ;
410+ } ) ;
411+
381412 it ( '@gl should display correct hover labels and emit correct event data (surface case)' , function ( done ) {
382413 var _mock = Lib . extendDeep ( { } , mock3 ) ;
383414
0 commit comments