refactor: 脑图在全部用例下创建用例提示错误
--bug=1009685 --user=陈建星 【测试跟踪】脑图编辑用例,复制粘贴保存后,原始用例没有了 https://www.tapd.cn/55049933/s/10934188
This commit is contained in:
parent
c8524f43ff
commit
dd1880facf
|
@ -248,9 +248,7 @@ name: "TestCaseMinder",
|
||||||
let pId = parent ? (parent.newId ? parent.newId : parent.id) : null;
|
let pId = parent ? (parent.newId ? parent.newId : parent.id) : null;
|
||||||
|
|
||||||
if (!isModuleNodeData(parent)) {
|
if (!isModuleNodeData(parent)) {
|
||||||
let tip = data.text + '不能创建非模块节点下';
|
this.throwError(this.$t('test_track.case.minder_not_module_tip', [data.text]));
|
||||||
this.$error(tip)
|
|
||||||
throw new Error(tip);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let module = {
|
let module = {
|
||||||
|
@ -303,16 +301,16 @@ name: "TestCaseMinder",
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (parent.id === 'root') {
|
||||||
|
this.throwError(this.$t('test_track.case.minder_all_module_tip'));
|
||||||
|
}
|
||||||
|
|
||||||
if (parent.isExtraNode) {
|
if (parent.isExtraNode) {
|
||||||
let tip = '无法在临时节点"' + parent.text + '"下创建用例';
|
this.throwError(this.$t('test_track.case.minder_tem_node_tip', [parent.text]));
|
||||||
this.$error(tip)
|
|
||||||
throw new Error(tip);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.type === 'node') {
|
if (data.type === 'node') {
|
||||||
let tip = data.text + '是模块,不能修改为用例';
|
this.throwError(this.$t('test_track.case.minder_is_module_tip', [data.text]));
|
||||||
this.$error(tip)
|
|
||||||
throw new Error(tip);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let isChange = false;
|
let isChange = false;
|
||||||
|
@ -405,9 +403,7 @@ name: "TestCaseMinder",
|
||||||
this.saveCases.push(testCase);
|
this.saveCases.push(testCase);
|
||||||
}
|
}
|
||||||
if (testCase.nodeId !== 'root' && testCase.nodeId.length < 15) {
|
if (testCase.nodeId !== 'root' && testCase.nodeId.length < 15) {
|
||||||
let tip = this.$t('test_track.case.create_case') + "'" + testCase.name + "'" + this.$t('test_track.case.minder_create_tip');
|
this.throwError(this.$t('test_track.case.create_case') + "'" + testCase.name + "'" + this.$t('test_track.case.minder_create_tip'));
|
||||||
this.$error(tip)
|
|
||||||
throw new Error(tip);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pushDeleteNode(data) {
|
pushDeleteNode(data) {
|
||||||
|
@ -446,6 +442,10 @@ name: "TestCaseMinder",
|
||||||
data.isExtraNode = true;
|
data.isExtraNode = true;
|
||||||
return nodeData;
|
return nodeData;
|
||||||
},
|
},
|
||||||
|
throwError(tip) {
|
||||||
|
this.$error(tip)
|
||||||
|
throw new Error(tip);
|
||||||
|
},
|
||||||
tagEditCheck() {
|
tagEditCheck() {
|
||||||
return tagEditCheck;
|
return tagEditCheck;
|
||||||
},
|
},
|
||||||
|
|
|
@ -1887,6 +1887,10 @@ export default {
|
||||||
minder_issue_delete_tip: "Successfully cancel the defect association",
|
minder_issue_delete_tip: "Successfully cancel the defect association",
|
||||||
check_select: "Please check the case",
|
check_select: "Please check the case",
|
||||||
export_all_cases: 'Are you sure you want to export all use cases?',
|
export_all_cases: 'Are you sure you want to export all use cases?',
|
||||||
|
minder_tem_node_tip: "Cannot create case {0} under the temporary node",
|
||||||
|
minder_is_module_tip: "{0} is a module and cannot be modified as a use ca",
|
||||||
|
minder_not_module_tip: "Module {0}, cannot be created under a non-module node",
|
||||||
|
minder_all_module_tip: 'All case are virtual modules. Please create use cases in other modules',
|
||||||
input_test_case: 'Please enter the associated case name',
|
input_test_case: 'Please enter the associated case name',
|
||||||
test_name: 'TestName',
|
test_name: 'TestName',
|
||||||
other: '--Other--',
|
other: '--Other--',
|
||||||
|
|
|
@ -1884,6 +1884,10 @@ export default {
|
||||||
text_describe_tip: "使用于简单的测试场景,没有明确的测试步骤",
|
text_describe_tip: "使用于简单的测试场景,没有明确的测试步骤",
|
||||||
change_type: "更改类型",
|
change_type: "更改类型",
|
||||||
minder_create_tip: "失败, 无法在脑图创建其父模块",
|
minder_create_tip: "失败, 无法在脑图创建其父模块",
|
||||||
|
minder_tem_node_tip: "无法在临时节点{0}下创建用例",
|
||||||
|
minder_is_module_tip: "{0}是模块,不能修改为用例",
|
||||||
|
minder_not_module_tip: "模块{0},不能创建在非模块节点下",
|
||||||
|
minder_all_module_tip: "全部用例为虚拟模块,请在其他模块创建用例",
|
||||||
minder_issue_delete_tip: "取消缺陷关联成功",
|
minder_issue_delete_tip: "取消缺陷关联成功",
|
||||||
check_select: "请勾选用例",
|
check_select: "请勾选用例",
|
||||||
export_all_cases: '确定要导出全部用例吗?',
|
export_all_cases: '确定要导出全部用例吗?',
|
||||||
|
|
|
@ -1884,6 +1884,10 @@ export default {
|
||||||
text_describe_tip: "使用於簡單的測試場景,沒有明確的測試步驟",
|
text_describe_tip: "使用於簡單的測試場景,沒有明確的測試步驟",
|
||||||
change_type: "更改類型",
|
change_type: "更改類型",
|
||||||
minder_create_tip: "失敗, 無法在腦圖創建其父模塊",
|
minder_create_tip: "失敗, 無法在腦圖創建其父模塊",
|
||||||
|
minder_tem_node_tip: "無法在臨時節點{0}下創建用例",
|
||||||
|
minder_is_module_tip: "{0}是模塊,不能修改為用例",
|
||||||
|
minder_not_module_tip: "模塊{0},不能創建在非模塊節點下",
|
||||||
|
minder_all_module_tip: "全部用例為虛擬模塊,請在其他模塊創建用例",
|
||||||
minder_issue_delete_tip: "取消缺陷關聯成功",
|
minder_issue_delete_tip: "取消缺陷關聯成功",
|
||||||
check_select: "請勾選用例",
|
check_select: "請勾選用例",
|
||||||
export_all_cases: '確定要導出全部用例嗎?',
|
export_all_cases: '確定要導出全部用例嗎?',
|
||||||
|
|
Loading…
Reference in New Issue