@@ -13,20 +13,20 @@ describe('ScrollView component', () => {
13
13
it ( 'should render vertically' , ( ) => {
14
14
initTest ( TestComponent , `<ScrollView></ScrollView>` ) ;
15
15
expect ( mock . commandLogs . toString ( ) ) . toEqual (
16
- 'CREATE+2+test-cmp+{},CREATE+3+native-scrollview+{"flexDirection":"column"},CREATE+4+native-view+{"collapsable":false,"flexDirection":null},ATTACH+1+2+0,ATTACH+2+3+0,ATTACH+3+4+0' ) ;
16
+ 'CREATE+2+test-cmp+{},CREATE+3+native-scrollview+{"flexDirection":"column","overflow":"scroll" },CREATE+4+native-view+{"collapsable":false,"flexDirection":null},ATTACH+1+2+0,ATTACH+2+3+0,ATTACH+3+4+0' ) ;
17
17
} ) ;
18
18
19
19
it ( 'should render horizontally' , ( ) => {
20
20
initTest ( TestComponent , `<ScrollView horizontal="true"></ScrollView>` ) ;
21
21
expect ( mock . commandLogs . toString ( ) ) . toEqual (
22
- 'CREATE+2+test-cmp+{},CREATE+3+native-horizontalscrollview+{"horizontal":true,"flexDirection":"row"},CREATE+4+native-view+{"collapsable":false,"flexDirection":"row"},' +
22
+ 'CREATE+2+test-cmp+{},CREATE+3+native-horizontalscrollview+{"horizontal":true,"flexDirection":"row","overflow":"scroll" },CREATE+4+native-view+{"collapsable":false,"flexDirection":"row"},' +
23
23
'ATTACH+1+2+0,ATTACH+2+3+0,ATTACH+3+4+0' ) ;
24
24
} ) ;
25
25
26
26
it ( 'should switch direction' , ( ) => {
27
27
const { fixture, rootRenderer} = initTest ( TestComponent , `<ScrollView [horizontal]="isHorizontal"></ScrollView>` ) ;
28
28
expect ( mock . commandLogs . toString ( ) ) . toEqual (
29
- 'CREATE+2+test-cmp+{},CREATE+3+native-scrollview+{"horizontal":false,"flexDirection":"column"},CREATE+4+native-view+{"collapsable":false,"flexDirection":null},ATTACH+1+2+0,ATTACH+2+3+0,ATTACH+3+4+0' ) ;
29
+ 'CREATE+2+test-cmp+{},CREATE+3+native-scrollview+{"horizontal":false,"flexDirection":"column","overflow":"scroll" },CREATE+4+native-view+{"collapsable":false,"flexDirection":null},ATTACH+1+2+0,ATTACH+2+3+0,ATTACH+3+4+0' ) ;
30
30
31
31
mock . clearLogs ( ) ;
32
32
fixture . componentInstance . isHorizontal = true ;
@@ -38,14 +38,14 @@ describe('ScrollView component', () => {
38
38
it ( 'should render with properties' , ( ) => {
39
39
initTest ( TestComponent , `<ScrollView scrollEnabled="{{false}}" removeClippedSubviews="true"></ScrollView>` ) ;
40
40
expect ( mock . commandLogs . toString ( ) ) . toEqual (
41
- 'CREATE+2+test-cmp+{},CREATE+3+native-scrollview+{"scrollEnabled":false,"flexDirection":"column","removeClippedSubviews":true},' +
41
+ 'CREATE+2+test-cmp+{},CREATE+3+native-scrollview+{"scrollEnabled":false,"flexDirection":"column","removeClippedSubviews":true,"overflow":"scroll" },' +
42
42
'CREATE+4+native-view+{"collapsable":false,"removeClippedSubviews":true,"flexDirection":null},ATTACH+1+2+0,ATTACH+2+3+0,ATTACH+3+4+0' ) ;
43
43
} ) ;
44
44
45
45
it ( 'should render with styles' , ( ) => {
46
46
initTest ( TestComponent , `<ScrollView [styleSheet]="20" [style]="{fontSize: 42}" [contentContainerStyle]="20"></ScrollView>` ) ;
47
47
expect ( mock . commandLogs . toString ( ) ) . toEqual (
48
- 'CREATE+2+test-cmp+{},CREATE+3+native-scrollview+{"flexDirection":"column","flex":1,"collapse":true,"fontSize":42},' +
48
+ 'CREATE+2+test-cmp+{},CREATE+3+native-scrollview+{"flexDirection":"column","overflow":"scroll"," flex":1,"collapse":true,"fontSize":42},' +
49
49
'CREATE+4+native-view+{"collapsable":false,"flexDirection":null,"flex":1,"collapse":true},ATTACH+1+2+0,ATTACH+2+3+0,ATTACH+3+4+0' ) ;
50
50
} ) ;
51
51
0 commit comments