Skip to content

Commit 2e9f685

Browse files
Vasil ChimevVasil Chimev
Vasil Chimev
authored and
Vasil Chimev
committed
1 parent 40a5da5 commit 2e9f685

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

tests/emulate_linux.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ def test_201_Emulate_Android_AvdName(self):
9696

9797
#TODO: Get device id and verify files are deployed and process is running on this device
9898

99-
def test_210_Emulate_MissingPlatform(self):
99+
def test_210_Emulate_Android_PlatformNotAdded(self):
100100
CreateProject(projName="TNS_App")
101-
output = runAUT(tnsPath + " emulate android --timeout 180 --path TNS_App", set_timeout=660)
101+
output = runAUT(tnsPath + " emulate android --timeout 180 --path TNS_App", set_timeout=660)
102102
assert ("Copying template files..." in output)
103103
assert ("Project successfully created." in output)
104104
assert ("Project successfully prepared" in output)
@@ -112,12 +112,6 @@ def test_210_Emulate_MissingPlatform(self):
112112

113113
#TODO: Get device id and verify files are deployed and process is running on this device
114114

115-
@unittest.skip("Moved to test_210_Emulate_MissingPlatform - this is no more a negative case due to https://github.com/NativeScript/nativescript-cli/issues/785")
116-
def test_400_Emulate_MissingPlatform(self):
117-
CreateProject(projName="TNS_App")
118-
output = runAUT(tnsPath + " emulate android --path TNS_App")
119-
assert ("The platform android is not added to this project" in output)
120-
121115
def test_401_Emulate_InvalidPlatform(self):
122116
CreateProjectAndAddPlatform(projName="TNS_App", platform="android", frameworkPath=androidRuntimePath)
123117
output = runAUT(tnsPath + " emulate invalidPlatform --path TNS_App --timeout 600 --justlaunch", set_timeout=660)

tests/emulate_osx.py

+17-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import unittest
33

44
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
77

88

99
class Emulate_OSX(unittest.TestCase):
@@ -51,7 +51,21 @@ def test_003_Emulate_iOS_Release(self):
5151
if ('ACTIVE_UI' in os.environ) and ("YES" in os.environ['ACTIVE_UI']):
5252
assert ("Session started without errors" in output)
5353
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+
5569
def test_400_Emulate_InvalidDevice(self):
5670
CreateProjectAndAddPlatform(projName="TNS_App", platform="ios", frameworkPath=iosRuntimeSymlinkPath, symlink=True)
5771
output = runAUT(tnsPath + " emulate ios --device invalidDevice --path TNS_App --justlaunch")

0 commit comments

Comments
 (0)