Skip to content

fix: base tests for test command on TnsRunTest #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 3 additions & 24 deletions tests/cli/test/test_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@

from parameterized import parameterized

from core.base_test.tns_test import TnsTest
from core.base_test.tns_run_test import TnsRunTest
from core.enums.framework_type import FrameworkType
from core.enums.os_type import OSType
from core.enums.platform_type import Platform
from core.log.log import Log
from core.settings import Settings
from core.utils.device.device_manager import DeviceManager
from core.utils.npm import Npm
from data.templates import Template
from products.nativescript.tns import Tns
Expand Down Expand Up @@ -49,21 +47,7 @@ def get_data():


# noinspection PyMethodMayBeStatic,PyUnusedLocal
class TestsForTnsTest(TnsTest):

@classmethod
def setUpClass(cls):
TnsTest.setUpClass()
cls.emu = DeviceManager.Emulator.ensure_available(Settings.Emulators.DEFAULT)
if Settings.HOST_OS is OSType.OSX:
cls.sim = DeviceManager.Simulator.ensure_available(Settings.Simulators.DEFAULT)

def setUp(self):
TnsTest.setUp(self)

@classmethod
def tearDownClass(cls):
TnsTest.tearDownClass()
class TestsForTnsTest(TnsRunTest):

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

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

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