@@ -1672,24 +1672,23 @@ describe('Test select box and lasso in general:', function() {
16721672 }
16731673 } ) . then ( function ( ) {
16741674 return Plotly . relayout ( gd , 'dragmode' , 'select' ) ;
1675+ } ) . then ( function ( ) {
1676+ return drag ( [ [ 150 , 600 ] , [ 780 , 400 ] ] ) ;
1677+ } ) . then ( function ( ) {
1678+ expect ( gd . data [ 0 ] . selectedpoints ) . toBe ( undefined ) ;
1679+ expect ( gd . data [ 1 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
1680+ expect ( gd . data [ 2 ] . selectedpoints ) . toBe ( undefined ) ;
1681+ expect ( gd . data [ 3 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
16751682 } ) . then ( function ( ) {
16761683 return drag ( [ [ 150 , 100 ] , [ 600 , 250 ] ] ) ;
16771684 } ) . then ( function ( ) {
16781685 expect ( gd . data [ 0 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
1679- expect ( gd . data [ 1 ] . selectedpoints ) . toBe ( undefined ) ;
1686+ expect ( gd . data [ 1 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
16801687 expect ( gd . data [ 2 ] . selectedpoints ) . toEqual ( [ 1 ] ) ;
1681- expect ( gd . data [ 3 ] . selectedpoints ) . toBe ( undefined ) ;
1688+ expect ( gd . data [ 3 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
16821689 } ) . then ( function ( ) {
16831690 return drag ( [ [ 600 , 175 ] , [ 780 , 175 ] ] ) ; // Extend existing selection
16841691 } ) . then ( function ( ) {
1685- expect ( gd . data [ 0 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
1686- expect ( gd . data [ 1 ] . selectedpoints ) . toBe ( undefined ) ;
1687- expect ( gd . data [ 2 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
1688- expect ( gd . data [ 3 ] . selectedpoints ) . toBe ( undefined ) ;
1689- } ) . then ( function ( ) {
1690- return drag ( [ [ 150 , 600 ] , [ 780 , 400 ] ] ) ;
1691- } ) . then ( function ( ) {
1692- console . log ( gd . data )
16931692 expect ( gd . data [ 0 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
16941693 expect ( gd . data [ 1 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
16951694 expect ( gd . data [ 2 ] . selectedpoints ) . toEqual ( [ 1 , 2 ] ) ;
0 commit comments