fix(测试跟踪): 复制功能用例只复制当前版本(没做其他信息的复制)

This commit is contained in:
zhangdahai112 2022-01-16 02:20:38 +08:00 committed by zhangdahai112
parent 1a4c5f346c
commit 4dd4b4c8d2
3 changed files with 8 additions and 2 deletions

View File

@ -210,7 +210,6 @@ public class TestCaseController {
@SendNotice(taskType = NoticeConstants.TaskType.TRACK_TEST_CASE_TASK, targetClass = TestCaseMapper.class,
event = NoticeConstants.Event.CREATE, mailTemplate = "track/TestCaseCreate", subject = "测试用例通知")
public TestCase addTestCase(@RequestPart("request") EditTestCaseRequest request, @RequestPart(value = "file", required = false) List<MultipartFile> files) {
request.setId(UUID.randomUUID().toString());
return testCaseService.save(request, files);
}

View File

@ -624,7 +624,9 @@ export default {
if (callback) {
callback();
}
if (this.type !== 'copy') {
this.getComments(this.currentTestCaseInfo);
}
},
handlePre() {
this.index--;

View File

@ -275,6 +275,7 @@ import TestCasePreview from "@/business/components/track/case/components/TestCas
import {editTestCaseOrder} from "@/network/testCase";
import {getGraphByCondition} from "@/network/graph";
import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar";
import {getUUID} from "@/common/js/utils";
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
const relationshipGraphDrawer = requireComponent.keys().length > 0 ? requireComponent("./graph/RelationshipGraphDrawer.vue") : {};
@ -856,6 +857,10 @@ export default {
this.$get('test/case/get/' + testCase.id, response => {
let testCase = response.data;
testCase.name = 'copy_' + testCase.name;
//
testCase.id = getUUID();
testCase.refId = null;
testCase.versionId = null;
this.$emit('testCaseCopy', testCase);
});
},