Skip to content

Commit 9d1407b

Browse files
committed
fix: preview tests
1 parent 375b052 commit 9d1407b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

data/sync/blank_vue.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from core.utils.wait import Wait
1010
from data.changes import Changes, Sync
1111
from data.const import Colors
12+
from products.nativescript.preview_helpers import Preview
1213
from products.nativescript.run_type import RunType
1314
from products.nativescript.tns import Tns
1415
from products.nativescript.tns_logs import TnsLogs
@@ -19,15 +20,15 @@ def __run_vue(app_name, platform, bundle, hmr):
1920
return Tns.run(app_name=app_name, platform=platform, emulator=True, wait=False, bundle=bundle, hmr=hmr)
2021

2122

22-
def __preview_vue(app_name, bundle, hmr):
23+
def __preview_vue(app_name, platform, device, bundle, hmr):
2324
# Execute `tns run` and wait until logs are OK
24-
return Tns.preview(app_name=app_name, bundle=bundle, hmr=hmr)
25+
return Preview.run_app(app_name=app_name, bundle=bundle, hmr=hmr, platform=platform, device=device)
2526

2627

2728
def __workflow(preview, app_name, platform, device, bundle=False, hmr=False):
2829
# Execute tns command
2930
if preview:
30-
result = __preview_vue(app_name=app_name, bundle=bundle, hmr=hmr)
31+
result = __preview_vue(app_name=app_name, platform=platform, device=device, bundle=bundle, hmr=hmr)
3132
else:
3233
result = __run_vue(app_name=app_name, platform=platform, bundle=bundle, hmr=hmr)
3334

0 commit comments

Comments
 (0)