@@ -68,6 +68,18 @@ describe('uiSortable', function() {
68
68
li . simulate ( 'drag' , { dy : dy } ) ;
69
69
expect ( $rootScope . items ) . toEqual ( [ 'One' , 'Two' , 'Three' ] ) ;
70
70
expect ( $rootScope . items ) . toEqual ( listContent ( element ) ) ;
71
+ // try again
72
+ li = element . find ( '[ng-repeat]:eq(1)' ) ;
73
+ dy = ( 1 + EXTRA_DY_PERCENTAGE ) * li . outerHeight ( ) ;
74
+ li . simulate ( 'drag' , { dy : dy } ) ;
75
+ expect ( $rootScope . items ) . toEqual ( [ 'One' , 'Two' , 'Three' ] ) ;
76
+ expect ( $rootScope . items ) . toEqual ( listContent ( element ) ) ;
77
+ // try again
78
+ li = element . find ( '[ng-repeat]:eq(1)' ) ;
79
+ dy = ( 1 + EXTRA_DY_PERCENTAGE ) * li . outerHeight ( ) ;
80
+ li . simulate ( 'drag' , { dy : dy } ) ;
81
+ expect ( $rootScope . items ) . toEqual ( [ 'One' , 'Two' , 'Three' ] ) ;
82
+ expect ( $rootScope . items ) . toEqual ( listContent ( element ) ) ;
71
83
72
84
li = element . find ( '[ng-repeat]:eq(0)' ) ;
73
85
dy = ( 2 + EXTRA_DY_PERCENTAGE ) * li . outerHeight ( ) ;
@@ -174,6 +186,18 @@ describe('uiSortable', function() {
174
186
li . simulate ( 'drag' , { dy : dy } ) ;
175
187
expect ( $rootScope . items ) . toEqual ( [ 'One' , 'Two' , 'Three' ] ) ;
176
188
expect ( $rootScope . items ) . toEqual ( listContent ( element ) ) ;
189
+ // try again
190
+ li = element . find ( '[ng-repeat]:eq(1)' ) ;
191
+ dy = ( 1 + EXTRA_DY_PERCENTAGE ) * li . outerHeight ( ) ;
192
+ li . simulate ( 'drag' , { dy : dy } ) ;
193
+ expect ( $rootScope . items ) . toEqual ( [ 'One' , 'Two' , 'Three' ] ) ;
194
+ expect ( $rootScope . items ) . toEqual ( listContent ( element ) ) ;
195
+ // try again
196
+ li = element . find ( '[ng-repeat]:eq(1)' ) ;
197
+ dy = ( 1 + EXTRA_DY_PERCENTAGE ) * li . outerHeight ( ) ;
198
+ li . simulate ( 'drag' , { dy : dy } ) ;
199
+ expect ( $rootScope . items ) . toEqual ( [ 'One' , 'Two' , 'Three' ] ) ;
200
+ expect ( $rootScope . items ) . toEqual ( listContent ( element ) ) ;
177
201
178
202
li = element . find ( '[ng-repeat]:eq(0)' ) ;
179
203
dy = ( 2 + EXTRA_DY_PERCENTAGE ) * li . outerHeight ( ) ;
0 commit comments