fix(接口定义): 修复引用场景包含条件控制器仍可以开启禁用的缺陷
--bug=1019922 --user=王孝刚 【接口测试】场景引用其他场景,第一次引用过来后可以开启禁用的步骤 https://www.tapd.cn/55049933/s/1302664
This commit is contained in:
parent
1931739abb
commit
705dcca705
|
@ -1509,7 +1509,7 @@ export default {
|
||||||
if (!item.hashTree) {
|
if (!item.hashTree) {
|
||||||
item.hashTree = [];
|
item.hashTree = [];
|
||||||
}
|
}
|
||||||
this.resetResourceId(item.hashTree);
|
this.resetResourceId(item.hashTree, item.referenced);
|
||||||
item.enable === undefined ? (item.enable = true) : item.enable;
|
item.enable === undefined ? (item.enable = true) : item.enable;
|
||||||
item.variableEnable = item.variableEnable === undefined ? true : item.variableEnable;
|
item.variableEnable = item.variableEnable === undefined ? true : item.variableEnable;
|
||||||
if (this.selectedTreeNode) {
|
if (this.selectedTreeNode) {
|
||||||
|
@ -1638,15 +1638,15 @@ export default {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
resetResourceId(hashTree) {
|
resetResourceId(hashTree, referenced) {
|
||||||
hashTree.forEach((item) => {
|
hashTree.forEach((item) => {
|
||||||
item.resourceId = item.resourceId || getUUID();
|
item.resourceId = item.resourceId || getUUID();
|
||||||
//引用的场景如果原场景的步骤被禁用了,引用的场景的步骤不可以启用
|
//引用的场景如果原场景的步骤被禁用了,引用的场景的步骤不可以启用
|
||||||
if (item.referenced === 'REF' && !item.enable) {
|
if (referenced === 'REF' && !item.enable) {
|
||||||
item.refEnable = true;
|
item.refEnable = true;
|
||||||
}
|
}
|
||||||
if (item.hashTree && item.hashTree.length > 0) {
|
if (item.hashTree && item.hashTree.length > 0) {
|
||||||
this.resetResourceId(item.hashTree);
|
this.resetResourceId(item.hashTree, referenced);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1657,7 +1657,7 @@ export default {
|
||||||
let obj = JSON.parse(JSON.stringify(row));
|
let obj = JSON.parse(JSON.stringify(row));
|
||||||
obj.resourceId = getUUID();
|
obj.resourceId = getUUID();
|
||||||
if (obj.hashTree && obj.hashTree.length > 0) {
|
if (obj.hashTree && obj.hashTree.length > 0) {
|
||||||
this.resetResourceId(obj.hashTree);
|
this.resetResourceId(obj.hashTree, obj.referenced);
|
||||||
}
|
}
|
||||||
if (obj.name) {
|
if (obj.name) {
|
||||||
obj.name = obj.name + '_copy';
|
obj.name = obj.name + '_copy';
|
||||||
|
|
Loading…
Reference in New Issue