Skip to content

Commit 1940a21

Browse files
Vasil ChimevVasil Chimev
Vasil Chimev
authored and
Vasil Chimev
committed
Assert deployment target of projects with CocoaPods.
NativeScript/nativescript-cli#944
1 parent b9033f7 commit 1940a21

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

tests/plugins_osx_pods.py

+14-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ def test_001_PluginAdd_Pod_GoogleMaps_Before_PlatformAdd_iOS(self):
4949
assert ("location = \"group:TNSApp.xcodeproj\">" in output)
5050
assert ("location = \"group:Pods/Pods.xcodeproj\">" in output)
5151

52-
assert FileExists("TNS_App/platforms/ios/Pods/Pods.xcodeproj")
52+
# This deployment target comes from the CLI
53+
output = runAUT("cat TNS_App/platforms/ios/TNSApp.xcodeproj/project.pbxproj | grep \"DEPLOYMENT\"")
54+
assert ("IPHONEOS_DEPLOYMENT_TARGET = 8.0;" in output)
55+
# This deployment target comes from the Podfile - platform :ios, '8.1'
56+
output = runAUT("cat TNS_App/platforms/ios/Pods/Pods.xcodeproj/project.pbxproj | grep \"DEPLOYMENT\"")
57+
assert ("IPHONEOS_DEPLOYMENT_TARGET = 8.1;" in output)
5358
Build(platform="ios", path="TNS_App")
5459

5560
def test_002_PluginAdd_Pod_GoogleMaps_After_PlatformAdd_iOS(self):
@@ -81,6 +86,13 @@ def test_002_PluginAdd_Pod_GoogleMaps_After_PlatformAdd_iOS(self):
8186
assert ("location = \"group:Pods/Pods.xcodeproj\">" in output)
8287
assert FileExists("TNS_App/platforms/ios/Pods/Pods.xcodeproj")
8388

89+
# This deployment target comes from the CLI
90+
output = runAUT("cat TNS_App/platforms/ios/TNSApp.xcodeproj/project.pbxproj | grep \"DEPLOYMENT\"")
91+
assert ("IPHONEOS_DEPLOYMENT_TARGET = 8.0;" in output)
92+
# This deployment target comes from the Podfile - platform :ios, '8.1'
93+
output = runAUT("cat TNS_App/platforms/ios/Pods/Pods.xcodeproj/project.pbxproj | grep \"DEPLOYMENT\"")
94+
assert ("IPHONEOS_DEPLOYMENT_TARGET = 8.1;" in output)
95+
8496
def test_003_PluginAdd_MultiplePods(self):
8597
CreateProjectAndAddPlatform(projName="TNS_App", platform="ios", frameworkPath=iosRuntimeSymlinkPath, symlink=True)
8698

@@ -149,7 +161,7 @@ def test_401_PluginAdd_InvalidPod(self):
149161

150162
output = Prepare(platform="ios", path="TNS_App", assertSuccess=False)
151163
assert ("Installing pods..." in output)
152-
assert ("Processing node_modules failed. Error:Error: Command failed: /bin/sh -c pod install" in output)
164+
assert ("Processing node_modules failed. Error:Error: Command pod failed with exit code 1" in output)
153165

154166
output = runAUT("cat TNS_App/platforms/ios/Podfile")
155167
assert ("pod 'InvalidPod'" in output)

0 commit comments

Comments
 (0)