Skip to content

Commit d325f13

Browse files
authored
fix: base tests for test command on TnsRunTest (#66)
* fix: qunit tests Workaround NativeScript/nativescript-cli#4390 by manually installing correct `karma-qunit` * fix: enable commented tests * refactor: migrate to TnsRunTest * chore: remove hacks to handle qunit * fix: unused imports
1 parent 9bb5d97 commit d325f13

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

tests/cli/test/test_test.py

+3-24
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@
55

66
from parameterized import parameterized
77

8-
from core.base_test.tns_test import TnsTest
8+
from core.base_test.tns_run_test import TnsRunTest
99
from core.enums.framework_type import FrameworkType
1010
from core.enums.os_type import OSType
1111
from core.enums.platform_type import Platform
12-
from core.log.log import Log
1312
from core.settings import Settings
14-
from core.utils.device.device_manager import DeviceManager
1513
from core.utils.npm import Npm
1614
from data.templates import Template
1715
from products.nativescript.tns import Tns
@@ -49,21 +47,7 @@ def get_data():
4947

5048

5149
# noinspection PyMethodMayBeStatic,PyUnusedLocal
52-
class TestsForTnsTest(TnsTest):
53-
54-
@classmethod
55-
def setUpClass(cls):
56-
TnsTest.setUpClass()
57-
cls.emu = DeviceManager.Emulator.ensure_available(Settings.Emulators.DEFAULT)
58-
if Settings.HOST_OS is OSType.OSX:
59-
cls.sim = DeviceManager.Simulator.ensure_available(Settings.Simulators.DEFAULT)
60-
61-
def setUp(self):
62-
TnsTest.setUp(self)
63-
64-
@classmethod
65-
def tearDownClass(cls):
66-
TnsTest.tearDownClass()
50+
class TestsForTnsTest(TnsRunTest):
6751

6852
@parameterized.expand(get_data())
6953
def test_100(self, title, framework, template, platform):
@@ -89,12 +73,7 @@ def test_100(self, title, framework, template, platform):
8973
Tns.test_init(app_name=APP_NAME, framework=framework)
9074

9175
# Run Tests
92-
if Settings.HOST_OS != OSType.WINDOWS:
93-
Tns.test(app_name=APP_NAME, platform=Platform.ANDROID, emulator=True, justlaunch=True)
94-
# TODO: Modify hello-world test with some real test (importing modules) and run the test again.
95-
else:
96-
Log.info('Due to unknown issues --justlauch do not exit on Windows when tests are executed on Jenkins!')
97-
# TODO: Fix it!
76+
Tns.test(app_name=APP_NAME, platform=Platform.ANDROID, emulator=True, justlaunch=True)
9877

9978
def test_400_invalid_framework_name(self):
10079
result = Tns.create(app_name=APP_NAME, template=Template.MIN_JS.local_package, update=False, verify=False)

0 commit comments

Comments
 (0)