fix(接口测试): 修复场景清空断言的缺陷

--bug=1027300 --user=王孝刚 【接口测试】场景引用case和场景的原始断言-点击清空JSONPath断言-断言被删除了
https://www.tapd.cn/55049933/s/1384927
This commit is contained in:
wxg0103 2023-06-21 15:48:33 +08:00 committed by fit2-zhao
parent ef09d69d83
commit 4fd4152bcf
1 changed files with 6 additions and 1 deletions

View File

@ -247,7 +247,12 @@ export default {
this.assertions.jsonPath.push(jsonItem);
},
clearJson() {
this.assertions.jsonPath = [];
if (this.assertions.jsonPath) {
const tmpArr = this.assertions.jsonPath.filter((item) =>
!item.label
);
this.assertions.jsonPath = tmpArr;
}
},
},
};