fix: 导入用例自定义id重复判断大小写
--bug=1013375 --user=陈建星 【测试跟踪】GitHub#13815 功能用例,系统未对导入的用例判断ID大小写 https://www.tapd.cn/55049933/s/1163994
This commit is contained in:
parent
2c24d6178c
commit
91cfb29913
|
@ -165,14 +165,14 @@ public class TestCaseNoModelDataListener extends AnalysisEventListener<Map<Integ
|
||||||
String customId = data.getCustomNum();
|
String customId = data.getCustomNum();
|
||||||
if (StringUtils.isEmpty(customId)) {
|
if (StringUtils.isEmpty(customId)) {
|
||||||
stringBuilder.append(Translator.get("id_required") + ";");
|
stringBuilder.append(Translator.get("id_required") + ";");
|
||||||
} else if (customIds.contains(customId)) {
|
} else if (customIds.contains(customId.toLowerCase())) {
|
||||||
stringBuilder.append(Translator.get("id_repeat_in_table") + ";");
|
stringBuilder.append(Translator.get("id_repeat_in_table") + ";");
|
||||||
} else if (StringUtils.equals(FunctionCaseImportEnum.Create.name(), importType) && savedCustomIds.contains(customId)) {
|
} else if (StringUtils.equals(FunctionCaseImportEnum.Create.name(), importType) && savedCustomIds.contains(customId)) {
|
||||||
stringBuilder.append(Translator.get("custom_num_is_exist") + ";");
|
stringBuilder.append(Translator.get("custom_num_is_exist") + ";");
|
||||||
} else if (StringUtils.equals(FunctionCaseImportEnum.Update.name(), importType) && !savedCustomIds.contains(customId)) {
|
} else if (StringUtils.equals(FunctionCaseImportEnum.Update.name(), importType) && !savedCustomIds.contains(customId)) {
|
||||||
stringBuilder.append(Translator.get("custom_num_is_not_exist") + ";");
|
stringBuilder.append(Translator.get("custom_num_is_not_exist") + ";");
|
||||||
} else {
|
} else {
|
||||||
customIds.add(customId);
|
customIds.add(customId.toLowerCase());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -632,7 +632,6 @@ export default {
|
||||||
},
|
},
|
||||||
refreshAll() {
|
refreshAll() {
|
||||||
this.$refs.nodeTree.list();
|
this.$refs.nodeTree.list();
|
||||||
this.refresh();
|
|
||||||
},
|
},
|
||||||
openRecentTestCaseEditDialog(caseId) {
|
openRecentTestCaseEditDialog(caseId) {
|
||||||
if (caseId) {
|
if (caseId) {
|
||||||
|
|
|
@ -961,7 +961,7 @@ export default {
|
||||||
_handleDeleteToGc(testCase) {
|
_handleDeleteToGc(testCase) {
|
||||||
let testCaseId = testCase.id;
|
let testCaseId = testCase.id;
|
||||||
this.$post('/test/case/deleteToGc/' + testCaseId, {}, () => {
|
this.$post('/test/case/deleteToGc/' + testCaseId, {}, () => {
|
||||||
this.$emit('refreshTable');
|
this.$emit('refreshAll');
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
this.$success(this.$t('commons.delete_success'));
|
this.$success(this.$t('commons.delete_success'));
|
||||||
});
|
});
|
||||||
|
@ -1126,13 +1126,13 @@ export default {
|
||||||
this.$get('/test/case/deletePublic/' + testCase.versionId + '/' + testCase.refId, () => {
|
this.$get('/test/case/deletePublic/' + testCase.versionId + '/' + testCase.refId, () => {
|
||||||
this.$success(this.$t('commons.delete_success'));
|
this.$success(this.$t('commons.delete_success'));
|
||||||
this.$refs.apiDeleteConfirm.close();
|
this.$refs.apiDeleteConfirm.close();
|
||||||
this.$emit("refreshTable");
|
this.$emit("refreshAll");
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$get('/test/case/delete/' + testCase.versionId + '/' + testCase.refId, () => {
|
this.$get('/test/case/delete/' + testCase.versionId + '/' + testCase.refId, () => {
|
||||||
this.$success(this.$t('commons.delete_success'));
|
this.$success(this.$t('commons.delete_success'));
|
||||||
this.$refs.apiDeleteConfirm.close();
|
this.$refs.apiDeleteConfirm.close();
|
||||||
this.$emit("refreshTable");
|
this.$emit("refreshAll");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1144,7 +1144,7 @@ export default {
|
||||||
this.$success(this.$t('commons.delete_success'));
|
this.$success(this.$t('commons.delete_success'));
|
||||||
// this.initTable();
|
// this.initTable();
|
||||||
this.$refs.apiDeleteConfirm.close();
|
this.$refs.apiDeleteConfirm.close();
|
||||||
this.$emit("refreshTable");
|
this.$emit("refreshAll");
|
||||||
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue