Merge remote-tracking branch 'origin/master' into master
This commit is contained in:
commit
7dba6df7b1
|
@ -191,7 +191,10 @@ export default {
|
|||
},
|
||||
saveRunTest() {
|
||||
this.change = false;
|
||||
|
||||
if (!this.validateEnableTest()) {
|
||||
this.$warning(this.$t('api_test.enable_validate_tip'));
|
||||
return;
|
||||
}
|
||||
this.save(() => {
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
this.runTest();
|
||||
|
@ -214,7 +217,6 @@ export default {
|
|||
item.id = fileId;
|
||||
this.test.bodyUploadIds.push(fileId);
|
||||
bodyUploadFiles.push(item.file);
|
||||
// item.file = undefined;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -224,6 +226,18 @@ export default {
|
|||
});
|
||||
return bodyUploadFiles;
|
||||
},
|
||||
validateEnableTest() {
|
||||
for (let scenario of this.test.scenarioDefinition) {
|
||||
if (scenario.enable) {
|
||||
for (let request of scenario.requests) {
|
||||
if (request.enable) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
resetBodyFile() {
|
||||
//下次保存不再上传已传文件
|
||||
this.test.scenarioDefinition.forEach(scenario => {
|
||||
|
|
|
@ -377,6 +377,7 @@ export default {
|
|||
value: "Value",
|
||||
create_performance_test: "Create Performance Test",
|
||||
export_config: "Export",
|
||||
enable_validate_tip: "No request available",
|
||||
environment: {
|
||||
name: "Environment Name",
|
||||
socket: "Socket",
|
||||
|
|
|
@ -378,6 +378,7 @@ export default {
|
|||
value: "值",
|
||||
create_performance_test: "创建性能测试",
|
||||
export_config: "导出",
|
||||
enable_validate_tip: "没有可用请求",
|
||||
environment: {
|
||||
name: "环境名称",
|
||||
socket: "环境域名",
|
||||
|
|
|
@ -376,6 +376,7 @@ export default {
|
|||
value: "值",
|
||||
create_performance_test: "創建性能測試",
|
||||
export_config: "匯出",
|
||||
enable_validate_tip: "沒有可用請求",
|
||||
environment: {
|
||||
name: "環境名稱",
|
||||
socket: "環境域名",
|
||||
|
|
Loading…
Reference in New Issue