From 98a5ede3f6163fa1da64a75b25740a11a4088dcd Mon Sep 17 00:00:00 2001 From: q4speed Date: Mon, 20 Apr 2020 18:40:02 +0800 Subject: [PATCH] =?UTF-8?q?api=E6=B5=8B=E8=AF=95=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=EF=BC=8C=E6=9C=AA=E5=AE=8C=E5=BE=85=E7=BB=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/test/ApiScenarioConfig.vue | 174 ------------------ .../components/api/test/ApiTestConfig.vue | 94 ++++++++++ .../api/test/components/ApiAssertionRegex.vue | 15 +- .../components/ApiAssertionResponseTime.vue | 9 +- .../api/test/components/ApiAssertionText.vue | 20 +- .../api/test/components/ApiAssertions.vue | 2 +- .../api/test/components/ApiAssertionsEdit.vue | 2 +- .../api/test/components/ApiBody.vue | 2 +- .../api/test/components/ApiKeyValue.vue | 12 +- .../{ApiRequest.vue => ApiRequestConfig.vue} | 4 +- .../api/test/components/ApiRequestForm.vue | 1 - .../api/test/components/ApiScenarioConfig.vue | 161 ++++++++++++++++ .../api/test/components/ApiScenarioForm.vue | 1 - .../model/{APIModel.js => ScenarioModel.js} | 0 .../components/common/router/router.js | 6 +- frontend/src/i18n/zh-CN.js | 2 + 16 files changed, 302 insertions(+), 203 deletions(-) delete mode 100644 frontend/src/business/components/api/test/ApiScenarioConfig.vue create mode 100644 frontend/src/business/components/api/test/ApiTestConfig.vue rename frontend/src/business/components/api/test/components/{ApiRequest.vue => ApiRequestConfig.vue} (97%) create mode 100644 frontend/src/business/components/api/test/components/ApiScenarioConfig.vue rename frontend/src/business/components/api/test/model/{APIModel.js => ScenarioModel.js} (100%) diff --git a/frontend/src/business/components/api/test/ApiScenarioConfig.vue b/frontend/src/business/components/api/test/ApiScenarioConfig.vue deleted file mode 100644 index fd46816c96..0000000000 --- a/frontend/src/business/components/api/test/ApiScenarioConfig.vue +++ /dev/null @@ -1,174 +0,0 @@ - - - - - diff --git a/frontend/src/business/components/api/test/ApiTestConfig.vue b/frontend/src/business/components/api/test/ApiTestConfig.vue new file mode 100644 index 0000000000..a85f5edc15 --- /dev/null +++ b/frontend/src/business/components/api/test/ApiTestConfig.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/frontend/src/business/components/api/test/components/ApiAssertionRegex.vue b/frontend/src/business/components/api/test/components/ApiAssertionRegex.vue index 5dd59c026b..3c53617938 100644 --- a/frontend/src/business/components/api/test/components/ApiAssertionRegex.vue +++ b/frontend/src/business/components/api/test/components/ApiAssertionRegex.vue @@ -1,7 +1,7 @@ diff --git a/frontend/src/business/components/api/test/components/ApiAssertionResponseTime.vue b/frontend/src/business/components/api/test/components/ApiAssertionResponseTime.vue index d3f3e505cf..6275b7d67c 100644 --- a/frontend/src/business/components/api/test/components/ApiAssertionResponseTime.vue +++ b/frontend/src/business/components/api/test/components/ApiAssertionResponseTime.vue @@ -1,11 +1,11 @@ diff --git a/frontend/src/business/components/api/test/components/ApiAssertions.vue b/frontend/src/business/components/api/test/components/ApiAssertions.vue index 10c46cc7f7..838cb83576 100644 --- a/frontend/src/business/components/api/test/components/ApiAssertions.vue +++ b/frontend/src/business/components/api/test/components/ApiAssertions.vue @@ -24,7 +24,7 @@ import MsApiAssertionText from "./ApiAssertionText"; import MsApiAssertionRegex from "./ApiAssertionRegex"; import MsApiAssertionResponseTime from "./ApiAssertionResponseTime"; - import {ASSERTION_TYPE, Assertions, Regex} from "../model/APIModel"; + import {ASSERTION_TYPE, Assertions, Regex} from "../model/ScenarioModel"; import MsApiAssertionsEdit from "./ApiAssertionsEdit"; export default { diff --git a/frontend/src/business/components/api/test/components/ApiAssertionsEdit.vue b/frontend/src/business/components/api/test/components/ApiAssertionsEdit.vue index f07eefcdae..7179f3ff27 100644 --- a/frontend/src/business/components/api/test/components/ApiAssertionsEdit.vue +++ b/frontend/src/business/components/api/test/components/ApiAssertionsEdit.vue @@ -22,7 +22,7 @@ + + diff --git a/frontend/src/business/components/api/test/components/ApiScenarioForm.vue b/frontend/src/business/components/api/test/components/ApiScenarioForm.vue index 90bce81d15..59c0de6f83 100644 --- a/frontend/src/business/components/api/test/components/ApiScenarioForm.vue +++ b/frontend/src/business/components/api/test/components/ApiScenarioForm.vue @@ -34,7 +34,6 @@ activeName: "variables", rules: { name: [ - {required: true, message: this.$t('api_test.scenario.input_name'), trigger: 'blur'}, {max: 100, message: this.$t('commons.input_limit', [0, 100]), trigger: 'blur'} ], url: [ diff --git a/frontend/src/business/components/api/test/model/APIModel.js b/frontend/src/business/components/api/test/model/ScenarioModel.js similarity index 100% rename from frontend/src/business/components/api/test/model/APIModel.js rename to frontend/src/business/components/api/test/model/ScenarioModel.js diff --git a/frontend/src/business/components/common/router/router.js b/frontend/src/business/components/common/router/router.js index 01831e0eb5..04d52e0167 100644 --- a/frontend/src/business/components/common/router/router.js +++ b/frontend/src/business/components/common/router/router.js @@ -18,7 +18,7 @@ import PerformanceTestReport from "../../performance/report/PerformanceTestRepor import ApiTestReport from "../../api/report/ApiTestReport"; import ApiTest from "../../api/ApiTest"; import PerformanceTest from "../../performance/PerformanceTest"; -import ApiScenarioConfig from "../../api/test/ApiScenarioConfig"; +import ApiTestConfig from "../../api/test/ApiTestConfig"; import PerformanceTestHome from "../../performance/home/PerformanceTestHome"; import ApiTestList from "../../api/test/ApiTestList"; import ApiTestHome from "../../api/home/ApiTestHome"; @@ -97,12 +97,12 @@ const router = new VueRouter({ { path: 'test/create', name: "createAPITest", - component: ApiScenarioConfig, + component: ApiTestConfig, }, { path: "test/edit/:testId", name: "editAPITest", - component: ApiScenarioConfig, + component: ApiTestConfig, props: { content: (route) => { return { diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 5cfd619ca2..48d8bc9074 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -169,6 +169,8 @@ export default { 'resource_pool_is_null': '资源池为空', }, api_test: { + input_name: "请输入测试名称", + select_project: "请选择项目", scenario: { input_name: "请输入场景名称", name: "场景名称",