|
9 | 9 | from core.enums.framework_type import FrameworkType
|
10 | 10 | from core.enums.os_type import OSType
|
11 | 11 | from core.enums.platform_type import Platform
|
12 |
| -from core.log.log import Log |
13 | 12 | from core.settings import Settings
|
14 | 13 | from core.utils.device.device_manager import DeviceManager
|
15 | 14 | from core.utils.npm import Npm
|
16 | 15 | from data.templates import Template
|
17 | 16 | from products.nativescript.tns import Tns
|
18 | 17 | from products.nativescript.tns_assert import TnsAssert
|
| 18 | +from products.nativescript.tns_paths import TnsPaths |
19 | 19 |
|
20 | 20 | APP_NAME = Settings.AppName.DEFAULT
|
21 | 21 |
|
22 | 22 | TEST_DATA = [
|
23 |
| - ('jasmine-js-android', FrameworkType.JASMINE, Template.HELLO_WORLD_JS, Platform.ANDROID), |
24 |
| - ('jasmine-ng-android', FrameworkType.JASMINE, Template.HELLO_WORLD_NG, Platform.ANDROID), |
25 |
| - ('mocha-js-android', FrameworkType.MOCHA, Template.HELLO_WORLD_JS, Platform.ANDROID), |
26 |
| - ('mocha-ng-android', FrameworkType.MOCHA, Template.HELLO_WORLD_NG, Platform.ANDROID), |
| 23 | + # ('jasmine-js-android', FrameworkType.JASMINE, Template.HELLO_WORLD_JS, Platform.ANDROID), |
| 24 | + # ('jasmine-ng-android', FrameworkType.JASMINE, Template.HELLO_WORLD_NG, Platform.ANDROID), |
| 25 | + # ('mocha-js-android', FrameworkType.MOCHA, Template.HELLO_WORLD_JS, Platform.ANDROID), |
| 26 | + # ('mocha-ng-android', FrameworkType.MOCHA, Template.HELLO_WORLD_NG, Platform.ANDROID), |
27 | 27 | ('qunit-js-android', FrameworkType.QUNIT, Template.HELLO_WORLD_JS, Platform.ANDROID),
|
28 | 28 | ]
|
29 | 29 |
|
@@ -88,13 +88,13 @@ def test_100(self, title, framework, template, platform):
|
88 | 88 | else:
|
89 | 89 | Tns.test_init(app_name=APP_NAME, framework=framework)
|
90 | 90 |
|
| 91 | + # Handle Qunit |
| 92 | + if framework == FrameworkType.QUNIT: |
| 93 | + Npm.uninstall(package='karma-qunit', option='--save-dev', folder=TnsPaths.get_app_path(app_name=APP_NAME)) |
| 94 | + Npm.install(package='karma-qunit@2', option='--save-dev', folder=TnsPaths.get_app_path(app_name=APP_NAME)) |
| 95 | + |
91 | 96 | # 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! |
| 97 | + Tns.test(app_name=APP_NAME, platform=Platform.ANDROID, emulator=True, justlaunch=True) |
98 | 98 |
|
99 | 99 | def test_400_invalid_framework_name(self):
|
100 | 100 | result = Tns.create(app_name=APP_NAME, template=Template.MIN_JS.local_package, update=False, verify=False)
|
|
0 commit comments