28
28
class TnsRunJSTests (TnsRunTest ):
29
29
app_name = Settings .AppName .DEFAULT
30
30
app_name_space = Settings .AppName .WITH_SPACE
31
+ normalized_app_name_space = '"' + app_name_space + '"'
31
32
app_path = TnsPaths .get_app_path (app_name )
32
33
app_resources_path = TnsPaths .get_path_app_resources (app_name )
33
34
source_project_dir = TnsPaths .get_app_path (app_name )
@@ -44,9 +45,17 @@ def setUpClass(cls):
44
45
src = os .path .join (Settings .TEST_RUN_HOME , 'assets' , 'logs' , 'hello-world-js' , 'app.js' )
45
46
target = os .path .join (cls .app_path , 'app' )
46
47
File .copy (source = src , target = target )
48
+
49
+ # Create app with space in name
50
+ Tns .create (app_name = cls .app_name_space , template = Template .HELLO_WORLD_JS .local_package , update = True )
51
+
47
52
Tns .platform_add_android (app_name = cls .app_name , framework_path = Settings .Android .FRAMEWORK_PATH )
53
+ Tns .platform_add_android (app_name = cls .normalized_app_name_space , verify = False ,
54
+ framework_path = Settings .Android .FRAMEWORK_PATH )
48
55
if Settings .HOST_OS is OSType .OSX :
49
56
Tns .platform_add_ios (app_name = cls .app_name , framework_path = Settings .IOS .FRAMEWORK_PATH )
57
+ Tns .platform_add_ios (app_name = cls .normalized_app_name_space , verify = False ,
58
+ framework_path = Settings .IOS .FRAMEWORK_PATH )
50
59
51
60
# Copy TestApp to data folder.
52
61
Folder .copy (source = cls .source_project_dir , target = cls .target_project_dir )
@@ -742,18 +751,14 @@ def test_360_tns_run_android_on_folder_with_spaces(self):
742
751
"""
743
752
`tns run android` for apps with spaces
744
753
"""
745
- Tns .create (app_name = self .app_name_space , template = Template .HELLO_WORLD_JS .local_package , update = True )
746
- app_name = '"' + self .app_name_space + '"'
747
- run_hello_world_js_ts (app_name , Platform .ANDROID , self .emu , just_launch = True )
754
+ run_hello_world_js_ts (self .normalized_app_name_space , Platform .ANDROID , self .emu , just_launch = True )
748
755
749
756
@unittest .skipIf (Settings .HOST_OS != OSType .OSX , 'iOS tests can be executed only on macOS.' )
750
757
def test_361_tns_run_ios_on_folder_with_spaces (self ):
751
758
"""
752
759
`tns run ios` for apps with spaces
753
760
"""
754
- Tns .create (app_name = self .app_name_space , template = Template .HELLO_WORLD_JS .local_package , update = True )
755
- app_name = '"' + self .app_name_space + '"'
756
- run_hello_world_js_ts (app_name , Platform .IOS , self .sim , just_launch = True )
761
+ run_hello_world_js_ts (self .normalized_app_name_space , Platform .IOS , self .sim , just_launch = True )
757
762
758
763
@unittest .skip ("Skip this test due to emulator api28 ui crashing when no space left on device" )
759
764
@unittest .skipIf (Settings .HOST_OS != OSType .OSX , '`shell cp -r` fails on emulators on Linux and Win.' )
0 commit comments