|
2 | 2 | import unittest
|
3 | 3 |
|
4 | 4 | from helpers._os_lib import CleanupFolder, runAUT, IsRunningProcess
|
5 |
| -from helpers._tns_lib import CreateProjectAndAddPlatform, iosRuntimeSymlinkPath, \ |
6 |
| - tnsPath |
| 5 | +from helpers._tns_lib import CreateProject, CreateProjectAndAddPlatform, \ |
| 6 | + iosRuntimeSymlinkPath, tnsPath |
7 | 7 |
|
8 | 8 |
|
9 | 9 | class Emulate_OSX(unittest.TestCase):
|
@@ -51,7 +51,21 @@ def test_003_Emulate_iOS_Release(self):
|
51 | 51 | if ('ACTIVE_UI' in os.environ) and ("YES" in os.environ['ACTIVE_UI']):
|
52 | 52 | assert ("Session started without errors" in output)
|
53 | 53 | assert IsRunningProcess("Simulator")
|
54 |
| - |
| 54 | + |
| 55 | + def test_210_Emulate_iOS_PlatformNotAdded(self): |
| 56 | + CreateProject(projName="TNS_App") |
| 57 | + output = runAUT(tnsPath + " eemulate ios --device iPhone-6 --path TNS_App --justlaunch") |
| 58 | + assert ("Copying template files..." in output) |
| 59 | + assert ("Project successfully created." in output) |
| 60 | + assert ("Project successfully prepared" in output) |
| 61 | + assert ("Project successfully built" in output) |
| 62 | + assert ("Starting iOS Simulator" in output) |
| 63 | + |
| 64 | + # Simulator can not be started without active UI |
| 65 | + if ('ACTIVE_UI' in os.environ) and ("YES" in os.environ['ACTIVE_UI']): |
| 66 | + assert ("Session started without errors" in output) |
| 67 | + assert IsRunningProcess("Simulator") |
| 68 | + |
55 | 69 | def test_400_Emulate_InvalidDevice(self):
|
56 | 70 | CreateProjectAndAddPlatform(projName="TNS_App", platform="ios", frameworkPath=iosRuntimeSymlinkPath, symlink=True)
|
57 | 71 | output = runAUT(tnsPath + " emulate ios --device invalidDevice --path TNS_App --justlaunch")
|
|
0 commit comments