9
9
from core .osutils .command import run
10
10
from core .osutils .file import File
11
11
from core .osutils .folder import Folder
12
- from core .settings .settings import IOS_RUNTIME_PATH , CURRENT_OS , OSType , TEST_RUN_HOME
12
+ from core .settings .settings import IOS_RUNTIME_PATH , CURRENT_OS , OSType , TEST_RUN_HOME , ANDROID_RUNTIME_PATH
13
13
from core .tns .replace_helper import ReplaceHelper
14
14
from core .tns .tns import Tns
15
15
from core .tns .tns_platform_type import Platform
@@ -32,6 +32,7 @@ def setUp(self):
32
32
def test_100_prepare_ios (self ):
33
33
Tns .create_app (self .app_name )
34
34
Tns .platform_add_ios (attributes = {"--path" : self .app_name , "--frameworkPath" : IOS_RUNTIME_PATH })
35
+ Tns .platform_add_android (attributes = {"--path" : self .app_name , "--frameworkPath" : ANDROID_RUNTIME_PATH })
35
36
36
37
# Initial prepare should be full.
37
38
output = Tns .prepare_ios (attributes = {"--path" : self .app_name })
@@ -54,6 +55,18 @@ def test_100_prepare_ios(self):
54
55
result = re .search ("Schemes:\n \s*TestApp" , output )
55
56
assert result is not None
56
57
58
+ # Initial prepare for other platform (Android) should be full.
59
+ output = Tns .prepare_android (attributes = {"--path" : self .app_name })
60
+ TnsAsserts .prepared (self .app_name , platform = Platform .ANDROID , output = output , prepare = Prepare .FULL )
61
+
62
+ # Prepare original platform (iOS) should be skipped.
63
+ output = Tns .prepare_ios (attributes = {"--path" : self .app_name }, assert_success = False )
64
+ TnsAsserts .prepared (self .app_name , platform = Platform .IOS , output = output , prepare = Prepare .SKIP )
65
+
66
+ # Initial prepare for other platform (Android) should be skipped.
67
+ output = Tns .prepare_android (attributes = {"--path" : self .app_name }, assert_success = False )
68
+ TnsAsserts .prepared (self .app_name , platform = Platform .ANDROID , output = output , prepare = Prepare .SKIP )
69
+
57
70
def test_200_prepare_additional_appresources (self ):
58
71
Tns .create_app (self .app_name )
59
72
Tns .platform_add_ios (attributes = {"--path" : self .app_name , "--frameworkPath" : IOS_RUNTIME_PATH })
@@ -98,7 +111,7 @@ def test_220_build_ios_with_custom_plist(self):
98
111
# Prepare in release
99
112
Tns .prepare_ios (attributes = {"--path" : self .app_name , '--release' : '' })
100
113
assert "<string>fbXXXXXXXXX</string>" in File .read (final_plist )
101
- assert not "<string>orgnativescriptTestApp</string>" in File .read (final_plist )
114
+ assert "<string>orgnativescriptTestApp</string>" not in File .read (final_plist )
102
115
103
116
def test_300_prepare_ios_preserve_case (self ):
104
117
Tns .create_app (self .app_name )
0 commit comments