fix(接口测试): 修复jmeter不填写路径导出的jmx文件导入到ms内,添加路径无法测试的缺陷

--bug=1025277 --user=王孝刚
【接口测试】github#23416,jmeter不填写路径导出的jmx文件导入到ms内,添加路径无法测试
https://www.tapd.cn/55049933/s/1361124
This commit is contained in:
wxg0103 2023-04-10 18:51:02 +08:00 committed by fit2-zhao
parent f9a49bc3d3
commit 099a5dfdcf
2 changed files with 7 additions and 3 deletions

View File

@ -250,10 +250,7 @@ export default {
required: true, required: true,
message: this.$t('api_test.definition.request.path_info'), message: this.$t('api_test.definition.request.path_info'),
trigger: 'blur', trigger: 'blur',
},
{
validator: validateURL, validator: validateURL,
trigger: 'blur',
}, },
], ],
userId: [ userId: [

View File

@ -145,6 +145,12 @@ export default {
ApiSyncCaseConfig, ApiSyncCaseConfig,
}, },
data() { data() {
let validateURL = (rule, value, callback) => {
if (!this.api.request.path.startsWith('/')) {
callback(this.$t('api_test.definition.request.path_valid_info'));
}
callback();
};
return { return {
visible: false, visible: false,
api: {}, api: {},
@ -170,6 +176,7 @@ export default {
required: true, required: true,
message: this.$t('api_test.definition.request.path_info'), message: this.$t('api_test.definition.request.path_info'),
trigger: 'blur', trigger: 'blur',
validator: validateURL,
}, },
], ],
}, },