mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 20:19:16 +08:00
fix(测试跟踪): 复制功能用例只复制当前版本(没做其他信息的复制)
This commit is contained in:
parent
1a4c5f346c
commit
4dd4b4c8d2
@ -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);
|
||||
}
|
||||
|
||||
|
@ -624,7 +624,9 @@ export default {
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
this.getComments(this.currentTestCaseInfo);
|
||||
if (this.type !== 'copy') {
|
||||
this.getComments(this.currentTestCaseInfo);
|
||||
}
|
||||
},
|
||||
handlePre() {
|
||||
this.index--;
|
||||
|
@ -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);
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user