From a812d83c76de29fccb3e3726e3de2d9e56280fa6 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Thu, 10 Dec 2020 17:24:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E7=BB=9F=E4=B8=80=E6=A0=B7=E5=BC=8F=E9=A3=8E?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/automation/scenario/ApiComponent.vue | 13 +++++++------ .../automation/scenario/ApiScenarioComponent.vue | 7 +++++-- .../api/automation/scenario/ConstantTimer.vue | 6 ++++-- .../api/automation/scenario/EditApiScenario.vue | 4 ++++ .../api/automation/scenario/IfController.vue | 8 ++++---- .../api/automation/scenario/Jsr233Processor.vue | 8 +++++--- .../components/assertion/ApiAssertions.vue | 9 ++++++--- .../definition/components/extract/ApiExtract.vue | 8 +++++--- .../components/api/definition/model/ApiTestModel.js | 5 +++-- 9 files changed, 43 insertions(+), 25 deletions(-) diff --git a/frontend/src/business/components/api/automation/scenario/ApiComponent.vue b/frontend/src/business/components/api/automation/scenario/ApiComponent.vue index 291411c4e9..05c7970ca4 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiComponent.vue @@ -17,16 +17,17 @@ {{$t('api_test.automation.customize_req')}} - {{request.name}} - + {{$t('api_test.automation.reference_deleted')}} {{ $t('api_test.scenario.reference') }} - - - +
+ + + +
diff --git a/frontend/src/business/components/api/automation/scenario/ApiScenarioComponent.vue b/frontend/src/business/components/api/automation/scenario/ApiScenarioComponent.vue index d7ec1e73fc..ef62a2ee8f 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiScenarioComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioComponent.vue @@ -5,11 +5,14 @@
{{scenario.index}}
- {{$t('api_test.automation.wait_controller')}} + {{$t('api_test.automation.scenario_import')}} {{scenario.name}} {{$t('api_test.automation.reference_deleted')}} {{ $t('api_test.scenario.reference') }} - +
+ + +
diff --git a/frontend/src/business/components/api/automation/scenario/ConstantTimer.vue b/frontend/src/business/components/api/automation/scenario/ConstantTimer.vue index 9afc363ad4..7be535dcb6 100644 --- a/frontend/src/business/components/api/automation/scenario/ConstantTimer.vue +++ b/frontend/src/business/components/api/automation/scenario/ConstantTimer.vue @@ -8,8 +8,10 @@ {{$t('api_test.automation.wait_controller')}} ms - - +
+ + +
diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index b7e34c26fd..dd621b6b3d 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -438,6 +438,7 @@ }, addCustomizeApi(request) { this.customizeVisible = false; + request.enable === undefined ? request.enable = true : request.enable; if (this.selectedTreeNode != undefined) { this.selectedTreeNode.hashTree.push(request); } else { @@ -450,6 +451,7 @@ addScenario(arr) { if (arr.length > 0) { arr.forEach(item => { + item.enable === undefined ? item.enable = true : item.enable; this.scenarioDefinition.push(item); }) } @@ -470,6 +472,7 @@ request = item.request; } request.referenced = referenced; + request.enable === undefined ? request.enable = true : request.enable; request.active = false; request.resourceId = getUUID(); if (referenced === 'REF') { @@ -489,6 +492,7 @@ request = item.request; } request.referenced = referenced; + request.enable === undefined ? request.enable = true : request.enable; request.active = false; request.resourceId = getUUID(); if (referenced === 'REF') { diff --git a/frontend/src/business/components/api/automation/scenario/IfController.vue b/frontend/src/business/components/api/automation/scenario/IfController.vue index c83f68f986..653c12f298 100644 --- a/frontend/src/business/components/api/automation/scenario/IfController.vue +++ b/frontend/src/business/components/api/automation/scenario/IfController.vue @@ -14,10 +14,10 @@ - - - - +
+ + +
diff --git a/frontend/src/business/components/api/automation/scenario/Jsr233Processor.vue b/frontend/src/business/components/api/automation/scenario/Jsr233Processor.vue index 6c7b184f97..eca34b346b 100644 --- a/frontend/src/business/components/api/automation/scenario/Jsr233Processor.vue +++ b/frontend/src/business/components/api/automation/scenario/Jsr233Processor.vue @@ -6,10 +6,12 @@
{{jsr223ProcessorData.index}}
{{title}} - - - +
+ + + +
diff --git a/frontend/src/business/components/api/definition/components/assertion/ApiAssertions.vue b/frontend/src/business/components/api/definition/components/assertion/ApiAssertions.vue index 7854042b7c..4e7c5dcd00 100644 --- a/frontend/src/business/components/api/definition/components/assertion/ApiAssertions.vue +++ b/frontend/src/business/components/api/definition/components/assertion/ApiAssertions.vue @@ -7,10 +7,12 @@ {{$t('api_test.definition.request.assertions_rule')}} - - - +
+ + + +
@@ -158,6 +160,7 @@ .icon.is-active { transform: rotate(90deg); } + /deep/ .el-card__body { padding: 15px; } diff --git a/frontend/src/business/components/api/definition/components/extract/ApiExtract.vue b/frontend/src/business/components/api/definition/components/extract/ApiExtract.vue index 6f5511e981..d377491f48 100644 --- a/frontend/src/business/components/api/definition/components/extract/ApiExtract.vue +++ b/frontend/src/business/components/api/definition/components/extract/ApiExtract.vue @@ -5,10 +5,12 @@
{{extract.index}}
{{$t('api_test.definition.request.extract_param')}} - - - +
+ + + +
diff --git a/frontend/src/business/components/api/definition/model/ApiTestModel.js b/frontend/src/business/components/api/definition/model/ApiTestModel.js index adce92b3e1..e77960c26d 100644 --- a/frontend/src/business/components/api/definition/model/ApiTestModel.js +++ b/frontend/src/business/components/api/definition/model/ApiTestModel.js @@ -776,7 +776,7 @@ export class Assertions extends BaseConfig { this.jsr223 = []; this.xpath2 = []; this.duration = undefined; - + this.enable = true; this.set(options); this.sets({text: Text, regex: Regex, jsonPath: JSONPath, jsr223: AssertionJSR223, xpath2: XPath2}, options); } @@ -843,6 +843,7 @@ export class JSR223Processor extends BaseConfig { this.type = "JSR223Processor"; this.script = undefined; this.language = "beanshell"; + this.enable = true; this.set(options); } } @@ -917,7 +918,7 @@ export class Extract extends BaseConfig { this.regex = []; this.json = []; this.xpath = []; - + this.enable = true; this.set(options); let types = { json: ExtractJSONPath,