diff --git a/backend/src/main/resources/db/migration/V102__v1.15.5_release.sql b/backend/src/main/resources/db/migration/V102__v1.15.5_release.sql new file mode 100644 index 0000000000..748ca1c6cb --- /dev/null +++ b/backend/src/main/resources/db/migration/V102__v1.15.5_release.sql @@ -0,0 +1,2 @@ +ALTER TABLE api_definition_exec_result + MODIFY COLUMN name VARCHAR (255); \ No newline at end of file diff --git a/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue b/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue index d7fd938142..2fbd303ee3 100644 --- a/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue +++ b/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue @@ -6,7 +6,8 @@ @@ -408,9 +409,6 @@ export default { saveCase(row, hideAlert) { let tmp = JSON.parse(JSON.stringify(row)); this.isShowInput = false; - if (this.validate(tmp)) { - return; - } tmp.request.body = row.request.body; let bodyFiles = this.getBodyUploadFiles(tmp); tmp.projectId = getCurrentProjectID(); @@ -466,6 +464,9 @@ export default { }); }, saveTestCase(row, hideAlert) { + if (this.validate(row)) { + return; + } if (this.compare.indexOf(row.id) === -1) { this.compare.push(row.id); if (this.api.saved) { @@ -500,6 +501,10 @@ export default { this.$warning(this.$t('api_test.input_name')); return true; } + if (row.name.length > 100) { + this.$warning(this.$t('api_test.input_name_length')); + return true; + } }, showExecResult(item) { item.active = true; diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 9e36eb6569..965ccc18f6 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -985,6 +985,7 @@ export default { invert_select: "Invert select", select_or_invert: "Select all/Invert select", input_name: "Please enter the test name", + input_name_length: "The length of the test name cannot exceed 100", select_project: "Please select project", variable_name: "Variable name", variable: "Variable", diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index b8d25b1ba5..bb29d58789 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -992,6 +992,7 @@ export default { invert_select: "反选", select_or_invert: "全选/反选", input_name: "请输入测试名称", + input_name_length: "测试名称长度不能超过100", select_project: "请选择项目", variable_name: "变量名", variable: "变量", diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index 0de7b3276a..55c6f11e4f 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -989,6 +989,7 @@ export default { invert_select: "反選", select_or_invert: "全選/反選", input_name: "請輸入測試名稱", + input_name_length: "測試名稱長度不能超過100", select_project: "請選擇項目", variable_name: "變量名", variable: "變量",