File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ var assertHoverLabelStyle = customAssertions.assertHoverLabelStyle;
1313var assertHoverLabelContent = customAssertions . assertHoverLabelContent ;
1414
1515var mock = require ( '@mocks/gl3d_marker-arrays.json' ) ;
16+ var mesh3dcoloringMock = require ( '@mocks/gl3d_mesh3d_coloring.json' ) ;
1617var multipleScatter3dMock = require ( '@mocks/gl3d_multiple-scatter3d-traces.json' ) ;
1718
1819// lines, markers, text, error bars and surfaces each
@@ -544,6 +545,59 @@ describe('Test gl3d trace click/hover:', function() {
544545 . then ( done ) ;
545546 } ) ;
546547
548+ it ( '@gl should display correct face colors' , function ( done ) {
549+ var fig = mesh3dcoloringMock ;
550+
551+ Plotly . newPlot ( gd , fig )
552+ . then ( delay ( 20 ) )
553+ . then ( function ( ) { mouseEvent ( 'mouseover' , 200 , 200 ) ; } )
554+ . then ( delay ( 20 ) )
555+ . then ( function ( ) {
556+ assertHoverText (
557+ 'x: 1' ,
558+ 'y: 0' ,
559+ 'z: 1' ,
560+ 'face color: #0F0' ,
561+ 'face color'
562+ ) ;
563+ } )
564+ . then ( function ( ) { mouseEvent ( 'mouseover' , 300 , 200 ) ; } )
565+ . then ( delay ( 20 ) )
566+ . then ( function ( ) {
567+ assertHoverText (
568+ 'x: 1' ,
569+ 'y: 1' ,
570+ 'z: 1' ,
571+ 'face color: #0FF' ,
572+ 'face color'
573+ ) ;
574+ } )
575+ . then ( function ( ) { mouseEvent ( 'mouseover' , 300 , 300 ) ; } )
576+ . then ( delay ( 20 ) )
577+ . then ( function ( ) {
578+ assertHoverText (
579+ 'x: 1' ,
580+ 'y: 1' ,
581+ 'z: 0' ,
582+ 'face color: #00F' ,
583+ 'face color'
584+ ) ;
585+ } )
586+ . then ( function ( ) { mouseEvent ( 'mouseover' , 200 , 300 ) ; } )
587+ . then ( delay ( 20 ) )
588+ . then ( function ( ) {
589+ assertHoverText (
590+ 'x: 0' ,
591+ 'y: 0' ,
592+ 'z: 0' ,
593+ 'face color: #000' ,
594+ 'face color'
595+ ) ;
596+ } )
597+ . catch ( failTest )
598+ . then ( done ) ;
599+ } ) ;
600+
547601 it ( '@gl should pick latest & closest points on hover if two points overlap' , function ( done ) {
548602 var _mock = Lib . extendDeep ( { } , mock4 ) ;
549603
You can’t perform that action at this time.
0 commit comments