refactor(接口测试): 优化接口测试http协议前置操作过滤方法

This commit is contained in:
wxg0103 2022-03-24 16:17:20 +08:00 committed by fit2-zhao
parent 298f0990c0
commit a2928346b6
1 changed files with 14 additions and 9 deletions

View File

@ -302,17 +302,22 @@ export default {
hasLicense, hasLicense,
tabClick() { tabClick() {
this.$nextTick(() => { this.$nextTick(() => {
if (this.activeName === 'preOperate' && this.$refs.preStep) { setTimeout(() => {
this.$refs.preStep.filter(); this.filter(this.activeName);
} });
if (this.activeName === 'postOperate' && this.$refs.postStep) {
this.$refs.postStep.filter();
}
if (this.activeName === 'assertionsRule' && this.$refs.assertionsRule) {
this.$refs.assertionsRule.filter();
}
}); });
}, },
filter(activeName) {
if (activeName === 'preOperate' && this.$refs.preStep) {
this.$refs.preStep.filter();
}
if (activeName === 'postOperate' && this.$refs.postStep) {
this.$refs.postStep.filter();
}
if (activeName === 'assertionsRule' && this.$refs.assertionsRule) {
this.$refs.assertionsRule.filter();
}
},
generate() { generate() {
if (this.request.body && (this.request.body.jsonSchema || this.request.body.raw)) { if (this.request.body && (this.request.body.jsonSchema || this.request.body.raw)) {
if (!this.request.body.jsonSchema) { if (!this.request.body.jsonSchema) {