From 1c86838b8b2d65a8d97a677abb4617b4aa06ca37 Mon Sep 17 00:00:00 2001 From: baiqi Date: Wed, 13 Mar 2024 17:56:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E5=9C=BA=E6=99=AF):=20?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E5=A4=A7=E6=A1=86=E6=9E=B6&=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AE=9A=E4=B9=89=E5=88=97=E8=A1=A8=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/pure/ms-detail-card/index.vue | 7 +- frontend/src/config/pathMap.ts | 32 +++- frontend/src/enums/apiEnum.ts | 16 ++ frontend/src/locale/en-US/index.ts | 1 + frontend/src/locale/zh-CN/index.ts | 1 + .../components/requestComposition/index.vue | 123 ++++++------ .../requestComposition/response/edit.vue | 7 +- frontend/src/views/api-test/debug/index.vue | 3 + .../components/management/api/apiTable.vue | 10 +- .../components/management/api/index.vue | 21 +- .../src/views/api-test/management/index.vue | 5 +- .../scenario/components/assertion.vue | 7 + .../scenario/components/changeHistory.vue | 7 + .../scenario/components/dependency.vue | 7 + .../scenario/components/executeHistory.vue | 7 + .../api-test/scenario/components/params.vue | 7 + .../api-test/scenario/components/prePost.vue | 7 + .../api-test/scenario/components/quote.vue | 7 + .../api-test/scenario/components/setting.vue | 7 + .../scenario/components/step/index.vue | 7 + .../views/api-test/scenario/create/index.vue | 7 + .../views/api-test/scenario/detail/index.vue | 180 ++++++++++++++++++ .../src/views/api-test/scenario/index.vue | 49 ++++- .../views/api-test/scenario/locale/en-US.ts | 14 +- .../views/api-test/scenario/locale/zh-CN.ts | 14 +- 25 files changed, 463 insertions(+), 90 deletions(-) create mode 100644 frontend/src/views/api-test/scenario/components/assertion.vue create mode 100644 frontend/src/views/api-test/scenario/components/changeHistory.vue create mode 100644 frontend/src/views/api-test/scenario/components/dependency.vue create mode 100644 frontend/src/views/api-test/scenario/components/executeHistory.vue create mode 100644 frontend/src/views/api-test/scenario/components/params.vue create mode 100644 frontend/src/views/api-test/scenario/components/prePost.vue create mode 100644 frontend/src/views/api-test/scenario/components/quote.vue create mode 100644 frontend/src/views/api-test/scenario/components/setting.vue create mode 100644 frontend/src/views/api-test/scenario/components/step/index.vue create mode 100644 frontend/src/views/api-test/scenario/create/index.vue create mode 100644 frontend/src/views/api-test/scenario/detail/index.vue diff --git a/frontend/src/components/pure/ms-detail-card/index.vue b/frontend/src/components/pure/ms-detail-card/index.vue index 63f94441e7..10c0625204 100644 --- a/frontend/src/components/pure/ms-detail-card/index.vue +++ b/frontend/src/components/pure/ms-detail-card/index.vue @@ -32,7 +32,12 @@ - +
{{ t('msDetailCard.collapse') }} diff --git a/frontend/src/config/pathMap.ts b/frontend/src/config/pathMap.ts index 31f22128fb..5c5080260a 100644 --- a/frontend/src/config/pathMap.ts +++ b/frontend/src/config/pathMap.ts @@ -59,11 +59,41 @@ export const pathMap: PathMapItem[] = [ ], }, { - key: 'API_TEST_MANAGEMENT', // 接口测试-接口管理 + key: 'API_TEST_MANAGEMENT', // 接口测试-接口定义 locale: 'menu.apiTest.management', route: RouteEnum.API_TEST_MANAGEMENT, permission: [], level: MENU_LEVEL[2], + children: [ + { + key: 'API_TEST_MANAGEMENT_MODULE', // 接口测试-接口定义-模块 + locale: 'common.module', + route: RouteEnum.API_TEST_MANAGEMENT, + permission: [], + level: MENU_LEVEL[2], + }, + { + key: 'API_TEST_MANAGEMENT_DEFINITION', // 接口测试-接口定义 + locale: 'menu.apiTest.management.definition', + route: RouteEnum.API_TEST_MANAGEMENT, + permission: [], + level: MENU_LEVEL[2], + }, + { + key: 'API_TEST_MANAGEMENT_MOCK', // 接口测试-接口定义-mock + locale: 'MOCK', + route: RouteEnum.API_TEST_MANAGEMENT, + permission: [], + level: MENU_LEVEL[2], + }, + { + key: 'API_TEST_MANAGEMENT_CASE', // 接口测试-接口定义-case + locale: 'CASE', + route: RouteEnum.API_TEST_MANAGEMENT, + permission: [], + level: MENU_LEVEL[2], + }, + ], }, { key: 'API_TEST_REPORT', // 接口测试-接口测试报告 diff --git a/frontend/src/enums/apiEnum.ts b/frontend/src/enums/apiEnum.ts index 458598d10c..7107722b6b 100644 --- a/frontend/src/enums/apiEnum.ts +++ b/frontend/src/enums/apiEnum.ts @@ -213,3 +213,19 @@ export enum RequestCaseStatus { PROCESSING = 'PROCESSING', DONE = 'DONE', } +// 创建接口场景组成部分 +export enum ScenarioCreateComposition { + STEP = 'STEP', + PARAMS = 'PARAMS', + PRE_POST = 'PRE_POST', + ASSERTION = 'ASSERTION', + SETTING = 'SETTING', +} +// 接口场景详情组成部分 +export enum ScenarioDetailComposition { + BASE_INFO = 'BASE_INFO', + EXECUTE_HISTORY = 'EXECUTE_HISTORY', + CHANGE_HISTORY = 'CHANGE_HISTORY', + DEPENDENCY = 'DEPENDENCY', + QUOTE = 'QUOTE', +} diff --git a/frontend/src/locale/en-US/index.ts b/frontend/src/locale/en-US/index.ts index c9d8a04043..744a7884c9 100644 --- a/frontend/src/locale/en-US/index.ts +++ b/frontend/src/locale/en-US/index.ts @@ -27,6 +27,7 @@ export default { 'menu.apiTest.debug': 'API debug', 'menu.apiTest.debug.debug': 'Debug', 'menu.apiTest.management': 'API Management', + 'menu.apiTest.management.definition': 'API Definition', 'menu.apiTest.scenario': 'API Scenario', 'menu.apiTest.report': 'API Report', 'menu.uiTest': 'UI Test', diff --git a/frontend/src/locale/zh-CN/index.ts b/frontend/src/locale/zh-CN/index.ts index 61dd322280..f9142942c9 100644 --- a/frontend/src/locale/zh-CN/index.ts +++ b/frontend/src/locale/zh-CN/index.ts @@ -27,6 +27,7 @@ export default { 'menu.apiTest.debug': '接口调试', 'menu.apiTest.debug.debug': '调试', 'menu.apiTest.management': '接口管理', + 'menu.apiTest.management.definition': '接口定义', 'menu.apiTest.api': 'API列表', 'menu.apiTest.scenario': '接口场景', 'menu.apiTest.report': '接口报告', diff --git a/frontend/src/views/api-test/components/requestComposition/index.vue b/frontend/src/views/api-test/components/requestComposition/index.vue index d19bd89499..8e224303be 100644 --- a/frontend/src/views/api-test/components/requestComposition/index.vue +++ b/frontend/src/views/api-test/components/requestComposition/index.vue @@ -483,6 +483,7 @@ + + diff --git a/frontend/src/views/api-test/scenario/components/changeHistory.vue b/frontend/src/views/api-test/scenario/components/changeHistory.vue new file mode 100644 index 0000000000..208d5d487d --- /dev/null +++ b/frontend/src/views/api-test/scenario/components/changeHistory.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/frontend/src/views/api-test/scenario/components/dependency.vue b/frontend/src/views/api-test/scenario/components/dependency.vue new file mode 100644 index 0000000000..f2a6dcee2a --- /dev/null +++ b/frontend/src/views/api-test/scenario/components/dependency.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/frontend/src/views/api-test/scenario/components/executeHistory.vue b/frontend/src/views/api-test/scenario/components/executeHistory.vue new file mode 100644 index 0000000000..514abb1fda --- /dev/null +++ b/frontend/src/views/api-test/scenario/components/executeHistory.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/frontend/src/views/api-test/scenario/components/params.vue b/frontend/src/views/api-test/scenario/components/params.vue new file mode 100644 index 0000000000..e140bbe2b7 --- /dev/null +++ b/frontend/src/views/api-test/scenario/components/params.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/frontend/src/views/api-test/scenario/components/prePost.vue b/frontend/src/views/api-test/scenario/components/prePost.vue new file mode 100644 index 0000000000..db64ae0beb --- /dev/null +++ b/frontend/src/views/api-test/scenario/components/prePost.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/frontend/src/views/api-test/scenario/components/quote.vue b/frontend/src/views/api-test/scenario/components/quote.vue new file mode 100644 index 0000000000..e9821feaf2 --- /dev/null +++ b/frontend/src/views/api-test/scenario/components/quote.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/frontend/src/views/api-test/scenario/components/setting.vue b/frontend/src/views/api-test/scenario/components/setting.vue new file mode 100644 index 0000000000..8c32680165 --- /dev/null +++ b/frontend/src/views/api-test/scenario/components/setting.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/frontend/src/views/api-test/scenario/components/step/index.vue b/frontend/src/views/api-test/scenario/components/step/index.vue new file mode 100644 index 0000000000..3fa072c1ed --- /dev/null +++ b/frontend/src/views/api-test/scenario/components/step/index.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/frontend/src/views/api-test/scenario/create/index.vue b/frontend/src/views/api-test/scenario/create/index.vue new file mode 100644 index 0000000000..553aa07a32 --- /dev/null +++ b/frontend/src/views/api-test/scenario/create/index.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/frontend/src/views/api-test/scenario/detail/index.vue b/frontend/src/views/api-test/scenario/detail/index.vue new file mode 100644 index 0000000000..876ade1098 --- /dev/null +++ b/frontend/src/views/api-test/scenario/detail/index.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/frontend/src/views/api-test/scenario/index.vue b/frontend/src/views/api-test/scenario/index.vue index 98e3df8898..e1b43c144c 100644 --- a/frontend/src/views/api-test/scenario/index.vue +++ b/frontend/src/views/api-test/scenario/index.vue @@ -1,10 +1,23 @@