From 5424f9b505414bb9ca2f9382f0a81aaa19afc1c9 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 25 Aug 2020 17:31:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E5=89=8D=E7=BD=AE=E8=84=9A=E6=9C=AC=E7=A6=81=E7=94=A8?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=93=8D=E5=BA=94=E4=BB=A3=E7=A0=81=E6=A8=A1?= =?UTF-8?q?=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processor/BeanShellProcessor.vue | 19 +++++++++++++------ .../components/request/ApiHttpRequestForm.vue | 2 +- .../components/track/common/NodeTree.vue | 1 - 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/frontend/src/business/components/api/test/components/processor/BeanShellProcessor.vue b/frontend/src/business/components/api/test/components/processor/BeanShellProcessor.vue index a15fc33513..6e1882c092 100644 --- a/frontend/src/business/components/api/test/components/processor/BeanShellProcessor.vue +++ b/frontend/src/business/components/api/test/components/processor/BeanShellProcessor.vue @@ -7,7 +7,7 @@
{{$t('api_test.request.processor.code_template')}}
- {{template.title}} + {{template.title}}
{{$t('commons.reference_documentation')}} @@ -29,23 +29,26 @@ codeTemplates: [ { title: this.$t('api_test.request.processor.code_template_get_variable'), - value: 'vars.get("variable_name");' + value: 'vars.get("variable_name");', }, { title: this.$t('api_test.request.processor.code_template_set_variable'), - value: 'vars.put("variable_name", "variable_value");' + value: 'vars.put("variable_name", "variable_value");', }, { title: this.$t('api_test.request.processor.code_template_get_response_header'), - value: 'prev.getResponseHeaders();' + value: 'prev.getResponseHeaders();', + disabled: this.isPreProcessor }, { title: this.$t('api_test.request.processor.code_template_get_response_code'), - value: 'prev.getResponseCode();' + value: 'prev.getResponseCode();', + disabled: this.isPreProcessor }, { title: this.$t('api_test.request.processor.code_template_get_response_result'), - value: 'prev.getResponseDataAsString();' + value: 'prev.getResponseDataAsString();', + disabled: this.isPreProcessor } ], isCodeEditAlive: true @@ -61,6 +64,10 @@ }, beanShellProcessor: { type: Object, + }, + isPreProcessor: { + type: Boolean, + default: false } }, methods: { diff --git a/frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue b/frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue index c8050d0748..18c63d8c0e 100644 --- a/frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue +++ b/frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue @@ -68,7 +68,7 @@ - + diff --git a/frontend/src/business/components/track/common/NodeTree.vue b/frontend/src/business/components/track/common/NodeTree.vue index c1762f8506..aa87b401bd 100644 --- a/frontend/src/business/components/track/common/NodeTree.vue +++ b/frontend/src/business/components/track/common/NodeTree.vue @@ -108,7 +108,6 @@ export default { methods: { handleDragEnd(draggingNode, dropNode, dropType, ev) { let param = this.buildParam(draggingNode, dropNode, dropType); - console.log(this.treeNodes); this.$post("/case/node/drag", param, () => { draggingNode.data.level = param.level; this.refreshTable(); From 20a124b593abe303b44a645492875da291179cb1 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Tue, 25 Aug 2020 17:44:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B9=E5=88=B7=E6=96=B0head?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/test/ApiTestConfig.vue | 549 ++++++++-------- .../test/EditPerformanceTestPlan.vue | 5 + .../track/case/components/TestCaseEdit.vue | 585 +++++++++--------- .../track/plan/components/TestPlanEdit.vue | 213 +++---- 4 files changed, 685 insertions(+), 667 deletions(-) diff --git a/frontend/src/business/components/api/test/ApiTestConfig.vue b/frontend/src/business/components/api/test/ApiTestConfig.vue index 7ddb614cdb..84e7589d48 100644 --- a/frontend/src/business/components/api/test/ApiTestConfig.vue +++ b/frontend/src/business/components/api/test/ApiTestConfig.vue @@ -15,35 +15,35 @@ - {{$t('commons.save')}} + {{ $t('commons.save') }} - - {{$t('load_test.save_and_run')}} + {{ $t('load_test.save_and_run') }} - - - + + + - {{$t('commons.cancel')}} + {{ $t('commons.cancel') }} - {{$t('api_report.title')}} + {{ $t('api_report.title') }} - {{$t('api_test.create_performance_test')}} + {{ $t('api_test.create_performance_test') }} - {{$t('api_test.export_config')}} + {{ $t('api_test.export_config') }} - {{$t('api_test.api_import.label')}} + {{ $t('api_test.api_import.label') }} @@ -52,10 +52,12 @@ - + - +
@@ -63,274 +65,279 @@ diff --git a/frontend/src/business/components/performance/test/EditPerformanceTestPlan.vue b/frontend/src/business/components/performance/test/EditPerformanceTestPlan.vue index af7e5736b0..e50d70dc37 100644 --- a/frontend/src/business/components/performance/test/EditPerformanceTestPlan.vue +++ b/frontend/src/business/components/performance/test/EditPerformanceTestPlan.vue @@ -60,6 +60,7 @@ import MsContainer from "../../common/components/MsContainer"; import MsMainContainer from "../../common/components/MsMainContainer"; import {checkoutTestManagerOrTestUser} from "../../../../common/js/utils"; import MsScheduleConfig from "../../common/components/MsScheduleConfig"; +import {LIST_CHANGE, PerformanceEvent} from "@/business/components/common/head/ListEvent"; export default { name: "EditPerformanceTestPlan", @@ -172,6 +173,8 @@ export default { this.$success(this.$t('commons.save_success')); this.$refs.advancedConfig.cancelAllEdit(); this.$router.push({path: '/performance/test/all'}) + // 发送广播,刷新 head 上的最新列表 + PerformanceEvent.$emit(LIST_CHANGE); }); }, saveAndRun() { @@ -187,6 +190,8 @@ export default { this.result = this.$post(this.runPath, {id: this.testPlan.id, triggerMode: 'MANUAL'}, (response) => { let reportId = response.data; this.$router.push({path: '/performance/report/view/' + reportId}) + // 发送广播,刷新 head 上的最新列表 + PerformanceEvent.$emit(LIST_CHANGE); }) }); }, diff --git a/frontend/src/business/components/track/case/components/TestCaseEdit.vue b/frontend/src/business/components/track/case/components/TestCaseEdit.vue index f3a96dc71c..bb33f1b561 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEdit.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEdit.vue @@ -3,8 +3,8 @@
+ :title="operationType == 'edit' ? ( readOnly ? $t('test_track.case.view_case') : $t('test_track.case.edit_case')) : $t('test_track.case.create')" + :visible.sync="dialogFormVisible" width="65%"> @@ -92,7 +92,7 @@ - - + - {{$t('test_track.case.prerequisite')}}: + {{ $t('test_track.case.prerequisite') }}: @@ -125,7 +125,7 @@ - {{$t('test_track.case.steps')}}: + {{ $t('test_track.case.steps') }}: @@ -187,7 +187,7 @@ - {{$t('commons.remark')}}: + {{ $t('commons.remark') }}: @@ -222,302 +222,305 @@ diff --git a/frontend/src/business/components/track/plan/components/TestPlanEdit.vue b/frontend/src/business/components/track/plan/components/TestPlanEdit.vue index ce53fa9057..b51d0de096 100644 --- a/frontend/src/business/components/track/plan/components/TestPlanEdit.vue +++ b/frontend/src/business/components/track/plan/components/TestPlanEdit.vue @@ -92,12 +92,12 @@ @@ -110,116 +110,119 @@