Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d34d0e5

Browse files
Vasil ChimevVasil Chimev
Vasil Chimev
authored and
Vasil Chimev
committedSep 8, 2015
Update platform_linux.py SetSDK tests.
NativeScript/nativescript-cli#840
1 parent e26dc76 commit d34d0e5

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed
 

‎tests/platform_linux.py

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -231,21 +231,23 @@ def test_210_Platform_Update_Android_PlatformNotAdded(self):
231231
assert("Project successfully created." in output)
232232
assert not IsEmpty("TNS_App/platforms/android/build-tools/android-static-binding-generator")
233233

234-
@unittest.skip("Ignore because of issue https://github.com/NativeScript/nativescript-cli/issues/840")
235234
def test_220_SetSDK(self):
236235
CreateProject(projName="TNS_App")
237-
output = PlatformAdd(platform="android --sdk 19", frameworkPath=androidRuntimePath, path="TNS_App")
238-
assert("Copying template files..." in output)
239-
240-
# Not valid for 1.3.0+
241-
# assert("Updated project.properties" in output)
242-
# assert("Updated local.properties" in output)
243-
244-
assert("Project successfully created" in output)
236+
PlatformAdd(platform="android --sdk 19", frameworkPath=androidRuntimePath, path="TNS_App")
237+
245238
output = runAUT("cat TNS_App/platforms/android/src/main/AndroidManifest.xml ")
246239
assert ("android:minSdkVersion=\"17\"" in output)
247240
assert ("android:targetSdkVersion=\"19\"" in output)
248-
241+
242+
def test_221_SetSDK_NotInstalled(self):
243+
CreateProject(projName="TNS_App")
244+
output = PlatformAdd(platform="android --sdk 29", frameworkPath=androidRuntimePath, path="TNS_App")
245+
assert ("Support for the selected Android target SDK android-29 is not verified. Your Android app might not work as expected." in output)
246+
247+
output = runAUT("cat TNS_App/platforms/android/src/main/AndroidManifest.xml")
248+
assert ("android:minSdkVersion=\"17\"" in output)
249+
assert ("android:targetSdkVersion=\"29\"/>" in output)
250+
249251
def test_400_Platform_List_WrongPath(self):
250252
output = runAUT(tnsPath + " platform list")
251253
assert("No project found at or above" in output)
@@ -314,8 +316,3 @@ def test_442_Platform_Update_EmptyPlatform(self):
314316
output = runAUT(tnsPath + " platform update --path TNS_App")
315317
assert ("1mNo platform specified. Please specify platforms to update" in output)
316318
assert ("Usage" in output)
317-
318-
def test_443_SetSDK_InvalidNewVersion(self):
319-
CreateProject(projName="TNS_App")
320-
output = PlatformAdd(platform="android --sdk 29", frameworkPath=androidRuntimePath, path="TNS_App", assertSuccess=False)
321-
assert("You have selected to use android-29, but it is not currently installed." in output)

0 commit comments

Comments
 (0)
Please sign in to comment.