@@ -201,6 +201,40 @@ describe('Visible rangesliders', function() {
201201 . then ( done ) ;
202202 } ) ;
203203
204+ fit ( 'should not react to any interactions when staticPlot is set' , function ( done ) {
205+ var mockCopy = Lib . extendDeep ( { } , mock ) ;
206+ var moveDelta = 50 ;
207+ Plotly . newPlot ( gd , mockCopy . data , mockCopy . layout , { staticPlot : true } )
208+ . then ( function ( ) {
209+ // Try move minimum handle
210+ var minHandle = d3 . select ( '.' + constants . grabberMinClassName ) . node ( ) ;
211+ expect ( minHandle ) . not . toEqual ( null ) ;
212+ var minHandleRect = minHandle . getBoundingClientRect ( ) ;
213+ var x = minHandleRect . x + minHandleRect . width / 2 ;
214+ var y = minHandleRect . y + minHandleRect . height / 2 ;
215+ return slide ( x , y , x + moveDelta , y ) ;
216+ } )
217+ . then ( function ( ) {
218+ // Try move maximum handle
219+ var maxHandle = d3 . select ( '.' + constants . grabberMaxClassName ) . node ( ) ;
220+ expect ( maxHandle ) . not . toEqual ( null ) ;
221+ var maxHandleRect = maxHandle . getBoundingClientRect ( ) ;
222+ var x = maxHandleRect . x + maxHandleRect . width / 2 ;
223+ var y = maxHandleRect . y + maxHandleRect . height / 2 ;
224+ return slide ( x , y , x - moveDelta , y ) ;
225+ } )
226+ . then ( function ( ) {
227+ // Slidebox should not exist
228+ var slidebox = d3 . select ( '.' + constants . slideBoxClassName ) . node ( ) ;
229+ expect ( slidebox ) . toEqual ( null ) ;
230+ } )
231+ . then ( function ( ) {
232+ expect ( gd . layout . xaxis . range ) . toBeCloseToArray ( [ 0 , 49 ] ) ;
233+ } )
234+ . catch ( failTest )
235+ . then ( done ) ;
236+ } ) ;
237+
204238 it ( 'should update correctly when moving slider on an axis with rangebreaks' , function ( done ) {
205239 var start = 250 ;
206240 var end = 300 ;
0 commit comments