@@ -66,20 +66,22 @@ def workflow(app_name, device, platform, shared):
66
66
NG .exec_command (command = 'g c module-test/component-test' , cwd = app_path )
67
67
68
68
# Update app.modules.ts
69
- app_module = os .path .join (app_path , 'app' , 'app.module.ts' )
69
+ app_module_name = 'app.module.ts'
70
+ app_module_path = os .path .join (app_path , 'app' , app_module_name )
70
71
old_string = "import { HomeComponent } from './home/home.component';"
71
72
new_string = "import { ComponentTestComponent } from './module-test/component-test/component-test.component';"
72
- File .replace (path = app_module , old_string = old_string , new_string = new_string )
73
- File .replace (path = app_module , old_string = 'HomeComponent,' , new_string = 'ComponentTestComponent,' )
73
+ File .replace (path = app_module_path , old_string = old_string , new_string = new_string )
74
+ File .replace (path = app_module_path , old_string = 'HomeComponent,' , new_string = 'ComponentTestComponent,' )
74
75
75
76
# Update app-routing.module.ts
76
- app_routing_module = os .path .join (app_path , 'app' , 'app-routing.module.ts' )
77
+ app_routing_module_name = 'app-routing.module.ts'
78
+ app_routing_module_path = os .path .join (app_path , 'app' , app_routing_module_name )
77
79
old_string = "import { HomeComponent } from './home/home.component';"
78
80
new_string = "import { ComponentTestComponent } from './module-test/component-test/component-test.component';"
79
- File .replace (path = app_routing_module , old_string = old_string , new_string = new_string )
80
- File .replace (path = app_routing_module , old_string = 'HomeComponent' , new_string = 'ComponentTestComponent' )
81
+ File .replace (path = app_routing_module_path , old_string = old_string , new_string = new_string )
82
+ File .replace (path = app_routing_module_path , old_string = 'HomeComponent' , new_string = 'ComponentTestComponent' )
81
83
82
84
# Verify app is updated
83
- logs = [app_module , app_routing_module , 'Successfully synced application' ]
84
- TnsLogs .wait_for_log (log_file = result .log_file , string_list = logs , timeout = 300 )
85
+ logs = [app_module_name , app_routing_module_name , 'Successfully synced application' ]
86
+ TnsLogs .wait_for_log (log_file = result .log_file , string_list = logs , timeout = 120 )
85
87
device .wait_for_text (text = 'component-test works!' )
0 commit comments