Skip to content

Commit 1ca2dee

Browse files
committed
fix: workflow
1 parent a6cd1dc commit 1ca2dee

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

tests/code_sharing/test_ng_generate_e2e.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,22 @@ def workflow(app_name, device, platform, shared):
6666
NG.exec_command(command='g c module-test/component-test', cwd=app_path)
6767

6868
# 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)
7071
old_string = "import { HomeComponent } from './home/home.component';"
7172
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,')
7475

7576
# 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)
7779
old_string = "import { HomeComponent } from './home/home.component';"
7880
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')
8183

8284
# 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)
8587
device.wait_for_text(text='component-test works!')

0 commit comments

Comments
 (0)