Skip to content

Commit 15a423c

Browse files
Vasil ChimevVasil Chimev
Vasil Chimev
authored and
Vasil Chimev
committed
Update platform update tests.
NativeScript/nativescript-cli#785
1 parent 4bfdc63 commit 15a423c

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

tests/platform_linux.py

+2-9
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,12 @@ def test_208_Platform_Downgrade_Android_FromLatestVersion(self):
229229
assert ("\"version\": \"1.1.0\"" in output)
230230
Build(platform="android", path="TNS_App")
231231

232-
233-
def test_210_Platform_Update_MissingPlatform(self):
232+
def test_210_Platform_Update_Android_PlatformNotAdded(self):
234233
CreateProject(projName="TNS_App")
235234
output = runAUT(tnsPath + " platform update android --path TNS_App")
236235
assert("Copying template files..." in output)
237236
assert("Project successfully created." in output)
237+
assert not IsEmpty("TNS_App/platforms/android/build-tools/android-static-binding-generator")
238238

239239
@unittest.skip("Ignore because of issue https://github.com/NativeScript/nativescript-cli/issues/840")
240240
def test_220_SetSDK(self):
@@ -308,13 +308,6 @@ def test_432_Platform_Remove_EmptyPlatform(self):
308308
assert ("No platform specified. Please specify a platform to remove" in output)
309309
assert ("Usage" in output)
310310

311-
@unittest.skip("Moved to test_210_Platform_Update_MissingPlatform - this is no more a negative case due to https://github.com/NativeScript/nativescript-cli/issues/785")
312-
def test_440_Platform_Update_MissingPlatform(self):
313-
CreateProject(projName="TNS_App")
314-
output = runAUT(tnsPath + " platform update android --path TNS_App")
315-
assert ("The platform android is not added to this project. Please use 'tns platform add <platform>'" in output)
316-
assert ("Usage" in output)
317-
318311
def test_441_Platform_Update_InvalidPlatform(self):
319312
CreateProject(projName="TNS_App")
320313
output = runAUT(tnsPath + " platform update invalidPlatform --path TNS_App")

tests/platform_osx.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,14 @@ def test_212_Platform_Add_iOS_CustomBundleId(self):
239239
# Verify plist file
240240
output = runAUT("cat TNS_App/platforms/ios/TNSApp/TNSApp-Info.plist")
241241
assert ("org.nativescript.MyApp" in output)
242-
242+
243+
def test_210_Platform_Update_iOS_PlatformNotAdded(self):
244+
CreateProject(projName="TNS_App")
245+
output = runAUT(tnsPath + " platform update ios --path TNS_App")
246+
assert("Copying template files..." in output)
247+
assert("Project successfully created." in output)
248+
assert not IsEmpty("TNS_App/platforms/ios/metadataGenerator")
249+
243250
def test_400_Platform_Add_AlreadyExistingPlatform(self):
244251
self.test_004_Platform_Add_iOS_Symlink_And_FrameworkPath()
245252

0 commit comments

Comments
 (0)