Skip to content

chore: fix test_386_check_native_crash_will_not_crash_when_discardUncaughtJsExceptions_used #427

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 1 commit into from
Nov 7, 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
15 changes: 8 additions & 7 deletions tests/runtimes/ios/ios_runtime_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,24 @@

from core.base_test.tns_test import TnsTest
from core.log.log import Log
from core.utils.device.device import Device
from core.utils.device.device_manager import DeviceManager
from core.utils.wait import Wait
from core.utils.npm import Npm
from core.utils.file_utils import File, Folder
from core.settings import Settings
from core.settings.Settings import Simulators, IOS, TEST_RUN_HOME, AppName
from core.utils.device.device import Device
from core.utils.device.device_manager import DeviceManager
from core.utils.device.simctl import Simctl
from core.utils.file_utils import File, Folder
from core.utils.npm import Npm
from core.utils.wait import Wait
from data.templates import Template
from products.nativescript.tns import Tns
from products.nativescript.tns_logs import TnsLogs
from data.templates import Template

APP_NAME = AppName.DEFAULT
APP_PATH = os.path.join(Settings.TEST_RUN_HOME, APP_NAME)
TAP_THE_BUTTON = 'Tap the button'


# noinspection PyMethodMayBeStatic
class IOSRuntimeTests(TnsTest):
plugin_path = os.path.join(TEST_RUN_HOME, 'assets', 'plugins', 'sample-plugin', 'src')

Expand Down Expand Up @@ -147,7 +148,7 @@ def test_386_check_native_crash_will_not_crash_when_discardUncaughtJsExceptions_

log = Tns.run_ios(app_name=APP_NAME, emulator=True)

strings = ['CONSOLE LOG file:///app/app.js:47:0: The folder “not-existing-path” doesn’t exist.',
strings = ['The folder “not-existing-path” doesn’t exist.',
'JS:\ncontentsOfDirectoryAtPathError(file:///app/main-view-model.js:6:0)']

test_result = Wait.until(lambda: all(string in File.read(log.log_file) for string in strings), timeout=300,
Expand Down