From 478c98ac21f4af39d1b9c42bc6152b7a2a17c6f5 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 23 Mar 2021 18:05:51 +0800 Subject: [PATCH 1/9] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E5=9C=BA=E6=99=AF=E6=AD=A5=E9=AA=A4=E6=96=AD?= =?UTF-8?q?=E8=A8=80=E8=A7=84=E5=88=99=E5=A2=9E=E5=8A=A0=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/assertion/ApiAssertionJsr223.vue | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/frontend/src/business/components/api/definition/components/assertion/ApiAssertionJsr223.vue b/frontend/src/business/components/api/definition/components/assertion/ApiAssertionJsr223.vue index b1294b679d..c32bfb8ef7 100644 --- a/frontend/src/business/components/api/definition/components/assertion/ApiAssertionJsr223.vue +++ b/frontend/src/business/components/api/definition/components/assertion/ApiAssertionJsr223.vue @@ -18,6 +18,7 @@ {{ assertion.desc }}
+
@@ -27,23 +28,23 @@
+ :placeholder="$t('api_test.request.assertions.variable_name')" @change="quickScript" :disabled="disabled"/>
+ @change="changeOperator" :disabled="disabled">
+ @change="quickScript" v-if="!hasEmptyOperator" :disabled="disabled"/>
- + @@ -32,6 +32,7 @@ data() { return { allSamplers: ELEMENTS.get('AllSamplerProxy'), + currentProtocol: "HTTP", } }, methods: { @@ -63,7 +64,8 @@ } }); }, - saveAsApi(){ + saveAsApi() { + this.currentProtocol = this.data.protocol; this.$refs.api.open(this.data); } } From cc541f8859253d554a70e971dd4a3d2551b23e11 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Tue, 23 Mar 2021 18:33:07 +0800 Subject: [PATCH 3/9] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):?= =?UTF-8?q?=20=E9=A6=96=E9=A1=B5=E5=A4=B1=E8=B4=A5=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E6=9C=AA=E5=B1=95=E7=A4=BA=E6=8E=A5=E5=8F=A3=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/mapper/ext/ExtApiDefinitionExecResultMapper.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml index 95189a5806..22a84abd24 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionExecResultMapper.xml @@ -36,9 +36,12 @@ SELECT * FROM ( SELECT testCase.testCaseID,testCase.testCaseName AS caseName,testCase.testPlanName AS testPlan ,caseErrorCountData.dataCountNumber AS failureTimes,'apiCase' AS caseType FROM ( - SELECT apiCase.id AS testCaseID,apiCase.`name` AS testCaseName,group_concat(testPlan.`name`) AS testPlanName FROM api_test_case apiCase + SELECT apiCase.id AS testCaseID,apiCase.`name` AS testCaseName,group_concat(testPlan.`name`) AS testPlanName, testPlanCase.update_time as updateTime + FROM api_test_case apiCase + inner join api_definition on api_definition.id = apiCase.api_definition_id INNER JOIN test_plan_api_case testPlanCase ON testPlanCase.api_case_id = apiCase.id INNER JOIN test_plan testPlan ON testPlan.id = testPlanCase.test_plan_id + and api_definition.status != 'Trash' GROUP BY apiCase.id ORDER BY apiCase.create_time DESC )testCase @@ -48,7 +51,7 @@ SELECT id FROM api_test_case WHERE project_id = #{projectId} ) and `status` = 'error' GROUP BY resource_id ) caseErrorCountData ON caseErrorCountData.testCaseID =testCase.testCaseID - WHERE caseErrorCountData.executeTime >= #{startTimestamp} + WHERE testCase.updateTime >= #{startTimestamp} UNION SELECT scene.id AS testCaseID,scene.`name` AS caseName,apiScene.testPlanName AS testPlan,count(report.id) AS failureTimes,'scenario' AS caseType FROM api_scenario_report report From 186e5efa1d55a7e84c8d10567cef0ac40ae3f67d Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Tue, 23 Mar 2021 18:43:25 +0800 Subject: [PATCH 4/9] =?UTF-8?q?fix:=E5=88=9B=E5=BB=BA=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../track/case/components/TestCaseCreate.vue | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/frontend/src/business/components/track/case/components/TestCaseCreate.vue b/frontend/src/business/components/track/case/components/TestCaseCreate.vue index 9f39733f06..8c76567982 100644 --- a/frontend/src/business/components/track/case/components/TestCaseCreate.vue +++ b/frontend/src/business/components/track/case/components/TestCaseCreate.vue @@ -105,15 +105,21 @@ export default { this.testCaseForm.projectId = getCurrentProjectID(); this.testCaseForm.type = ""; this.testCaseForm.priority = "P0"; - if (this.currentModule !== undefined || this.currentModule !== null || this.currentModule !== 0 || this.currentModule !== "") { - this.testCaseForm.nodePath = this.currentModule.path; - this.testCaseForm.nodeId = this.currentModule.id; + console.log(this.currentModule) + if (this.currentModule !== undefined && this.currentModule !== null && this.currentModule !== 0 && this.currentModule !== "") { + if (this.currentModule.path !== undefined && this.currentModule.path !== null && this.currentModule.path !== 0 && this.currentModule.path !== "") { + this.testCaseForm.nodePath = this.currentModule.path; + this.testCaseForm.nodeId = this.currentModule.id; + } else { + this.testCaseForm.nodePath = "/全部用例" + this.testCaseForm.nodeId = "root" + } } else { this.testCaseForm.nodePath = "/全部用例" this.testCaseForm.nodeId = "root" } this.result = this.$post(path, this.testCaseForm, response => { - this.testCaseForm.id=response.data.id + this.testCaseForm.id = response.data.id this.$success(this.$t('commons.save_success')); this.visible = false; if (saveAs) { From 41c46740b3b94aa5f1210afe8621cca7f9074af8 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 23 Mar 2021 19:05:42 +0800 Subject: [PATCH 5/9] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):?= =?UTF-8?q?=20=E5=88=87=E6=8D=A2code=E9=80=89=E9=A1=B9=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/definition/components/body/ApiBody.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/business/components/api/definition/components/body/ApiBody.vue b/frontend/src/business/components/api/definition/components/body/ApiBody.vue index f8da47035c..b2a506a3b1 100644 --- a/frontend/src/business/components/api/definition/components/body/ApiBody.vue +++ b/frontend/src/business/components/api/definition/components/body/ApiBody.vue @@ -42,7 +42,7 @@
- +
From c02b8dff1b5966fb946c565d0724a9c4135b17ec Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 23 Mar 2021 19:37:48 +0800 Subject: [PATCH 6/9] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=EF=BC=8C=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8=E5=8C=96):=20?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=A0=91=E8=8A=82=E7=82=B9=20=EF=BC=8C?= =?UTF-8?q?=E5=8F=B3=E4=BE=A7Tab=E6=81=A2=E5=A4=8D=E5=88=B0=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/automation/ApiAutomation.vue | 3 + .../api/definition/ApiDefinition.vue | 275 +++++++++--------- 2 files changed, 142 insertions(+), 136 deletions(-) diff --git a/frontend/src/business/components/api/automation/ApiAutomation.vue b/frontend/src/business/components/api/automation/ApiAutomation.vue index 95a3ab2f8b..4548ab4f3a 100644 --- a/frontend/src/business/components/api/automation/ApiAutomation.vue +++ b/frontend/src/business/components/api/automation/ApiAutomation.vue @@ -133,6 +133,9 @@ }); } } + }, + selectNodeIds() { + this.activeName = "default"; } }, methods: { diff --git a/frontend/src/business/components/api/definition/ApiDefinition.vue b/frontend/src/business/components/api/definition/ApiDefinition.vue index dc13136a3c..6f7a3c3e0a 100644 --- a/frontend/src/business/components/api/definition/ApiDefinition.vue +++ b/frontend/src/business/components/api/definition/ApiDefinition.vue @@ -1,152 +1,152 @@