Daniel Zlotin преди 7 години
родител
ревизия
cbbf3218e2

+ 117
- 0
ios/ReactNativeNavigation.xcodeproj/project.pbxproj Целия файл

@@ -14,6 +14,8 @@
14 14
 		7B1126A61E2D2B6C00F9B03B /* RNNBridgeModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BBFE5421E25330E002A6182 /* RNNBridgeModule.h */; };
15 15
 		7B1126A71E2D2B6C00F9B03B /* RNNEventEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B11269E1E2D263F00F9B03B /* RNNEventEmitter.h */; };
16 16
 		7B1126A91E2D2B6C00F9B03B /* RNNControllerFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BC9346C1E26886E00EFA125 /* RNNControllerFactory.h */; };
17
+		7B71261B1E4A22520066D847 /* libReactNativeNavigation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D8AFADBD1BEE6F3F00A4592D /* libReactNativeNavigation.a */; };
18
+		7B7126221E4A23040066D847 /* RNNRootViewControllerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B7126211E4A23040066D847 /* RNNRootViewControllerTest.m */; };
17 19
 		7BA500751E2544B9001B9E1B /* ReactNativeNavigation.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BA500741E2544B9001B9E1B /* ReactNativeNavigation.m */; };
18 20
 		7BA500781E254908001B9E1B /* RNNSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BA500771E254908001B9E1B /* RNNSplashScreen.m */; };
19 21
 		7BBFE5441E25330E002A6182 /* RNNBridgeModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BBFE5431E25330E002A6182 /* RNNBridgeModule.m */; };
@@ -25,6 +27,16 @@
25 27
 		7BEF0D1D1E43771B003E96B0 /* RNNLayoutNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BEF0D1B1E43771B003E96B0 /* RNNLayoutNode.m */; };
26 28
 /* End PBXBuildFile section */
27 29
 
30
+/* Begin PBXContainerItemProxy section */
31
+		7B71261C1E4A22520066D847 /* PBXContainerItemProxy */ = {
32
+			isa = PBXContainerItemProxy;
33
+			containerPortal = D8AFADB51BEE6F3F00A4592D /* Project object */;
34
+			proxyType = 1;
35
+			remoteGlobalIDString = D8AFADBC1BEE6F3F00A4592D;
36
+			remoteInfo = ReactNativeNavigation;
37
+		};
38
+/* End PBXContainerItemProxy section */
39
+
28 40
 /* Begin PBXCopyFilesBuildPhase section */
29 41
 		D8AFADBB1BEE6F3F00A4592D /* CopyFiles */ = {
30 42
 			isa = PBXCopyFilesBuildPhase;
@@ -40,6 +52,9 @@
40 52
 /* Begin PBXFileReference section */
41 53
 		7B11269E1E2D263F00F9B03B /* RNNEventEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNEventEmitter.h; sourceTree = "<group>"; };
42 54
 		7B11269F1E2D263F00F9B03B /* RNNEventEmitter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNEventEmitter.m; sourceTree = "<group>"; };
55
+		7B7126161E4A22520066D847 /* ReactNativeNavigationTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ReactNativeNavigationTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
56
+		7B71261A1E4A22520066D847 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
57
+		7B7126211E4A23040066D847 /* RNNRootViewControllerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNRootViewControllerTest.m; sourceTree = "<group>"; };
43 58
 		7BA500731E2544B9001B9E1B /* ReactNativeNavigation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReactNativeNavigation.h; sourceTree = "<group>"; };
44 59
 		7BA500741E2544B9001B9E1B /* ReactNativeNavigation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReactNativeNavigation.m; sourceTree = "<group>"; };
45 60
 		7BA500761E254908001B9E1B /* RNNSplashScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNSplashScreen.h; sourceTree = "<group>"; };
@@ -58,6 +73,14 @@
58 73
 /* End PBXFileReference section */
59 74
 
60 75
 /* Begin PBXFrameworksBuildPhase section */
76
+		7B7126131E4A22520066D847 /* Frameworks */ = {
77
+			isa = PBXFrameworksBuildPhase;
78
+			buildActionMask = 2147483647;
79
+			files = (
80
+				7B71261B1E4A22520066D847 /* libReactNativeNavigation.a in Frameworks */,
81
+			);
82
+			runOnlyForDeploymentPostprocessing = 0;
83
+		};
61 84
 		D8AFADBA1BEE6F3F00A4592D /* Frameworks */ = {
62 85
 			isa = PBXFrameworksBuildPhase;
63 86
 			buildActionMask = 2147483647;
@@ -83,6 +106,15 @@
83 106
 			name = Controllers;
84 107
 			sourceTree = "<group>";
85 108
 		};
109
+		7B7126171E4A22520066D847 /* ReactNativeNavigationTests */ = {
110
+			isa = PBXGroup;
111
+			children = (
112
+				7B7126211E4A23040066D847 /* RNNRootViewControllerTest.m */,
113
+				7B71261A1E4A22520066D847 /* Info.plist */,
114
+			);
115
+			path = ReactNativeNavigationTests;
116
+			sourceTree = "<group>";
117
+		};
86 118
 		7BD721F31E2D3AA100724059 /* Bridge */ = {
87 119
 			isa = PBXGroup;
88 120
 			children = (
@@ -103,6 +135,7 @@
103 135
 				7BBFE5601E253F97002A6182 /* RNN.m */,
104 136
 				7BD721F31E2D3AA100724059 /* Bridge */,
105 137
 				7B1E4C4B1E2D173700C3A525 /* Controllers */,
138
+				7B7126171E4A22520066D847 /* ReactNativeNavigationTests */,
106 139
 				D8AFADBE1BEE6F3F00A4592D /* Products */,
107 140
 			);
108 141
 			sourceTree = "<group>";
@@ -114,6 +147,7 @@
114 147
 			isa = PBXGroup;
115 148
 			children = (
116 149
 				D8AFADBD1BEE6F3F00A4592D /* libReactNativeNavigation.a */,
150
+				7B7126161E4A22520066D847 /* ReactNativeNavigationTests.xctest */,
117 151
 			);
118 152
 			name = Products;
119 153
 			sourceTree = "<group>";
@@ -139,6 +173,24 @@
139 173
 /* End PBXHeadersBuildPhase section */
140 174
 
141 175
 /* Begin PBXNativeTarget section */
176
+		7B7126151E4A22520066D847 /* ReactNativeNavigationTests */ = {
177
+			isa = PBXNativeTarget;
178
+			buildConfigurationList = 7B7126201E4A22530066D847 /* Build configuration list for PBXNativeTarget "ReactNativeNavigationTests" */;
179
+			buildPhases = (
180
+				7B7126121E4A22520066D847 /* Sources */,
181
+				7B7126131E4A22520066D847 /* Frameworks */,
182
+				7B7126141E4A22520066D847 /* Resources */,
183
+			);
184
+			buildRules = (
185
+			);
186
+			dependencies = (
187
+				7B71261D1E4A22520066D847 /* PBXTargetDependency */,
188
+			);
189
+			name = ReactNativeNavigationTests;
190
+			productName = ReactNativeNavigationTests;
191
+			productReference = 7B7126161E4A22520066D847 /* ReactNativeNavigationTests.xctest */;
192
+			productType = "com.apple.product-type.bundle.unit-test";
193
+		};
142 194
 		D8AFADBC1BEE6F3F00A4592D /* ReactNativeNavigation */ = {
143 195
 			isa = PBXNativeTarget;
144 196
 			buildConfigurationList = D8AFADC61BEE6F3F00A4592D /* Build configuration list for PBXNativeTarget "ReactNativeNavigation" */;
@@ -166,6 +218,10 @@
166 218
 				LastUpgradeCheck = 0820;
167 219
 				ORGANIZATIONNAME = Wix;
168 220
 				TargetAttributes = {
221
+					7B7126151E4A22520066D847 = {
222
+						CreatedOnToolsVersion = 8.2.1;
223
+						ProvisioningStyle = Automatic;
224
+					};
169 225
 					D8AFADBC1BEE6F3F00A4592D = {
170 226
 						CreatedOnToolsVersion = 7.1;
171 227
 					};
@@ -184,11 +240,30 @@
184 240
 			projectRoot = "";
185 241
 			targets = (
186 242
 				D8AFADBC1BEE6F3F00A4592D /* ReactNativeNavigation */,
243
+				7B7126151E4A22520066D847 /* ReactNativeNavigationTests */,
187 244
 			);
188 245
 		};
189 246
 /* End PBXProject section */
190 247
 
248
+/* Begin PBXResourcesBuildPhase section */
249
+		7B7126141E4A22520066D847 /* Resources */ = {
250
+			isa = PBXResourcesBuildPhase;
251
+			buildActionMask = 2147483647;
252
+			files = (
253
+			);
254
+			runOnlyForDeploymentPostprocessing = 0;
255
+		};
256
+/* End PBXResourcesBuildPhase section */
257
+
191 258
 /* Begin PBXSourcesBuildPhase section */
259
+		7B7126121E4A22520066D847 /* Sources */ = {
260
+			isa = PBXSourcesBuildPhase;
261
+			buildActionMask = 2147483647;
262
+			files = (
263
+				7B7126221E4A23040066D847 /* RNNRootViewControllerTest.m in Sources */,
264
+			);
265
+			runOnlyForDeploymentPostprocessing = 0;
266
+		};
192 267
 		D8AFADB91BEE6F3F00A4592D /* Sources */ = {
193 268
 			isa = PBXSourcesBuildPhase;
194 269
 			buildActionMask = 2147483647;
@@ -206,7 +281,41 @@
206 281
 		};
207 282
 /* End PBXSourcesBuildPhase section */
208 283
 
284
+/* Begin PBXTargetDependency section */
285
+		7B71261D1E4A22520066D847 /* PBXTargetDependency */ = {
286
+			isa = PBXTargetDependency;
287
+			target = D8AFADBC1BEE6F3F00A4592D /* ReactNativeNavigation */;
288
+			targetProxy = 7B71261C1E4A22520066D847 /* PBXContainerItemProxy */;
289
+		};
290
+/* End PBXTargetDependency section */
291
+
209 292
 /* Begin XCBuildConfiguration section */
293
+		7B71261E1E4A22520066D847 /* Debug */ = {
294
+			isa = XCBuildConfiguration;
295
+			buildSettings = {
296
+				CLANG_ANALYZER_NONNULL = YES;
297
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
298
+				INFOPLIST_FILE = ReactNativeNavigationTests/Info.plist;
299
+				IPHONEOS_DEPLOYMENT_TARGET = 10.2;
300
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
301
+				PRODUCT_BUNDLE_IDENTIFIER = com.wix.ReactNativeNavigationTests;
302
+				PRODUCT_NAME = "$(TARGET_NAME)";
303
+			};
304
+			name = Debug;
305
+		};
306
+		7B71261F1E4A22520066D847 /* Release */ = {
307
+			isa = XCBuildConfiguration;
308
+			buildSettings = {
309
+				CLANG_ANALYZER_NONNULL = YES;
310
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
311
+				INFOPLIST_FILE = ReactNativeNavigationTests/Info.plist;
312
+				IPHONEOS_DEPLOYMENT_TARGET = 10.2;
313
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
314
+				PRODUCT_BUNDLE_IDENTIFIER = com.wix.ReactNativeNavigationTests;
315
+				PRODUCT_NAME = "$(TARGET_NAME)";
316
+			};
317
+			name = Release;
318
+		};
210 319
 		D8AFADC41BEE6F3F00A4592D /* Debug */ = {
211 320
 			isa = XCBuildConfiguration;
212 321
 			buildSettings = {
@@ -332,6 +441,14 @@
332 441
 /* End XCBuildConfiguration section */
333 442
 
334 443
 /* Begin XCConfigurationList section */
444
+		7B7126201E4A22530066D847 /* Build configuration list for PBXNativeTarget "ReactNativeNavigationTests" */ = {
445
+			isa = XCConfigurationList;
446
+			buildConfigurations = (
447
+				7B71261E1E4A22520066D847 /* Debug */,
448
+				7B71261F1E4A22520066D847 /* Release */,
449
+			);
450
+			defaultConfigurationIsVisible = 0;
451
+		};
335 452
 		D8AFADB81BEE6F3F00A4592D /* Build configuration list for PBXProject "ReactNativeNavigation" */ = {
336 453
 			isa = XCConfigurationList;
337 454
 			buildConfigurations = (

+ 22
- 0
ios/ReactNativeNavigationTests/Info.plist Целия файл

@@ -0,0 +1,22 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>CFBundleDevelopmentRegion</key>
6
+	<string>en</string>
7
+	<key>CFBundleExecutable</key>
8
+	<string>$(EXECUTABLE_NAME)</string>
9
+	<key>CFBundleIdentifier</key>
10
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11
+	<key>CFBundleInfoDictionaryVersion</key>
12
+	<string>6.0</string>
13
+	<key>CFBundleName</key>
14
+	<string>$(PRODUCT_NAME)</string>
15
+	<key>CFBundlePackageType</key>
16
+	<string>BNDL</string>
17
+	<key>CFBundleShortVersionString</key>
18
+	<string>1.0</string>
19
+	<key>CFBundleVersion</key>
20
+	<string>1</string>
21
+</dict>
22
+</plist>

+ 28
- 0
ios/ReactNativeNavigationTests/RNNRootViewControllerTest.m Целия файл

@@ -0,0 +1,28 @@
1
+//
2
+//  RNNRootViewControllerTest.m
3
+//  ReactNativeNavigation
4
+//
5
+//  Created by Daniel Zlotin on 07/02/2017.
6
+//  Copyright © 2017 Wix. All rights reserved.
7
+//
8
+
9
+#import <XCTest/XCTest.h>
10
+
11
+#import "RNNRootViewController.h"
12
+
13
+@interface RNNRootViewControllerTest : XCTestCase
14
+
15
+@end
16
+
17
+@implementation RNNRootViewControllerTest
18
+
19
+
20
+- (void)sendsEventOnAppear {
21
+	NSMutableDictionary* params = @{};
22
+	RNNRootViewController* uut = [[RNNRootViewController alloc] initWithNode:[RNNLayoutNode create:params]];
23
+	[uut viewDidAppear:true];
24
+	
25
+}
26
+
27
+
28
+@end

+ 9
- 1
package.json Целия файл

@@ -81,6 +81,14 @@
81 81
       "<rootDir>/integration/"
82 82
     ],
83 83
     "resetMocks": true,
84
-    "resetModules": true
84
+    "resetModules": true,
85
+    "coverageThreshold": {
86
+      "global": {
87
+        "branches": 100,
88
+        "functions": 100,
89
+        "lines": 100,
90
+        "statements": 100
91
+      }
92
+    }
85 93
   }
86 94
 }