@@ -624,7 +624,7 @@ describe('Test Geo layout defaults', function() {
624624 } ) ;
625625 } ) ;
626626
627- describe ( 'geo.visible should override show* defaults' , function ( ) {
627+ describe ( 'geo.visible should override show* defaults even with template any show* is true ' , function ( ) {
628628 var keys = [
629629 'lonaxis.showgrid' ,
630630 'lataxis.showgrid' ,
@@ -652,6 +652,20 @@ describe('Test Geo layout defaults', function() {
652652
653653 it ( '- base case' , function ( ) {
654654 layoutIn = {
655+ template : {
656+ layout : {
657+ geo : {
658+ showcoastlines : true ,
659+ showcountries : true ,
660+ showframe : true ,
661+ showland : true ,
662+ showlakes : true ,
663+ showocean : true ,
664+ showrivers : true ,
665+ showsubunits : true
666+ }
667+ }
668+ } ,
655669 geo : { visible : false }
656670 } ;
657671
@@ -688,51 +702,6 @@ describe('Test Geo layout defaults', function() {
688702 } ) ;
689703} ) ;
690704
691- describe ( 'geo visible false' , function ( ) {
692- var gd ;
693-
694- beforeEach ( function ( ) { gd = createGraphDiv ( ) ; } ) ;
695-
696- afterEach ( destroyGraphDiv ) ;
697-
698- it ( 'should override template.layout.geo.show*' , function ( done ) {
699- var keys = [
700- 'showcoastlines' ,
701- 'showcountries' ,
702- 'showframe' ,
703- 'showland' ,
704- 'showlakes' ,
705- 'showocean' ,
706- 'showrivers' ,
707- 'showsubunits'
708- ] ;
709-
710- var layout = {
711- geo : { visible : false } ,
712- template : {
713- layout : {
714- geo : { }
715- }
716- }
717- } ;
718-
719- keys . forEach ( function ( k ) {
720- layout . template . layout . geo [ k ] = true ;
721- } ) ;
722-
723- var data = [ { lon : [ 0 ] , lat : [ 0 ] , type : 'scattergeo' } ] ;
724-
725- Plotly . plot ( gd , data , layout )
726- . then ( function ( ) {
727- keys . forEach ( function ( k ) {
728- expect ( gd . _fullLayout . template . layout . geo [ k ] ) . toBe ( false , k ) ;
729- } ) ;
730- } )
731- . catch ( failTest )
732- . then ( done ) ;
733- } ) ;
734- } ) ;
735-
736705describe ( 'geojson / topojson utils' , function ( ) {
737706 function _locationToFeature ( topojson , loc , locationmode ) {
738707 var trace = { locationmode : locationmode } ;
0 commit comments