6
6
from selenium .webdriver .common .by import By
7
7
8
8
from core .enums .app_type import AppType
9
- from core .enums .platform_type import Platform
10
9
from core .enums .os_type import OSType
10
+ from core .enums .platform_type import Platform
11
11
from core .settings import Settings
12
12
from core .utils .appium .appium_driver import AppiumDriver
13
13
from core .utils .wait import Wait
19
19
from products .nativescript .tns_paths import TnsPaths
20
20
21
21
22
- def sync_master_detail_vue (app_name , platform , device , bundle = True , hmr = True ):
22
+ def sync_master_detail_vue (app_name , platform , device ):
23
23
# Execute tns command
24
- result = Tns .run (app_name = app_name , platform = platform , emulator = True , wait = False , bundle = bundle , hmr = hmr )
25
- strings = TnsLogs .run_messages (app_name = app_name , platform = platform , run_type = RunType .FULL , bundle = bundle ,
26
- hmr = hmr , app_type = AppType . VUE , transfer_all = True )
24
+ result = Tns .run (app_name = app_name , platform = platform , emulator = True , wait = False )
25
+ strings = TnsLogs .run_messages (app_name = app_name , platform = platform , run_type = RunType .FULL , app_type = AppType . VUE ,
26
+ transfer_all = True )
27
27
TnsLogs .wait_for_log (log_file = result .log_file , string_list = strings , timeout = 360 )
28
28
29
29
# start appium driver (need it on iOS only)
@@ -38,23 +38,23 @@ def sync_master_detail_vue(app_name, platform, device, bundle=True, hmr=True):
38
38
device .get_screen (path = initial_state )
39
39
40
40
# Verify that application is not restarted on file changes when hmr=true
41
- if hmr and Settings .HOST_OS != OSType .WINDOWS :
41
+ if Settings .HOST_OS != OSType .WINDOWS :
42
42
not_existing_string_list = ['Restarting application' ]
43
43
else :
44
44
not_existing_string_list = None
45
45
46
46
# Edit template in .vue file
47
47
Sync .replace (app_name = app_name , change_set = Changes .MasterDetailVUE .VUE_TEMPLATE )
48
48
strings = TnsLogs .run_messages (app_name = app_name , platform = platform , run_type = RunType .INCREMENTAL ,
49
- bundle = bundle , hmr = hmr , app_type = AppType .VUE , file_name = 'CarList.vue' )
49
+ app_type = AppType .VUE , file_name = 'CarList.vue' )
50
50
TnsLogs .wait_for_log (log_file = result .log_file , string_list = strings ,
51
51
not_existing_string_list = not_existing_string_list )
52
52
device .wait_for_text (text = Changes .MasterDetailVUE .VUE_TEMPLATE .new_text )
53
53
54
54
# Edit styling in .vue file
55
55
Sync .replace (app_name = app_name , change_set = Changes .MasterDetailVUE .VUE_STYLE )
56
56
strings = TnsLogs .run_messages (app_name = app_name , platform = platform , run_type = RunType .INCREMENTAL ,
57
- bundle = bundle , hmr = hmr , app_type = AppType .VUE , file_name = 'CarList.vue' )
57
+ app_type = AppType .VUE , file_name = 'CarList.vue' )
58
58
TnsLogs .wait_for_log (log_file = result .log_file , string_list = strings ,
59
59
not_existing_string_list = not_existing_string_list )
60
60
style_applied = Wait .until (lambda : device .get_pixels_by_color (Colors .LIGHT_BLUE ) > 200 )
@@ -63,7 +63,7 @@ def sync_master_detail_vue(app_name, platform, device, bundle=True, hmr=True):
63
63
# Revert styling in .vue file
64
64
Sync .revert (app_name = app_name , change_set = Changes .MasterDetailVUE .VUE_STYLE )
65
65
strings = TnsLogs .run_messages (app_name = app_name , platform = platform , run_type = RunType .INCREMENTAL ,
66
- bundle = bundle , hmr = hmr , app_type = AppType .VUE , file_name = 'CarList.vue' )
66
+ app_type = AppType .VUE , file_name = 'CarList.vue' )
67
67
TnsLogs .wait_for_log (log_file = result .log_file , string_list = strings ,
68
68
not_existing_string_list = not_existing_string_list )
69
69
style_applied = Wait .until (lambda : device .get_pixels_by_color (Colors .LIGHT_BLUE ) < 200 )
@@ -79,7 +79,7 @@ def sync_master_detail_vue(app_name, platform, device, bundle=True, hmr=True):
79
79
device .wait_for_text (text = "Price" )
80
80
Sync .replace (app_name = app_name , change_set = Changes .MasterDetailVUE .VUE_DETAIL_PAGE_TEMPLATE )
81
81
strings = TnsLogs .run_messages (app_name = app_name , platform = platform , run_type = RunType .INCREMENTAL ,
82
- bundle = bundle , hmr = hmr , app_type = AppType .VUE , file_name = 'CarDetails.vue' )
82
+ app_type = AppType .VUE , file_name = 'CarDetails.vue' )
83
83
TnsLogs .wait_for_log (log_file = result .log_file , string_list = strings ,
84
84
not_existing_string_list = not_existing_string_list )
85
85
device .wait_for_text (text = Changes .MasterDetailVUE .VUE_DETAIL_PAGE_TEMPLATE .new_text )
0 commit comments