@@ -200,17 +200,22 @@ if (_.inBrowser && !_.isIE9) {
200
200
el . __v_trans . id = 'test'
201
201
// cascaded class style
202
202
el . classList . add ( 'test' )
203
- transition . apply ( el , - 1 , op , vm , cb )
204
- expect ( op ) . not . toHaveBeenCalled ( )
205
- expect ( cb ) . not . toHaveBeenCalled ( )
206
- expect ( el . classList . contains ( 'test-leave' ) ) . toBe ( false )
203
+ // wait a frame: Chrome Android 37 doesn't trigger
204
+ // transition if we apply the leave class in the
205
+ // same frame.
207
206
_ . nextTick ( function ( ) {
208
- expect ( el . classList . contains ( 'test-leave' ) ) . toBe ( true )
209
- _ . on ( el , _ . transitionEndEvent , function ( ) {
210
- expect ( op ) . toHaveBeenCalled ( )
211
- expect ( cb ) . toHaveBeenCalled ( )
212
- expect ( el . classList . contains ( 'test-leave' ) ) . toBe ( false )
213
- done ( )
207
+ transition . apply ( el , - 1 , op , vm , cb )
208
+ expect ( op ) . not . toHaveBeenCalled ( )
209
+ expect ( cb ) . not . toHaveBeenCalled ( )
210
+ expect ( el . classList . contains ( 'test-leave' ) ) . toBe ( false )
211
+ _ . nextTick ( function ( ) {
212
+ expect ( el . classList . contains ( 'test-leave' ) ) . toBe ( true )
213
+ _ . on ( el , _ . transitionEndEvent , function ( ) {
214
+ expect ( op ) . toHaveBeenCalled ( )
215
+ expect ( cb ) . toHaveBeenCalled ( )
216
+ expect ( el . classList . contains ( 'test-leave' ) ) . toBe ( false )
217
+ done ( )
218
+ } )
214
219
} )
215
220
} )
216
221
} )
0 commit comments