@@ -2232,16 +2232,7 @@ describe('Test select box and lasso per trace:', function() {
22322232 . then ( function ( ) {
22332233 return Plotly . relayout ( gd , 'dragmode' , 'select' ) ;
22342234 } )
2235- . then ( function ( ) {
2236- // For some reason we need this to make the following tests pass
2237- // on CI consistently. It appears that a double-click action
2238- // is being confused with a mere click. See
2239- // https://github.com/plotly/plotly.js/pull/2135#discussion_r148897529
2240- // for more info.
2241- return new Promise ( function ( resolve ) {
2242- setTimeout ( resolve , 100 ) ;
2243- } ) ;
2244- } )
2235+ . then ( delay ( 100 ) )
22452236 . then ( function ( ) {
22462237 return _run (
22472238 [ [ 350 , 200 ] , [ 370 , 220 ] ] ,
@@ -2261,6 +2252,30 @@ describe('Test select box and lasso per trace:', function() {
22612252 null , BOXEVENTS , 'bar select'
22622253 ) ;
22632254 } )
2255+ . then ( function ( ) {
2256+ // mimic https://github.com/plotly/plotly.js/issues/3795
2257+ return Plotly . relayout ( gd , {
2258+ 'xaxis.rangeslider.visible' : true ,
2259+ 'xaxis.range' : [ 0 , 6 ]
2260+ } ) ;
2261+ } )
2262+ . then ( function ( ) {
2263+ return _run (
2264+ [ [ 350 , 200 ] , [ 360 , 200 ] ] ,
2265+ function ( ) {
2266+ assertPoints ( [
2267+ [ 0 , 2.5 , - 0.429 ] , [ 1 , 2.5 , - 1.015 ] , [ 2 , 2.5 , - 1.172 ] ,
2268+ ] ) ;
2269+ assertSelectedPoints ( {
2270+ 0 : [ 25 ] ,
2271+ 1 : [ 25 ] ,
2272+ 2 : [ 25 ]
2273+ } ) ;
2274+ assertRanges ( [ [ 2.434 , 2.521 ] , [ - 1.4355 , 2.0555 ] ] ) ;
2275+ } ,
2276+ null , BOXEVENTS , 'bar select (after xaxis.range relayout)'
2277+ ) ;
2278+ } )
22642279 . catch ( failTest )
22652280 . then ( done ) ;
22662281 } ) ;
0 commit comments