Permalink
Browse files

chore(deps): update React Native to 0.39.2

  • Loading branch information...
1 parent 2649f28 commit a878de11b7b6fd6b5798b81aff5c5c7dbffb1500 @mlaval mlaval committed Dec 22, 2016
View
@@ -61,7 +61,7 @@
"@angular/platform-server": "2.1.0",
"@angular/router": "3.1.0",
"hammerjs": "2.0.6",
- "react-native": "0.35.0",
+ "react-native": "0.39.2",
"reflect-metadata": "0.1.8",
"rxjs": "5.0.0-beta.12",
"zone.js": "mlaval/zone.js#0.6.23-fixed-for-RN"
@@ -62,7 +62,7 @@ export class APIsApp {
{enableHighAccuracy: true, timeout: 20000, maximumAge: 1000}
);
NetInfo.fetch().then((reach: string) => { this.connectionType = reach });
- NetInfo.isConnectionExpensive((isConnectionExpensive: boolean) => { this.isConnectionExpensive = isConnectionExpensive });
+ //NetInfo.isConnectionExpensive((isConnectionExpensive: boolean) => { this.isConnectionExpensive = isConnectionExpensive });
NetInfo.isConnected.fetch().then((isConnected: boolean) => { this.isConnected = isConnected });
this.styles = StyleSheet.create({
button: {
@@ -62,6 +62,7 @@ export class ScrollView extends HighLevelComponent{
private _nativeElement: Node;
constructor(@Inject(REACT_NATIVE_WRAPPER) wrapper: ReactNativeWrapper, el: ElementRef) {
super(wrapper);
+ this.setDefaultStyle({overflow: 'scroll'});
this._nativeElement = el.nativeElement;
}
@@ -9,9 +9,9 @@ var UIManager = ReactNative.NativeModules.UIManager;
var resolveAssetSource = require('react-native/Libraries/Image/resolveAssetSource');
var dismissKeyboard = require('react-native/Libraries/Utilities/dismissKeyboard');
-var ReactNativeEventEmitter = require('react/lib/ReactNativeEventEmitter');
-var ReactNativeTagHandles = require('react/lib/ReactNativeTagHandles');
-var ReactNativeAttributePayload = require('react/lib/ReactNativeAttributePayload');
+var ReactNativeEventEmitter = require('react-native/Libraries/Renderer/src/renderers/native/ReactNativeEventEmitter');
+var ReactNativeTagHandles = require('react-native/Libraries/Renderer/src/renderers/native/ReactNativeTagHandles');
+var ReactNativeAttributePayload = require('react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload');
var ReactNativeViewAttributes = require('react-native/Libraries/Components/View/ReactNativeViewAttributes');
overridePlatform(ReactNative.Platform.OS);
@@ -13,20 +13,20 @@ describe('ScrollView component', () => {
it('should render vertically', () => {
initTest(TestComponent, `<ScrollView></ScrollView>`);
expect(mock.commandLogs.toString()).toEqual(
- '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');
+ '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');
});
it('should render horizontally', () => {
initTest(TestComponent, `<ScrollView horizontal="true"></ScrollView>`);
expect(mock.commandLogs.toString()).toEqual(
- 'CREATE+2+test-cmp+{},CREATE+3+native-horizontalscrollview+{"horizontal":true,"flexDirection":"row"},CREATE+4+native-view+{"collapsable":false,"flexDirection":"row"},' +
+ 'CREATE+2+test-cmp+{},CREATE+3+native-horizontalscrollview+{"horizontal":true,"flexDirection":"row","overflow":"scroll"},CREATE+4+native-view+{"collapsable":false,"flexDirection":"row"},' +
'ATTACH+1+2+0,ATTACH+2+3+0,ATTACH+3+4+0');
});
it('should switch direction', () => {
const {fixture, rootRenderer} = initTest(TestComponent, `<ScrollView [horizontal]="isHorizontal"></ScrollView>`);
expect(mock.commandLogs.toString()).toEqual(
- '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');
+ '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');
mock.clearLogs();
fixture.componentInstance.isHorizontal = true;
@@ -38,14 +38,14 @@ describe('ScrollView component', () => {
it('should render with properties', () => {
initTest(TestComponent, `<ScrollView scrollEnabled="{{false}}" removeClippedSubviews="true"></ScrollView>`);
expect(mock.commandLogs.toString()).toEqual(
- 'CREATE+2+test-cmp+{},CREATE+3+native-scrollview+{"scrollEnabled":false,"flexDirection":"column","removeClippedSubviews":true},' +
+ 'CREATE+2+test-cmp+{},CREATE+3+native-scrollview+{"scrollEnabled":false,"flexDirection":"column","removeClippedSubviews":true,"overflow":"scroll"},' +
'CREATE+4+native-view+{"collapsable":false,"removeClippedSubviews":true,"flexDirection":null},ATTACH+1+2+0,ATTACH+2+3+0,ATTACH+3+4+0');
});
it('should render with styles', () => {
initTest(TestComponent, `<ScrollView [styleSheet]="20" [style]="{fontSize: 42}" [contentContainerStyle]="20"></ScrollView>`);
expect(mock.commandLogs.toString()).toEqual(
- 'CREATE+2+test-cmp+{},CREATE+3+native-scrollview+{"flexDirection":"column","flex":1,"collapse":true,"fontSize":42},' +
+ 'CREATE+2+test-cmp+{},CREATE+3+native-scrollview+{"flexDirection":"column","overflow":"scroll","flex":1,"collapse":true,"fontSize":42},' +
'CREATE+4+native-view+{"collapsable":false,"flexDirection":null,"flex":1,"collapse":true},ATTACH+1+2+0,ATTACH+2+3+0,ATTACH+3+4+0');
});

0 comments on commit a878de1

Please sign in to comment.