13
13
14
14
import os
15
15
import time
16
+ import unittest
16
17
17
18
import nose
18
19
from flaky import flaky
@@ -367,7 +368,7 @@ def test_390_tns_run_ios_should_warn_if_package_ids_do_not_match(self):
367
368
str2 = "<string>${EXECUTABLE_NAME}</string>" \
368
369
"<key>CFBundleIdentifier</key>" \
369
370
"<string>org.nativescript.myapp</string>"
370
- info = os .path .join (self .app_name , 'app' , 'App_Resources' ,'iOS' ,'Info.plist' )
371
+ info = os .path .join (self .app_name , 'app' , 'App_Resources' , 'iOS' , 'Info.plist' )
371
372
File .replace (file_path = info , str1 = str1 , str2 = str2 )
372
373
output = Tns .run_ios (attributes = {'--path' : self .app_name , '--justlaunch' : '' })
373
374
assert "[WARNING]: The CFBundleIdentifier key inside the 'Info.plist' will be overriden" in output
@@ -389,3 +390,11 @@ def test_404_run_on_invalid_device_id(self):
389
390
assert_success = False )
390
391
assert cannot_resolve_device in output
391
392
assert list_devices in output
393
+
394
+ @unittest .skipIf (Device .get_count (platform = Platform .IOS ) > 0 , "Valid only if there are no devices." )
395
+ def test_410_run_without_platform_and_without_devices (self ):
396
+ Simulator .stop ()
397
+ Tns .create_app (self .app_name , update_modules = True )
398
+ output = Tns .run (attributes = {'--path' : self .app_name , '--justlaunch' : '' }, assert_success = False )
399
+ assert "Unable to find applicable devices to execute operation " \
400
+ "and unable to start emulator when platform is not specified" in output
0 commit comments