Skip to content

Commit b9eaeda

Browse files
committed
fix: path for shared projects
1 parent 1ca2dee commit b9eaeda

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/code_sharing/test_ng_generate_e2e.py

+6
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ def workflow(app_name, device, platform, shared):
6868
# Update app.modules.ts
6969
app_module_name = 'app.module.ts'
7070
app_module_path = os.path.join(app_path, 'app', app_module_name)
71+
if shared:
72+
app_module_name = 'app.module.tns.ts'
73+
app_module_path = os.path.join(app_path, 'src', 'app', app_module_name)
7174
old_string = "import { HomeComponent } from './home/home.component';"
7275
new_string = "import { ComponentTestComponent } from './module-test/component-test/component-test.component';"
7376
File.replace(path=app_module_path, old_string=old_string, new_string=new_string)
@@ -76,6 +79,9 @@ def workflow(app_name, device, platform, shared):
7679
# Update app-routing.module.ts
7780
app_routing_module_name = 'app-routing.module.ts'
7881
app_routing_module_path = os.path.join(app_path, 'app', app_routing_module_name)
82+
if shared:
83+
app_routing_module_name = 'app-routing.module.tns.ts'
84+
app_routing_module_path = os.path.join(app_path, 'src', 'app', app_routing_module_name)
7985
old_string = "import { HomeComponent } from './home/home.component';"
8086
new_string = "import { ComponentTestComponent } from './module-test/component-test/component-test.component';"
8187
File.replace(path=app_routing_module_path, old_string=old_string, new_string=new_string)

0 commit comments

Comments
 (0)