diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java index d70423500e..da58252890 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java @@ -163,7 +163,11 @@ public class MsHTTPSamplerProxy extends MsTestElement { sampler.setProtocol(urlObject.getProtocol()); sampler.setPath(urlObject.getPath()); } else { - sampler.setDomain(config.getConfig().get(this.getProjectId()).getHttpConfig().getDomain()); + String configStr = config.getConfig().get(this.getProjectId()).getHttpConfig().getSocket(); + sampler.setDomain(configStr); + if (config.getConfig().get(this.getProjectId()).getHttpConfig().getPort() > 0) { + sampler.setDomain(config.getConfig().get(this.getProjectId()).getHttpConfig().getDomain()); + } sampler.setPort(config.getConfig().get(this.getProjectId()).getHttpConfig().getPort()); sampler.setProtocol(config.getConfig().get(this.getProjectId()).getHttpConfig().getProtocol()); sampler.setPath(this.getPath()); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java index 9f969416cb..33626513da 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -241,7 +241,7 @@ public class ApiAutomationService { } else { scenario.setUserId(request.getUserId()); } - if (StringUtils.isEmpty(request.getApiScenarioModuleId()) || StringUtils.isEmpty(request.getModulePath()) || "default-module".equals(request.getApiScenarioModuleId())) { + if (StringUtils.isEmpty(request.getApiScenarioModuleId()) || "default-module".equals(request.getApiScenarioModuleId())) { ApiScenarioModuleExample example = new ApiScenarioModuleExample(); example.createCriteria().andProjectIdEqualTo(request.getProjectId()).andNameEqualTo("默认模块"); List modules = apiScenarioModuleMapper.selectByExample(example); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index 435846891b..0e70693f40 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -264,7 +264,7 @@ public class ApiDefinitionService { test.setEnvironmentId(request.getEnvironmentId()); test.setUserId(request.getUserId()); test.setTags(request.getTags()); - if (StringUtils.isEmpty(request.getModulePath()) || StringUtils.isEmpty(request.getModuleId()) || "default-module".equals(request.getModuleId())) { + if (StringUtils.isEmpty(request.getModuleId()) || "default-module".equals(request.getModuleId())) { ApiModuleExample example = new ApiModuleExample(); example.createCriteria().andProjectIdEqualTo(test.getProjectId()).andProtocolEqualTo(test.getProtocol()).andNameEqualTo("默认模块"); List modules = apiModuleMapper.selectByExample(example); @@ -297,7 +297,7 @@ public class ApiDefinitionService { test.setStatus(APITestStatus.Underway.name()); test.setModulePath(request.getModulePath()); test.setModuleId(request.getModuleId()); - if (StringUtils.isEmpty(request.getModulePath()) || StringUtils.isEmpty(request.getModuleId()) || "default-module".equals(request.getModuleId())) { + if (StringUtils.isEmpty(request.getModuleId()) || "default-module".equals(request.getModuleId())) { ApiModuleExample example = new ApiModuleExample(); example.createCriteria().andProjectIdEqualTo(test.getProjectId()).andProtocolEqualTo(test.getProtocol()).andNameEqualTo("默认模块"); List modules = apiModuleMapper.selectByExample(example); @@ -616,7 +616,7 @@ public class ApiDefinitionService { } for (int i = 0; i < data.size(); i++) { ApiDefinitionWithBLOBs item = data.get(i); - if (StringUtils.isEmpty(item.getModuleId()) || StringUtils.isEmpty(item.getModulePath()) || "default-module".equals(item.getModuleId())) { + if (StringUtils.isEmpty(item.getModuleId()) || "default-module".equals(item.getModuleId())) { ApiModuleExample example = new ApiModuleExample(); example.createCriteria().andProjectIdEqualTo(item.getProjectId()).andProtocolEqualTo(item.getProtocol()).andNameEqualTo("默认模块"); List modules = apiModuleMapper.selectByExample(example); diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java index f29e46d379..f6710f1bfa 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java @@ -93,7 +93,7 @@ public class TestCaseService { TestCaseTestMapper testCaseTestMapper; private void setNode(TestCaseWithBLOBs testCase){ - if (StringUtils.isEmpty(testCase.getNodeId()) || StringUtils.isEmpty(testCase.getNodePath()) || "default-module".equals(testCase.getNodeId())) { + if (StringUtils.isEmpty(testCase.getNodeId()) || "default-module".equals(testCase.getNodeId())) { TestCaseNodeExample example = new TestCaseNodeExample(); example.createCriteria().andProjectIdEqualTo(testCase.getProjectId()).andNameEqualTo("默认模块"); List nodes = testCaseNodeMapper.selectByExample(example); diff --git a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue index a3b7e1afe8..5fc080fa6e 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue @@ -732,6 +732,9 @@ export default { // let ids = [row.id]; let param = {}; this.buildBatchParam(param); + if(param.ids && param.ids.length <=0){ + param.ids =[row.id]; + } this.$post('/api/automation/removeToGcByBatch/', param, () => { // this.$post('/api/automation/removeToGc/', ids, () => { this.$success(this.$t('commons.delete_success')); diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index 8978fd056a..09d3cdf8ce 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -100,7 +100,14 @@
- {{ currentScenario.name === undefined || '' ? $t('api_test.scenario.name') : currentScenario.name }} + + + + {{ currentScenario.name === undefined || '' ? $t('api_test.scenario.name') : currentScenario.name }} + + {{$t('api_test.automation.step_total')}}:{{scenarioDefinition.length}} @@ -447,7 +454,7 @@ }, }, methods: { - setModule(id,data) { + setModule(id, data) { this.currentScenario.apiScenarioModuleId = id; this.currentScenario.modulePath = data.path; }, @@ -1250,4 +1257,14 @@ font-size: 18px; } + .scenario-name { + display: inline-block; + margin: 0 5px; + overflow-x: hidden; + padding-bottom: 0; + text-overflow: ellipsis; + vertical-align: middle; + white-space: nowrap; + width: 200px; + } diff --git a/frontend/src/business/components/api/definition/components/list/ApiList.vue b/frontend/src/business/components/api/definition/components/list/ApiList.vue index ebd4f5c579..970b67ac12 100644 --- a/frontend/src/business/components/api/definition/components/list/ApiList.vue +++ b/frontend/src/business/components/api/definition/components/list/ApiList.vue @@ -454,18 +454,18 @@ item.tags = JSON.parse(item.tags); } }) - // if (this.$refs.apiDefinitionTable) { - // setTimeout(() => { - // this.$refs.apiDefinitionTable.doLayout(); - // this.result.loading = false; - // }, 500) - // } - // nexttick:表格加载完成之后触发。判断是否需要勾选行 - this.$nextTick(function(){ - if (this.$refs.apiDefinitionTable) { + if (this.$refs.apiDefinitionTable) { + setTimeout(() => { this.$refs.apiDefinitionTable.doLayout(); this.result.loading = false; - } + }, 500) + } + // nexttick:表格加载完成之后触发。判断是否需要勾选行 + this.$nextTick(function(){ + // if (this.$refs.apiDefinitionTable) { + // this.$refs.apiDefinitionTable.doLayout(); + // this.result.loading = false; + // } this.checkTableRowIsSelect(); }) }); diff --git a/frontend/src/business/components/api/definition/components/runtest/RunTestHTTPPage.vue b/frontend/src/business/components/api/definition/components/runtest/RunTestHTTPPage.vue index 68a0eb1806..09b0e4d48d 100644 --- a/frontend/src/business/components/api/definition/components/runtest/RunTestHTTPPage.vue +++ b/frontend/src/business/components/api/definition/components/runtest/RunTestHTTPPage.vue @@ -71,27 +71,27 @@