From 5fec89ef9212b32dd252d6b0097af5cc698dac55 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Thu, 27 Oct 2022 15:36:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE-?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E6=96=AD=E8=A8=80=E4=B8=ADjson=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E6=96=AD=E8=A8=80=E6=B7=BB=E5=8A=A0=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1019018 --user=宋天阳 [项目设置]项目环境-编辑项目环境-全局断言添加文档结果校验json格式失败 https://www.tapd.cn/55049933/s/1280284 --- .../components/environment/EnvironmentEdit.vue | 12 ++++++------ .../assertion/ApiAssertionDuration.vue | 10 ++++++---- .../assertion/ApiAssertionJsonPath.vue | 10 ++++++---- .../environment/assertion/ApiAssertionRegex.vue | 2 +- .../environment/assertion/ApiAssertionXPath2.vue | 10 ++++++---- .../environment/assertion/ApiAssertionsEdit.vue | 6 +++--- .../environment/assertion/GlobalAssertionText.vue | 4 ++-- .../assertion/document/DocumentHeader.vue | 6 +++--- .../dialog/ErrorReportLibraryMaintainDialog.vue | 6 ++---- .../controller/HistoryReportController.java | 2 +- .../controller/ReportStatShareController.java | 2 +- .../service/EnterpriseTestReportService.java | 2 +- .../service/ReportStatisticsService.java | 15 ++++++++++----- 13 files changed, 48 insertions(+), 39 deletions(-) diff --git a/framework/sdk-parent/frontend/src/components/environment/EnvironmentEdit.vue b/framework/sdk-parent/frontend/src/components/environment/EnvironmentEdit.vue index c1faf88ffb..6ac53a5b60 100644 --- a/framework/sdk-parent/frontend/src/components/environment/EnvironmentEdit.vue +++ b/framework/sdk-parent/frontend/src/components/environment/EnvironmentEdit.vue @@ -246,14 +246,14 @@ export default { this.environment.config.authManager.hashTree = []; } if (!this.environment.config.assertions) { - this.environment.config.assertions = { + this.$set(this.environment.config, 'assertions', { duration: {duration: 0}, regex: [], jsonPath: [], xpath2: [], jsr223: [], - document: {type: "json", data: {json: [], xml: []}}, - }; + document: {type: "JSON", data: {json: [], xml: []}}, + }); } }, @@ -295,14 +295,14 @@ export default { this.environment.config.authManager.hashTree = []; } if (!this.environment.config.assertions) { - this.environment.config.assertions = { + this.$set(this.environment.config, 'assertions', { duration: {duration: 0}, regex: [], jsonPath: [], xpath2: [], jsr223: [], - document: {type: "json", data: {json: [], xml: []}}, - }; + document: {type: "JSON", data: {json: [], xml: []}}, + }); } this.isRefresh = false; diff --git a/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionDuration.vue b/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionDuration.vue index 7bb9996f06..97cc89b1ba 100644 --- a/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionDuration.vue +++ b/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionDuration.vue @@ -10,9 +10,11 @@ - + - + {{ $t('api_test.request.assertions.add') }} @@ -71,7 +73,7 @@ export default { diff --git a/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionJsonPath.vue b/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionJsonPath.vue index 62532a8415..91a4400b91 100644 --- a/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionJsonPath.vue +++ b/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionJsonPath.vue @@ -27,9 +27,11 @@ - + - + {{ $t('api_test.request.assertions.add') }} @@ -124,7 +126,7 @@ export default { } .assertion-btn { - text-align: center; - width: 80px; + text-align: right; + width: 180px; } diff --git a/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionRegex.vue b/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionRegex.vue index 33daa97cad..bf9c0e9f31 100644 --- a/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionRegex.vue +++ b/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionRegex.vue @@ -116,7 +116,7 @@ export default { } .assertion-btn { - text-align: center; + text-align: right; width: 180px; } diff --git a/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionXPath2.vue b/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionXPath2.vue index ffa73eb815..6c1997d8eb 100644 --- a/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionXPath2.vue +++ b/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionXPath2.vue @@ -7,9 +7,11 @@ - + - + {{ $t('api_test.request.assertions.add') }} @@ -60,7 +62,7 @@ export default { diff --git a/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionsEdit.vue b/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionsEdit.vue index d6eee4c8d1..028abfb801 100644 --- a/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionsEdit.vue +++ b/framework/sdk-parent/frontend/src/components/environment/assertion/ApiAssertionsEdit.vue @@ -116,7 +116,7 @@ export default { computed: { isShow() { let rt = this.assertions.duration; - return rt.value && rt.value !== 0; + return rt.value && rt.value !== 0; }, isDocument() { return this.assertions.document && this.assertions.document.data && (this.assertions.document.data.json.length > 0 || this.assertions.document.data.xml.length > 0); @@ -176,7 +176,7 @@ export default { } .assertion-remove-btn { - text-align: center; - width: 80px; + text-align: right; + width: 180px; } diff --git a/framework/sdk-parent/frontend/src/components/environment/assertion/GlobalAssertionText.vue b/framework/sdk-parent/frontend/src/components/environment/assertion/GlobalAssertionText.vue index 29424b307e..c3aa8cb2d1 100644 --- a/framework/sdk-parent/frontend/src/components/environment/assertion/GlobalAssertionText.vue +++ b/framework/sdk-parent/frontend/src/components/environment/assertion/GlobalAssertionText.vue @@ -38,7 +38,7 @@