File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -559,7 +559,7 @@ describe('the range slider', function() {
559559 } ) ;
560560 } ) ;
561561
562- fdescribe ( 'yaxis options' , function ( ) {
562+ describe ( 'yaxis options' , function ( ) {
563563
564564 it ( 'should be set one yaxis is present' , function ( ) {
565565 var mock = {
@@ -792,6 +792,28 @@ describe('the range slider', function() {
792792 } )
793793 . then ( done ) ;
794794 } ) ;
795+
796+ it ( 'should configure yaxis opts on relayout' , function ( done ) {
797+ Plotly . plot ( gd , [ {
798+ y : [ 2 , 1 , 2 ]
799+ } ] , {
800+ xaxis : { rangeslider : { yaxis : { range : [ - 10 , 20 ] } } }
801+ } )
802+ . then ( function ( ) {
803+ expect ( gd . layout . xaxis . rangeslider . yaxis ) . toEqual ( { rangemode : 'fixed' , range : [ - 10 , 20 ] } ) ;
804+
805+ return Plotly . relayout ( gd , 'xaxis.rangeslider.yaxis.rangemode' , 'auto' ) ;
806+ } )
807+ . then ( function ( ) {
808+ expect ( gd . layout . xaxis . rangeslider . yaxis ) . toEqual ( { rangemode : 'auto' , range : [ 0.9201631701631702 , 2.0798368298368297 ] } ) ;
809+
810+ return Plotly . relayout ( gd , 'xaxis.rangeslider.yaxis.rangemode' , 'match' ) ;
811+ } )
812+ . then ( function ( ) {
813+ expect ( gd . layout . xaxis . rangeslider . yaxis ) . toEqual ( { rangemode : 'match' } ) ;
814+ } )
815+ . then ( done ) ;
816+ } ) ;
795817 } ) ;
796818} ) ;
797819
You can’t perform that action at this time.
0 commit comments