@@ -41,7 +41,6 @@ describe('ModeBar', function() {
4141 _modebardiv : d3 . select ( getMockModeBarTree ( ) ) ,
4242 _has : Plots . _hasPlotType ,
4343 _subplots : { xaxis : xaxes || [ ] , yaxis : yaxes || [ ] } ,
44- _basePlotModules : [ ] ,
4544 modebar : {
4645 orientation : 'h' ,
4746 bgcolor : 'rgba(255,255,255,0.7)' ,
@@ -349,6 +348,7 @@ describe('ModeBar', function() {
349348 var gd = getMockGraphInfo ( [ 'x' ] , [ 'y' ] ) ;
350349 gd . _fullLayout . _basePlotModules = [ { name : 'cartesian' } ] ;
351350 gd . _fullLayout . xaxis = { fixedrange : false } ;
351+ gd . _fullData = [ { type : 'scatter' } ] ;
352352
353353 manageModeBar ( gd ) ;
354354 var modeBar = gd . _fullLayout . _modeBar ;
@@ -412,6 +412,7 @@ describe('ModeBar', function() {
412412
413413 var gd = getMockGraphInfo ( ) ;
414414 gd . _fullLayout . _basePlotModules = [ { name : 'cartesian' } ] ;
415+ gd . _fullData = [ { type : 'scatter' } ] ;
415416
416417 manageModeBar ( gd ) ;
417418 var modeBar = gd . _fullLayout . _modeBar ;
@@ -429,6 +430,7 @@ describe('ModeBar', function() {
429430
430431 var gd = getMockGraphInfo ( ) ;
431432 gd . _fullLayout . _basePlotModules = [ { name : 'gl3d' } ] ;
433+ gd . _fullData = [ { type : 'scatter3d' } ] ;
432434
433435 manageModeBar ( gd ) ;
434436 var modeBar = gd . _fullLayout . _modeBar ;
@@ -446,6 +448,7 @@ describe('ModeBar', function() {
446448
447449 var gd = getMockGraphInfo ( ) ;
448450 gd . _fullLayout . _basePlotModules = [ { name : 'geo' } ] ;
451+ gd . _fullData = [ { type : 'scattergeo' } ] ;
449452
450453 manageModeBar ( gd ) ;
451454 var modeBar = gd . _fullLayout . _modeBar ;
@@ -486,6 +489,7 @@ describe('ModeBar', function() {
486489
487490 var gd = getMockGraphInfo ( ) ;
488491 gd . _fullLayout . _basePlotModules = [ { name : 'mapbox' } ] ;
492+ gd . _fullData = [ { type : 'scattermapbox' } ] ;
489493
490494 manageModeBar ( gd ) ;
491495 var modeBar = gd . _fullLayout . _modeBar ;
@@ -527,6 +531,7 @@ describe('ModeBar', function() {
527531 var gd = getMockGraphInfo ( [ 'x' ] , [ 'y' ] ) ;
528532 gd . _fullLayout . _basePlotModules = [ { name : 'gl2d' } ] ;
529533 gd . _fullLayout . xaxis = { fixedrange : false } ;
534+ gd . _fullData = [ { type : 'scattergl' } ] ;
530535
531536 manageModeBar ( gd ) ;
532537 var modeBar = gd . _fullLayout . _modeBar ;
@@ -542,6 +547,7 @@ describe('ModeBar', function() {
542547
543548 var gd = getMockGraphInfo ( ) ;
544549 gd . _fullLayout . _basePlotModules = [ { name : 'pie' } ] ;
550+ gd . _fullData = [ { type : 'pie' } ] ;
545551
546552 manageModeBar ( gd ) ;
547553 var modeBar = gd . _fullLayout . _modeBar ;
@@ -559,6 +565,7 @@ describe('ModeBar', function() {
559565
560566 var gd = getMockGraphInfo ( ) ;
561567 gd . _fullLayout . _basePlotModules = [ { name : 'cartesian' } , { name : 'gl3d' } ] ;
568+ gd . _fullData = [ { type : 'scatter' } , { type : 'scatter3d' } ] ;
562569
563570 manageModeBar ( gd ) ;
564571 var modeBar = gd . _fullLayout . _modeBar ;
@@ -577,6 +584,7 @@ describe('ModeBar', function() {
577584 var gd = getMockGraphInfo ( [ 'x' ] , [ 'y' ] ) ;
578585 gd . _fullLayout . _basePlotModules = [ { name : 'cartesian' } , { name : 'geo' } ] ;
579586 gd . _fullLayout . xaxis = { fixedrange : false } ;
587+ gd . _fullData = [ { type : 'scatter' } , { type : 'scattergeo' } ] ;
580588
581589 manageModeBar ( gd ) ;
582590 var modeBar = gd . _fullLayout . _modeBar ;
@@ -642,6 +650,7 @@ describe('ModeBar', function() {
642650
643651 var gd = getMockGraphInfo ( ) ;
644652 gd . _fullLayout . _basePlotModules = [ { name : 'geo' } , { name : 'gl3d' } ] ;
653+ gd . _fullData = [ { type : 'scattergeo' } , { type : 'scatter3d' } ] ;
645654
646655 manageModeBar ( gd ) ;
647656 var modeBar = gd . _fullLayout . _modeBar ;
@@ -658,6 +667,7 @@ describe('ModeBar', function() {
658667
659668 var gd = getMockGraphInfo ( ) ;
660669 gd . _fullLayout . _basePlotModules = [ { name : 'ternary' } ] ;
670+ gd . _fullData = [ { type : 'scatterternary' } ] ;
661671
662672 manageModeBar ( gd ) ;
663673 var modeBar = gd . _fullLayout . _modeBar ;
@@ -696,6 +706,7 @@ describe('ModeBar', function() {
696706
697707 var gd = getMockGraphInfo ( ) ;
698708 gd . _fullLayout . _basePlotModules = [ { name : 'ternary' } , { name : 'cartesian' } ] ;
709+ gd . _fullData = [ { type : 'scatterternary' } , { type : 'scatter' } ] ;
699710
700711 manageModeBar ( gd ) ;
701712 var modeBar = gd . _fullLayout . _modeBar ;
@@ -713,6 +724,7 @@ describe('ModeBar', function() {
713724
714725 var gd = getMockGraphInfo ( ) ;
715726 gd . _fullLayout . _basePlotModules = [ { name : 'ternary' } , { name : 'gl3d' } ] ;
727+ gd . _fullData = [ { type : 'scatterternary' } , { type : 'scatter3d' } ] ;
716728
717729 manageModeBar ( gd ) ;
718730 var modeBar = gd . _fullLayout . _modeBar ;
@@ -726,7 +738,7 @@ describe('ModeBar', function() {
726738 ] ) ;
727739
728740 var gd = getMockGraphInfo ( ) ;
729- gd . _fullLayout . _basePlotModules = [ { name : 'indicator' } ] ;
741+ gd . _fullData = [ { type : 'indicator' } ] ;
730742
731743 manageModeBar ( gd ) ;
732744 var modeBar = gd . _fullLayout . _modeBar ;
@@ -741,7 +753,8 @@ describe('ModeBar', function() {
741753 ] ) ;
742754
743755 var gd = getMockGraphInfo ( ) ;
744- gd . _fullLayout . _basePlotModules = [ { name : 'indicator' } , { name : 'pie' } ] ;
756+ gd . _fullLayout . _basePlotModules = [ { name : 'pie' } ] ;
757+ gd . _fullData = [ { type : 'indicator' } , { type : 'pie' } ] ;
745758
746759 manageModeBar ( gd ) ;
747760 var modeBar = gd . _fullLayout . _modeBar ;
@@ -794,6 +807,7 @@ describe('ModeBar', function() {
794807 it ( 'displays/hides cloud link according to showSendToCloud config arg' , function ( ) {
795808 var gd = getMockGraphInfo ( ) ;
796809 gd . _fullLayout . _basePlotModules = [ { name : 'pie' } ] ;
810+ gd . _fullData = [ { type : 'pie' } ] ;
797811 manageModeBar ( gd ) ;
798812 checkButtons ( gd . _fullLayout . _modeBar , getButtons ( [
799813 [ 'toImage' ] ,
@@ -823,6 +837,7 @@ describe('ModeBar', function() {
823837 var gd = getMockGraphInfo ( [ 'x' ] , [ 'y' ] ) ;
824838 gd . _fullLayout . _basePlotModules = [ { name : 'cartesian' } ] ;
825839 gd . _fullLayout . xaxis = { fixedrange : false } ;
840+ gd . _fullData = [ { type : 'scatter' } ] ;
826841 return gd ;
827842 }
828843
@@ -833,6 +848,7 @@ describe('ModeBar', function() {
833848 expect ( countButtons ( gd . _fullLayout . _modeBar ) ) . toEqual ( 11 ) ;
834849
835850 gd . _fullLayout . _basePlotModules = [ { name : 'gl3d' } ] ;
851+ gd . _fullData = [ { type : 'scatter3d' } ] ;
836852 manageModeBar ( gd ) ;
837853
838854 expect ( countButtons ( gd . _fullLayout . _modeBar ) ) . toEqual ( 9 ) ;
0 commit comments