|
10 | 10 | from core.log.log import Log
|
11 | 11 | from core.settings import Settings
|
12 | 12 | from core.utils.file_utils import Folder, File
|
| 13 | +from core.utils.json_utils import JsonUtils |
13 | 14 | from core.utils.npm import Npm
|
14 | 15 | from core.utils.process import Process
|
15 | 16 | from core.utils.run import run
|
16 |
| -from core.utils.json_utils import JsonUtils |
17 | 17 | from products.nativescript.app import App
|
18 | 18 | from products.nativescript.tns_assert import TnsAssert
|
19 | 19 | from products.nativescript.tns_logs import TnsLogs
|
@@ -47,6 +47,8 @@ def exec_command(command, cwd=Settings.TEST_RUN_HOME, platform=Platform.NONE, em
|
47 | 47 | :param log_trace: If not None pass `--log <level>` to command.
|
48 | 48 | :param just_launch: If true pass `--justlaunch` to command.
|
49 | 49 | :param sync_all_files: If true pass `--syncAllFiles` to command.
|
| 50 | + :param aab: If true pass `--aab` to command. |
| 51 | + :param compile_snapshot: If true pass `--env.compileSnapshot` to command. |
50 | 52 | :param clean: If true pass `--clean` to command.
|
51 | 53 | :param options: Pass additional options as string.
|
52 | 54 | :param wait: If true it will wait until command is complete.
|
@@ -166,6 +168,8 @@ def create(app_name=Settings.AppName.DEFAULT, template=None, path=None, app_id=N
|
166 | 168 |
|
167 | 169 | # Verify app is created properly
|
168 | 170 | if verify:
|
| 171 | + # Verify exit code |
| 172 | + assert result.exit_code == 0, "Exit code of tns create is not 0." |
169 | 173 | # Usually we do not pass path on tns create, which actually equals to cwd.
|
170 | 174 | # In such cases pass correct path to TnsAssert.created()
|
171 | 175 | if path is None:
|
@@ -451,6 +455,7 @@ def preview(app_name, bundle=True, hmr=True, log_trace=False, verify=True, timeo
|
451 | 455 | :param log_trace: If true pass --log trace.
|
452 | 456 | :param verify: If true verify some logs.
|
453 | 457 | :param timeout: Timeout in seconds.
|
| 458 | + :param options: Pass additional options. |
454 | 459 | :return: Result of `tns preview` command.
|
455 | 460 | """
|
456 | 461 | result = Tns.exec_command(command='preview', path=app_name, bundle=bundle, hmr=hmr, wait=False,
|
@@ -490,6 +495,7 @@ def test(app_name, platform, emulator=True, device=None, just_launch=True, verif
|
490 | 495 | :param device: Pass `--device <value>` to command.
|
491 | 496 | :param just_launch: If true pass `--just_launch` to the command.
|
492 | 497 | :param verify: Verify command was executed successfully.
|
| 498 | + :param wait: Wait command to complete it `true`. |
493 | 499 | :return: Result of `tns test` command.
|
494 | 500 | """
|
495 | 501 | cmd = 'test {0}'.format(str(platform))
|
|
0 commit comments