Skip to content

Commit be2c763

Browse files
Vasil ChimevVasil Chimev
Vasil Chimev
authored and
Vasil Chimev
committed
1 parent d7d0121 commit be2c763

File tree

4 files changed

+29
-11
lines changed

4 files changed

+29
-11
lines changed

testdata/files/platform_ios_current.txt

+2-3
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,9 @@ NativeScript/lib/libNativeScript.a
6565
TNSApp/build.xcconfig
6666
TNSApp/en.lproj/InfoPlist.strings
6767
TNSApp/en.lproj/LaunchScreen.xib
68-
TNSApp/Images.xcassets/AppIcon.appiconset/Contents.json
69-
TNSApp/Images.xcassets/LaunchImage.launchimage/Contents.json
7068
TNSApp/main.m
69+
TNSApp/strip-dynamic-framework-architectures.sh
7170
TNSApp/TNSApp-Info.plist
7271
TNSApp/TNSApp-Prefix.pch
7372
TNSApp/TNSDebugging.h
74-
TNSApp.xcodeproj/project.pbxproj
73+
TNSApp.xcodeproj/project.pbxproj
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
TNSApp/build.xcconfig
22
TNSApp/en.lproj/InfoPlist.strings
33
TNSApp/en.lproj/LaunchScreen.xib
4-
TNSApp/Images.xcassets/AppIcon.appiconset/Contents.json
5-
TNSApp/Images.xcassets/LaunchImage.launchimage/Contents.json
64
TNSApp/main.m
5+
TNSApp/strip-dynamic-framework-architectures.sh
76
TNSApp/TNSApp-Info.plist
87
TNSApp/TNSApp-Prefix.pch
8+
TNSApp/TNSDebugging.h
99
TNSApp.xcodeproj/project.pbxproj

tests/platform_linux.py

+14-5
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def test_005_Platform_Add_Android_Symlink_And_FrameworkPath(self):
9090
def test_200_Platform_List_InsideEmptyProject(self):
9191
CreateProject(projName="TNS_App")
9292
currentDir = os.getcwd()
93-
os.chdir(os.path.join(currentDir,"TNS_App"))
93+
os.chdir(os.path.join(currentDir, "TNS_App"))
9494
output = runAUT(os.path.join("..", tnsPath) + " platform list")
9595
os.chdir(currentDir);
9696

@@ -103,7 +103,7 @@ def test_200_Platform_List_InsideEmptyProject(self):
103103
def test_201_Platform_Add_Android_InsideProject(self):
104104
CreateProject(projName="TNS_App")
105105
currentDir = os.getcwd()
106-
os.chdir(os.path.join(currentDir,"TNS_App"))
106+
os.chdir(os.path.join(currentDir, "TNS_App"))
107107
output = runAUT(os.path.join("..", tnsPath) + " platform add android")
108108
os.chdir(currentDir);
109109

@@ -215,7 +215,15 @@ def test_208_Platform_Downgrage_Android_FromLatestVersion(self):
215215
assert ("\"version\": \"1.1.0\"" in output)
216216
Build(platform="android", path="TNS_App")
217217

218-
def test_210_SetSDK(self):
218+
def test_210_Platform_Update_MissingPlatform(self):
219+
CreateProject(projName="TNS_App")
220+
output = runAUT(tnsPath + " platform update android --path TNS_App")
221+
assert("Copying template files..." in output)
222+
assert("Updated project.properties" in output)
223+
assert("Updated local.properties" in output)
224+
assert("Project successfully created." in output)
225+
226+
def test_220_SetSDK(self):
219227
CreateProject(projName="TNS_App")
220228
output = PlatformAdd(platform="android --sdk 19", frameworkPath=androidRuntimePath, path="TNS_App")
221229
assert("Copying template files..." in output)
@@ -282,7 +290,8 @@ def test_432_Platform_Remove_EmptyPlatform(self):
282290
output = runAUT(tnsPath + " platform remove --path TNS_App")
283291
assert ("No platform specified. Please specify a platform to remove" in output)
284292
assert ("Usage" in output)
285-
293+
294+
@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")
286295
def test_440_Platform_Update_MissingPlatform(self):
287296
CreateProject(projName="TNS_App")
288297
output = runAUT(tnsPath + " platform update android --path TNS_App")
@@ -304,4 +313,4 @@ def test_442_Platform_Update_EmptyPlatform(self):
304313
def test_443_SetSDK_InvalidNewVersion(self):
305314
CreateProject(projName="TNS_App")
306315
output = PlatformAdd(platform="android --sdk 29", frameworkPath=androidRuntimePath, path="TNS_App", assertSuccess=False)
307-
assert("You have selected to use android-29, but it is not currently installed." in output)
316+
assert("You have selected to use android-29, but it is not currently installed." in output)

tests/prepare_linux.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ def test_200_Prepare_Android_InsideProject(self):
4343
assert not FileExists('TNS_App/platforms/android/assets/app/tns_modules/application/application.android.js')
4444
assert not FileExists('TNS_App/platforms/android/assets/app/tns_modules/application/application.ios.js')
4545

46+
def test_201_Prepare_PlatformThatIsNotAdded(self):
47+
CreateProject(projName="TNS_App")
48+
output = runAUT(tnsPath + " prepare android --path TNS_App");
49+
assert("Copying template files..." in output)
50+
assert("Updated project.properties" in output)
51+
assert("Updated local.properties" in output)
52+
assert("Project successfully created." in output)
53+
assert("Project successfully prepared" in output)
54+
4655
def test_300_Prepare_Android_RemoveOldFiles(self):
4756
CreateProjectAndAddPlatform(projName="TNS_App", platform="android", frameworkPath=androidRuntimePath)
4857
output = runAUT(tnsPath + " prepare android --path TNS_App")
@@ -92,7 +101,8 @@ def test_401_Prepare_InvalidPlatform(self):
92101
CreateProject(projName="TNS_App")
93102
output = runAUT(tnsPath + " prepare windows --path TNS_App");
94103
assert("Invalid platform windows. Valid platforms are ios or android." in output)
95-
104+
105+
@unittest.skip("Moved to test_201_Prepare_PlatformThatIsNotAdded - this is no more a negative case due to https://github.com/NativeScript/nativescript-cli/issues/785")
96106
def test_402_Prepare_PlatformThatIsNotAdded(self):
97107
CreateProject(projName="TNS_App")
98108
output = runAUT(tnsPath + " prepare android --path TNS_App");

0 commit comments

Comments
 (0)