From 43fbccb2a6090633f915d692f7899535742dbfae Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 15 Dec 2020 19:02:35 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/automation/ApiAutomation.vue | 4 ++-- .../api/automation/scenario/ApiComponent.vue | 18 +++++++++++++----- .../automation/scenario/EditApiScenario.vue | 6 +++++- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/frontend/src/business/components/api/automation/ApiAutomation.vue b/frontend/src/business/components/api/automation/ApiAutomation.vue index 8b489609e5..649ff24459 100644 --- a/frontend/src/business/components/api/automation/ApiAutomation.vue +++ b/frontend/src/business/components/api/automation/ApiAutomation.vue @@ -20,7 +20,7 @@ :name="item.name" closable>
- +
@@ -64,7 +64,7 @@ let label = this.$t('api_test.automation.add_scenario'); let name = getUUID().substring(0, 8); this.activeName = name; - this.tabs.push({label: label, name: name, currentScenario: {}}); + this.tabs.push({label: label, name: name, currentScenario: {apiScenarioModuleId: "", id: getUUID()}}); } if (tab.name === 'edit') { let label = this.$t('api_test.automation.add_scenario'); diff --git a/frontend/src/business/components/api/automation/scenario/ApiComponent.vue b/frontend/src/business/components/api/automation/scenario/ApiComponent.vue index eaa48ff3e4..7e5a170b91 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiComponent.vue @@ -95,13 +95,21 @@ try { let urlObject = new URL(this.request.url); let url = urlObject.protocol + "//" + urlObject.host + "/"; - let path = this.request.url.substr(url.length); - if (!path.startsWith('/')) { - path = "/" + path; + if (url) { + let path = this.request.url.substr(url.length); + if (!path.startsWith('/')) { + path = "/" + path; + } + this.request.path = path; + } else { + this.request.url = this.request.path; } - this.request.path = path; } catch (e) { - this.request.path = this.request.url; + if (this.request.url) { + this.request.path = this.request.url; + } else { + this.request.url = this.request.path; + } } } }, diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index 457257e1bd..30d4ea76e6 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -682,6 +682,7 @@ this.$success(this.$t('commons.save_success')); this.path = "/api/automation/update"; this.currentScenario.tagId = JSON.parse(this.currentScenario.tagId); + this.$emit('refresh'); }) } }) @@ -708,6 +709,7 @@ }, setParameter() { this.currentScenario.stepTotal = this.scenarioDefinition.length; + this.currentScenario.projectId = getCurrentProjectID(); this.currentScenario.modulePath = this.getPath(this.currentScenario.apiScenarioModuleId); // 构建一个场景对象 方便引用处理 let scenario = { @@ -715,7 +717,9 @@ type: "scenario", referenced: 'Created', environmentId: this.currentEnvironmentId, hashTree: this.scenarioDefinition }; this.currentScenario.scenarioDefinition = scenario; - this.currentScenario.tagId = JSON.stringify(this.currentScenario.tagId); + if (this.currentScenario.tagId instanceof Array) { + this.currentScenario.tagId = JSON.stringify(this.currentScenario.tagId); + } if (this.currentModule != null) { this.currentScenario.modulePath = this.currentModule.method !== undefined ? this.currentModule.method : null; this.currentScenario.apiScenarioModuleId = this.currentModule.id; From 804b264acd05eac9acd8c05e790c1ef075b0f676 Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Tue, 15 Dec 2020 19:10:31 +0800 Subject: [PATCH 2/3] fix:x-pack --- backend/src/main/java/io/metersphere/xpack | 2 +- frontend/src/business/components/xpack | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index bb494fc68a..61397c1672 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit bb494fc68a2367359c9048fa7250c7618de4afb6 +Subproject commit 61397c16728a63493507679f7e0940d9099f337f diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index a22a3005d9..aaeb324621 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit a22a3005d9bd254793fcf634d72539cbdf31be3a +Subproject commit aaeb324621dc3197c1bcbd3920600c0963fdea08 From dc84ec2542b2022f28db942463e62e586f04713e Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 15 Dec 2020 19:26:30 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E5=A4=96=E9=83=A8=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/io/metersphere/xpack | 2 +- .../components/api/automation/scenario/EditApiScenario.vue | 6 +++--- .../components/api/automation/scenario/api/ApiCaseList.vue | 2 +- frontend/src/business/components/xpack | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index bb494fc68a..1fe20ba15a 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit bb494fc68a2367359c9048fa7250c7618de4afb6 +Subproject commit 1fe20ba15a7ca3fe9f77ddf866021e7c7dfe5969 diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index b7153801b4..1ecbbef22e 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -200,9 +200,9 @@
+{{$t('api_test.automation.api_list_import')}}
- +
+{{$t('api_test.automation.wait_controller')}}
@@ -245,7 +245,7 @@ - + {{$t('commons.save')}} diff --git a/frontend/src/business/components/api/automation/scenario/api/ApiCaseList.vue b/frontend/src/business/components/api/automation/scenario/api/ApiCaseList.vue index 6ad9dd318c..2f85fa5eeb 100644 --- a/frontend/src/business/components/api/automation/scenario/api/ApiCaseList.vue +++ b/frontend/src/business/components/api/automation/scenario/api/ApiCaseList.vue @@ -1,6 +1,6 @@