fix: 导入用例自定义id重复判断大小写

--bug=1013375 --user=陈建星 【测试跟踪】GitHub#13815 功能用例,系统未对导入的用例判断ID大小写 https://www.tapd.cn/55049933/s/1163994
This commit is contained in:
chenjianxing 2022-05-25 17:44:40 +08:00 committed by jianxing
parent 2c24d6178c
commit 91cfb29913
3 changed files with 6 additions and 7 deletions

View File

@ -165,14 +165,14 @@ public class TestCaseNoModelDataListener extends AnalysisEventListener<Map<Integ
String customId = data.getCustomNum();
if (StringUtils.isEmpty(customId)) {
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") + ";");
} else if (StringUtils.equals(FunctionCaseImportEnum.Create.name(), importType) && savedCustomIds.contains(customId)) {
stringBuilder.append(Translator.get("custom_num_is_exist") + ";");
} else if (StringUtils.equals(FunctionCaseImportEnum.Update.name(), importType) && !savedCustomIds.contains(customId)) {
stringBuilder.append(Translator.get("custom_num_is_not_exist") + ";");
} else {
customIds.add(customId);
customIds.add(customId.toLowerCase());
}
}
}

View File

@ -632,7 +632,6 @@ export default {
},
refreshAll() {
this.$refs.nodeTree.list();
this.refresh();
},
openRecentTestCaseEditDialog(caseId) {
if (caseId) {

View File

@ -961,7 +961,7 @@ export default {
_handleDeleteToGc(testCase) {
let testCaseId = testCase.id;
this.$post('/test/case/deleteToGc/' + testCaseId, {}, () => {
this.$emit('refreshTable');
this.$emit('refreshAll');
this.initTableData();
this.$success(this.$t('commons.delete_success'));
});
@ -1126,13 +1126,13 @@ export default {
this.$get('/test/case/deletePublic/' + testCase.versionId + '/' + testCase.refId, () => {
this.$success(this.$t('commons.delete_success'));
this.$refs.apiDeleteConfirm.close();
this.$emit("refreshTable");
this.$emit("refreshAll");
});
} else {
this.$get('/test/case/delete/' + testCase.versionId + '/' + testCase.refId, () => {
this.$success(this.$t('commons.delete_success'));
this.$refs.apiDeleteConfirm.close();
this.$emit("refreshTable");
this.$emit("refreshAll");
});
}
}
@ -1144,7 +1144,7 @@ export default {
this.$success(this.$t('commons.delete_success'));
// this.initTable();
this.$refs.apiDeleteConfirm.close();
this.$emit("refreshTable");
this.$emit("refreshAll");
});
} else {