fix (接口测试): 用例名称长度保护,修复场景步骤拖拽问题
--bug=1006430 --user=赵勇 【github#5962】场景中... https://www.tapd.cn/55049933/s/1046239
This commit is contained in:
parent
2c2ad8c463
commit
0125a38b2d
|
@ -1110,14 +1110,8 @@ export default {
|
||||||
this.getEnvironments();
|
this.getEnvironments();
|
||||||
},
|
},
|
||||||
allowDrop(draggingNode, dropNode, dropType) {
|
allowDrop(draggingNode, dropNode, dropType) {
|
||||||
if(dropNode.data.disabled){
|
if (dropType != "inner") {
|
||||||
return false;
|
if (draggingNode.data.disabled && draggingNode.parent && draggingNode.parent.data && draggingNode.parent.data.disabled) {
|
||||||
}
|
|
||||||
if (dropType != "inner" && !draggingNode.data.disabled) {
|
|
||||||
if (draggingNode.data.referenced) {
|
|
||||||
if (draggingNode.data.referenced !== 'REF' && draggingNode.data.referenced !== 'Deleted') {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -428,9 +428,7 @@ export default {
|
||||||
this.$success(this.$t('commons.save_success'));
|
this.$success(this.$t('commons.save_success'));
|
||||||
this.reload();
|
this.reload();
|
||||||
// 刷新编辑后用例列表
|
// 刷新编辑后用例列表
|
||||||
if (this.api.source === "editCase") {
|
|
||||||
this.$store.state.currentApiCase = {refresh: "true"};
|
this.$store.state.currentApiCase = {refresh: "true"};
|
||||||
}
|
|
||||||
if (!hideAlert) {
|
if (!hideAlert) {
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
}
|
}
|
||||||
|
@ -438,6 +436,10 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
saveTestCase(row, hideAlert) {
|
saveTestCase(row, hideAlert) {
|
||||||
|
if (row.name && row.name.length > 50) {
|
||||||
|
this.$warning("用例名称最大长度为 50 ");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (this.api.saved) {
|
if (this.api.saved) {
|
||||||
this.addModule(row);
|
this.addModule(row);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue