From 3ed55b0e0741cbbcf2445b1f91c240a56d83cab9 Mon Sep 17 00:00:00 2001 From: baiqi Date: Thu, 9 May 2024 18:23:18 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=20=E6=96=AD=E8=A8=80&=E6=8F=90=E5=8F=96=E4=BC=98=E5=8C=96&?= =?UTF-8?q?=E9=83=A8=E5=88=86=20bug=20=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/pure/ms-card/index.vue | 2 +- frontend/src/enums/apiEnum.ts | 14 ++++ frontend/src/models/apiTest/common.ts | 22 +++++- frontend/src/models/setting/resourcePool.ts | 3 - .../api-test/components/condition/content.vue | 23 ++----- .../src/views/api-test/components/config.ts | 30 ++++++++ .../components/requestComposition/index.vue | 16 +++-- .../response/responseCodeTimeSize.vue | 2 +- .../requestComposition/response/result.vue | 14 ++-- .../response/result/assertionTable.vue | 39 +++++++++-- .../response/result/extractTable.vue | 69 +++++++++++++++++++ .../response/result/index.vue | 12 ++-- .../response/result/resValueScript.vue | 2 - .../src/views/api-test/debug/locale/en-US.ts | 4 ++ .../src/views/api-test/debug/locale/zh-CN.ts | 5 ++ .../management/mock/mockDetailDrawer.vue | 2 +- .../views/api-test/management/locale/en-US.ts | 6 ++ .../views/api-test/management/locale/zh-CN.ts | 6 ++ .../common/importApiDrawer/index.vue | 1 + .../scenario/components/step/index.vue | 1 + .../scenario/components/step/stepTree.vue | 33 +++++---- .../src/views/api-test/scenario/index.vue | 3 + .../setting/system/resourcePool/detail.vue | 54 ++++++++------- .../setting/system/resourcePool/index.vue | 43 ++++-------- 24 files changed, 293 insertions(+), 113 deletions(-) create mode 100644 frontend/src/views/api-test/components/requestComposition/response/result/extractTable.vue diff --git a/frontend/src/components/pure/ms-card/index.vue b/frontend/src/components/pure/ms-card/index.vue index c559f45719..ba9392f0ec 100644 --- a/frontend/src/components/pure/ms-card/index.vue +++ b/frontend/src/components/pure/ms-card/index.vue @@ -1,5 +1,5 @@ -
{{ - props.environmentName - }}
+
+ {{ props.environmentName }} +
diff --git a/frontend/src/views/api-test/components/requestComposition/response/result/resValueScript.vue b/frontend/src/views/api-test/components/requestComposition/response/result/resValueScript.vue index f9513f67f3..ebec280978 100644 --- a/frontend/src/views/api-test/components/requestComposition/response/result/resValueScript.vue +++ b/frontend/src/views/api-test/components/requestComposition/response/result/resValueScript.vue @@ -30,8 +30,6 @@ props.requestResult.headers }\nBody:\n${props.requestResult.body.trim()}` : ''; - case ResponseComposition.EXTRACT: - return props.requestResult?.responseResult?.vars?.trim(); default: return ''; } diff --git a/frontend/src/views/api-test/debug/locale/en-US.ts b/frontend/src/views/api-test/debug/locale/en-US.ts index af1fc727b6..a4acc758db 100644 --- a/frontend/src/views/api-test/debug/locale/en-US.ts +++ b/frontend/src/views/api-test/debug/locale/en-US.ts @@ -206,4 +206,8 @@ export default { 'Enter the column name and corresponding value in column storage. If you want to extract the first value of the name column, enter name_1', 'apiTestDebug.responseRepeatMessage': 'The name is duplicated, please re-enter it.', 'apiTestDebug.saveAsApi': 'Save as Api', + 'apiTestDebug.assertionItem': 'Assertion item', + 'apiTestDebug.actualValue': 'Actual value', + 'apiTestDebug.condition': 'condition', + 'apiTestDebug.expectedValue': 'Expected value', }; diff --git a/frontend/src/views/api-test/debug/locale/zh-CN.ts b/frontend/src/views/api-test/debug/locale/zh-CN.ts index 1b9becf1d8..c700e9a291 100644 --- a/frontend/src/views/api-test/debug/locale/zh-CN.ts +++ b/frontend/src/views/api-test/debug/locale/zh-CN.ts @@ -192,4 +192,9 @@ export default { 'apiTestDebug.extractValueTitleTip': '输入按列存储中的列名和对应的数值,如提取name列的第一个值则输入name_1', 'apiTestDebug.responseRepeatMessage': '名称重复,请重新输入', 'apiTestDebug.saveAsApi': '另存为接口', + 'apiTestDebug.assertionItem': '断言项', + 'apiTestDebug.actualValue': '返回值', + 'apiTestDebug.condition': '匹配条件', + 'apiTestDebug.expectedValue': '匹配值', + 'apiTestDebug.extractValue': '提取值', }; diff --git a/frontend/src/views/api-test/management/components/management/mock/mockDetailDrawer.vue b/frontend/src/views/api-test/management/components/management/mock/mockDetailDrawer.vue index 10c88a26bf..7cd9924884 100644 --- a/frontend/src/views/api-test/management/components/management/mock/mockDetailDrawer.vue +++ b/frontend/src/views/api-test/management/components/management/mock/mockDetailDrawer.vue @@ -15,7 +15,7 @@ @close="handleCancel" >