refactor(测试跟踪): 取消左侧模块树8层限制

--story=1012494 --user=宋昌昌 #25502 取消模块树8层限制 https://www.tapd.cn/55049933/s/1397706
This commit is contained in:
song-cc-rock 2023-07-26 12:01:57 +08:00 committed by 刘瑞斌
parent 015596d07b
commit d531082510
7 changed files with 9 additions and 49 deletions

View File

@ -246,10 +246,6 @@ public class ApiModuleService extends NodeTreeService<ApiModuleDTO> {
}
private void validateNode(ApiModule node) {
if (node.getLevel() > TestCaseConstants.MAX_NODE_DEPTH) {
MSException.throwException(Translator.get("test_case_node_level_tip")
+ TestCaseConstants.MAX_NODE_DEPTH + Translator.get("test_case_node_level"));
}
checkApiModuleExist(node);
}

View File

@ -208,10 +208,6 @@ public class ApiScenarioModuleService extends NodeTreeService<ApiScenarioModuleD
}
private void validateNode(ApiScenarioModule node) {
if (node.getLevel() > TestCaseConstants.MAX_NODE_DEPTH) {
MSException.throwException(Translator.get("test_case_node_level_tip")
+ TestCaseConstants.MAX_NODE_DEPTH + Translator.get("test_case_node_level"));
}
checkApiScenarioModuleExist(node);
}

View File

@ -234,11 +234,6 @@ export default {
add(param) {
param.projectId = this.projectId;
param.protocol = this.condition.protocol;
if (param && param.level >= 9) {
this.list();
this.$error(this.$t('commons.warning_module_add'));
return;
} else {
addScenarioModule(param).then(
() => {
this.$success(this.$t('commons.save_success'));
@ -248,7 +243,6 @@ export default {
this.list();
}
);
}
},
remove(nodeIds) {
delScenarioModule(nodeIds).then(

View File

@ -460,13 +460,6 @@ public class TestCaseNoModelDataListener extends AnalysisEventListener<Map<Integ
//校验所属模块"
if (nodePath != null) {
String[] nodes = nodePath.split("/");
//校验模块深度
if (nodes.length > TestCaseConstants.MAX_NODE_DEPTH + 1) {
stringBuilder.append(Translator.get("test_case_node_level_tip"))
.append(TestCaseConstants.MAX_NODE_DEPTH)
.append(Translator.get("test_case_node_level"))
.append("; ");
}
//模块名不能为空
for (int i = 0; i < nodes.length; i++) {
if (i != 0 && StringUtils.equals(nodes[i].trim(), StringUtils.EMPTY)) {

View File

@ -100,10 +100,6 @@ public class TestCaseNodeService extends NodeTreeService<TestCaseNodeDTO> {
}
private void validateNode(TestCaseNode node) {
if (node.getLevel() > TestCaseConstants.MAX_NODE_DEPTH) {
MSException.throwException(Translator.get("test_case_node_level_tip")
+ TestCaseConstants.MAX_NODE_DEPTH + Translator.get("test_case_node_level"));
}
this.checkTestCaseNodeExist(node);
}

View File

@ -115,10 +115,6 @@ public class XmindCaseParser {
public void validate() {
nodePaths.forEach(nodePath -> {
String[] nodes = nodePath.split("/");
if (nodes.length > TestCaseConstants.MAX_NODE_DEPTH + 1) {
process.add(Translator.get("test_case_node_level_tip") +
TestCaseConstants.MAX_NODE_DEPTH + Translator.get("test_case_node_level"), nodePath);
}
String path = StringUtils.EMPTY;
for (int i = 0; i < nodes.length; i++) {
if (i != 0 && StringUtils.equals(nodes[i].trim(), StringUtils.EMPTY)) {
@ -161,14 +157,6 @@ public class XmindCaseParser {
if (!StringUtils.isEmpty(nodePath)) {
String[] nodes = nodePath.split("/");
if (nodes.length > TestCaseConstants.MAX_NODE_DEPTH + 1) {
validatePass = false;
process.add(Translator.get("test_case_node_level_tip") +
TestCaseConstants.MAX_NODE_DEPTH + Translator.get("test_case_node_level"), nodePath);
if (!errorPath.contains(nodePath)) {
errorPath.add(nodePath);
}
}
for (int i = 0; i < nodes.length; i++) {
if (i != 0 && StringUtils.equals(nodes[i].trim(), StringUtils.EMPTY)) {
validatePass = false;

View File

@ -509,9 +509,6 @@ export default {
this.saveModuleNodeMap.set(module.id, node);
if (module.level > 8) {
this.throwError(this.$t('commons.module_deep_limit'));
}
if (module.name.trim().length > 100) {
this.throwError( this.$t('test_track.module.name') + this.$t('test_track.length_less_than') + 100);
}