fix(测试跟踪): 添加到用例库校验是否开启用例库
--bug=1023684 --user=陈建星 【测试跟踪】项目未开启公共用例库开关-用例详情页-点击添加到公共用例库-也能添加成功 https://www.tapd.cn/55049933/s/1341404
This commit is contained in:
parent
e9533a097d
commit
1e384f2e2c
|
@ -346,7 +346,12 @@ import {
|
|||
hasTestCaseOtherInfo,
|
||||
testCaseEditFollows,
|
||||
testCaseGetByVersionId,
|
||||
testCaseDeleteToGc, getTestCaseNodesByCaseFilter, getTestCaseByVersionId, getEditSimpleTestCase, getSimpleTestCase,
|
||||
testCaseDeleteToGc,
|
||||
getTestCaseNodesByCaseFilter,
|
||||
getTestCaseByVersionId,
|
||||
getEditSimpleTestCase,
|
||||
getSimpleTestCase,
|
||||
testCaseBatchEdit,
|
||||
} from "@/api/testCase";
|
||||
|
||||
import {
|
||||
|
@ -886,12 +891,28 @@ export default {
|
|||
}
|
||||
},
|
||||
addPublic() {
|
||||
this.casePublic = true;
|
||||
this.saveCase(true);
|
||||
getProjectApplicationConfig('CASE_PUBLIC')
|
||||
.then(res => {
|
||||
let data = res.data;
|
||||
if (data && data.typeValue === 'true') {
|
||||
this.casePublic = true;
|
||||
this.saveCase(true);
|
||||
} else {
|
||||
this.$warning(this.$t('test_track.case.public_warning'), false);
|
||||
}
|
||||
});
|
||||
},
|
||||
removePublic() {
|
||||
this.casePublic = false;
|
||||
this.saveCase(true);
|
||||
getProjectApplicationConfig('CASE_PUBLIC')
|
||||
.then(res => {
|
||||
let data = res.data;
|
||||
if (data && data.typeValue === 'true') {
|
||||
this.casePublic = false;
|
||||
this.saveCase(true);
|
||||
} else {
|
||||
this.$warning(this.$t('test_track.case.public_warning'), false);
|
||||
}
|
||||
});
|
||||
},
|
||||
handleCommand(e) {
|
||||
this.saveType = e;
|
||||
|
|
Loading…
Reference in New Issue