diff --git a/frontend/src/business/components/api/automation/ApiAutomation.vue b/frontend/src/business/components/api/automation/ApiAutomation.vue index 556fa95b77..180b05750b 100644 --- a/frontend/src/business/components/api/automation/ApiAutomation.vue +++ b/frontend/src/business/components/api/automation/ApiAutomation.vue @@ -197,6 +197,10 @@ currentScenario.apiScenarioModuleId = this.nodeTree[0].id; currentScenario.modulePath = this.nodeTree[0].path; } + + if (this.selectNodeIds && this.selectNodeIds.length > 0) { + currentScenario.apiScenarioModuleId = this.selectNodeIds[0]; + } this.tabs.push({label: label, name: name, currentScenario: currentScenario}); } if (tab.name === 'edit') { diff --git a/frontend/src/business/components/api/definition/ApiDefinition.vue b/frontend/src/business/components/api/definition/ApiDefinition.vue index 659458f6cb..3abdc02222 100644 --- a/frontend/src/business/components/api/definition/ApiDefinition.vue +++ b/frontend/src/business/components/api/definition/ApiDefinition.vue @@ -302,6 +302,9 @@ api.moduleId = this.nodeTree[0].id; api.modulePath = this.nodeTree[0].path; } + if (this.selectNodeIds && this.selectNodeIds.length > 0) { + api.moduleId = this.selectNodeIds[0]; + } this.handleTabsEdit(this.$t('api_test.definition.request.title'), e, api); }, handleTabClose() {