fix(接口测试): 修复新建case保存环境失败的缺陷
--bug=1021225 --user=王孝刚 【接口测试】新建接口用例,环境保存失败 https://www.tapd.cn/55049933/s/1319278
This commit is contained in:
parent
9290f6a697
commit
a7e994283c
|
@ -713,7 +713,7 @@ export default {
|
|||
if (!hideAlert) {
|
||||
this.$emit('refresh');
|
||||
}
|
||||
this.$emit('refreshCaseList');
|
||||
this.$emit('refreshCaseList',row.id);
|
||||
},
|
||||
(error) => {
|
||||
this.isSave = false;
|
||||
|
|
|
@ -437,8 +437,20 @@ export default {
|
|||
refresh() {
|
||||
this.$emit('refresh');
|
||||
},
|
||||
refreshCaseList() {
|
||||
this.getApiTest(true, true);
|
||||
refreshCaseList(id) {
|
||||
return new Promise((resolve) => {
|
||||
let commonUseEnvironment = store.useEnvironment;
|
||||
this.environment = commonUseEnvironment ? commonUseEnvironment : '';
|
||||
getCaseById(id).then((response) => {
|
||||
let apiCase = response.data;
|
||||
if (apiCase) {
|
||||
this.formatCase(apiCase);
|
||||
apiCase.active = true;
|
||||
this.apiCaseList = [apiCase];
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
},
|
||||
reLoadCase() {
|
||||
this.$emit('reLoadCase');
|
||||
|
|
Loading…
Reference in New Issue