@@ -10,6 +10,9 @@ describe('table body transition', () => {
10
10
propsData : {
11
11
fields : testFields ,
12
12
items : testItems
13
+ } ,
14
+ stubs : {
15
+ 'transition-group' : TransitionGroupStub
13
16
}
14
17
} )
15
18
expect ( wrapper ) . toBeDefined ( )
@@ -27,14 +30,16 @@ describe('table body transition', () => {
27
30
tbodyTransitionProps : {
28
31
name : 'fade'
29
32
}
33
+ } ,
34
+ stubs : {
35
+ 'transition-group' : TransitionGroupStub
30
36
}
31
37
} )
32
38
expect ( wrapper ) . toBeDefined ( )
33
39
expect ( wrapper . is ( 'table' ) ) . toBe ( true )
34
- expect ( wrapper . find ( 'tbody' ) . exists ( ) ) . toBe ( true )
35
40
expect ( wrapper . find ( TransitionGroupStub ) . exists ( ) ) . toBe ( true )
36
- expect ( wrapper . find ( 'tbody' ) . is ( 'tbody' ) ) . toBe ( true )
37
- expect ( wrapper . find ( 'transition-group ' ) . is ( 'tbody' ) ) . toBe ( true )
41
+ // Transition-group stub doesn't render itself with the specified tag
42
+ expect ( wrapper . find ( 'tbody ' ) . exists ( ) ) . toBe ( false )
38
43
} )
39
44
40
45
it ( 'tbody should be a transition-group component when tbody-transition-handlers set' , async ( ) => {
@@ -50,15 +55,13 @@ describe('table body transition', () => {
50
55
}
51
56
} ,
52
57
stubs : {
53
- // the builtin stub doesn't really emulate transitio properly
54
- // so we let it use the real transition component
55
- 'transition-group' : false
58
+ 'transition-group' : TransitionGroupStub
56
59
}
57
60
} )
58
61
expect ( wrapper ) . toBeDefined ( )
59
62
expect ( wrapper . is ( 'table' ) ) . toBe ( true )
60
- expect ( wrapper . find ( 'tbody' ) . exists ( ) ) . toBe ( true )
61
- expect ( wrapper . find ( 'transition -group' ) . exists ( ) ) . toBe ( true )
62
- expect ( wrapper . find ( 'transition-group ' ) . is ( 'tbody' ) ) . toBe ( true )
63
+ expect ( wrapper . find ( TransitionGroupStub ) . exists ( ) ) . toBe ( true )
64
+ // Transition -group stub doesn't render itself with the specified tag
65
+ expect ( wrapper . find ( 'tbody ' ) . exists ( ) ) . toBe ( false )
63
66
} )
64
67
} )
0 commit comments