Skip to content

Commit 8faeefe

Browse files
committed
fix: template tests
1 parent 9d1407b commit 8faeefe

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

data/sync/hello_world_ng.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def sync_hello_world_ng(app_name, platform, device, bundle=False, uglify=False,
2020
result = Tns.run(app_name=app_name, platform=platform, emulator=True, wait=False,
2121
bundle=bundle, aot=aot, uglify=uglify, hmr=hmr)
2222
# Check logs
23-
strings = TnsLogs.run_messages(app_name=app_name, platform=platform, bundle=bundle,
23+
strings = TnsLogs.run_messages(app_name=app_name, platform=platform, run_type=RunType.UNKNOWN, bundle=bundle,
2424
hmr=hmr, instrumented=instrumented, app_type=AppType.NG)
2525
TnsLogs.wait_for_log(log_file=result.log_file, string_list=strings, timeout=300)
2626

products/nativescript/run_type.py

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class RunType(IntEnum):
1111
INCREMENTAL = 2, 'incremental' # Some js/xml/css file is changed and incremental prepare is triggered.
1212
FULL = 3, 'full' # Full prepare. Rebuild native frameworks.
1313
FIRST_TIME = 4, 'full (no platforms)' # When platforms are not added to project prepare should add them.
14+
UNKNOWN = 9, 'unknown' # When you are not sure what is the run type.
1415

1516
def __str__(self):
1617
return self.string

products/nativescript/tns_logs.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def run_messages(app_name, platform, run_type=RunType.FULL, bundle=False, hmr=Fa
5656
Get log messages that should be present when running a project.
5757
:param app_name: Name of the app (for example TestApp).
5858
:param platform: Platform.ANDROID or Platform.IOS.
59-
:param run_type: RunType enum value.
59+
:param run_type: RunType enum value (None when it can not be defined strictly).
6060
:param bundle: True if `--bundle is specified.`
6161
:param hmr: True if `--hmr is specified.`
6262
:param uglify: True if `--env.uglify is specified.`
@@ -118,7 +118,7 @@ def run_messages(app_name, platform, run_type=RunType.FULL, bundle=False, hmr=Fa
118118
def __file_changed_messages(run_type, file_name, platform, bundle, hmr, uglify, aot=False, app_type=None):
119119
logs = []
120120
if file_name is None:
121-
if run_type not in [RunType.FIRST_TIME, RunType.FULL]:
121+
if run_type not in [RunType.FIRST_TIME, RunType.FULL, RunType.UNKNOWN]:
122122
logs.append('Skipping prepare.')
123123
else:
124124
if not hmr:

0 commit comments

Comments
 (0)