fix(接口自动化): 忽略状态不改动

忽略状态不改动
This commit is contained in:
guoyuqi 2021-12-24 18:10:13 +08:00 committed by xiaomeinvG
parent 9956d40a57
commit 18c199aa72
5 changed files with 24 additions and 23 deletions

View File

@ -33,9 +33,6 @@
<div class="header-right" @click.stop>
<slot name="message"></slot>
<slot name="debugStepCode"></slot>
<el-checkbox v-model="data.assumeSuccess" class="assertion-checkbox" >
{{ $t('api_test.request.assertions.ignore_status') }}
</el-checkbox>
<el-tooltip :content="$t('test_resource_pool.enable_disable')" placement="top" v-if="showBtn">
<el-switch v-model="data.enable" class="enable-switch" size="mini" :disabled="data.disabled && !data.root" style="width: 30px"/>
</el-tooltip>
@ -262,8 +259,5 @@ fieldset {
cursor: pointer;
border-color: #783887;
}
.assertion-checkbox {
text-align: center;
width: 120px;
}
</style>

View File

@ -13,6 +13,11 @@
<el-input :disabled="isReadOnly" v-model="regex.expression" size="small" show-word-limit
:placeholder="$t('api_test.request.assertions.expression')"/>
</el-col>
<el-col class="assertion-checkbox">
<el-checkbox v-model="regex.assumeSuccess" :disabled="isReadOnly">
{{ $t('api_test.request.assertions.ignore_status') }}
</el-checkbox>
</el-col>
<el-col class="assertion-btn">
<el-button :disabled="isReadOnly" type="danger" size="mini" icon="el-icon-delete" circle @click="remove"
v-if="edit"/>
@ -46,11 +51,7 @@ export default {
isReadOnly: {
type: Boolean,
default: false
},
assumeSuccess: {
type: Boolean,
default: false
},
}
},
data() {
@ -79,7 +80,6 @@ export default {
getRegex() {
let regex = new Regex(this.regex);
regex.description = regex.subject + " has: " + regex.expression;
regex.assumeSuccess = this.assumeSuccess;
return regex;
},
setRegexDescription() {
@ -98,6 +98,11 @@ export default {
width: 100%;
}
.assertion-checkbox {
text-align: center;
width: 120px;
}
.assertion-btn {
text-align: center;
width: 60px;

View File

@ -35,7 +35,6 @@
<ms-api-assertion-regex
:is-read-only="isReadOnly"
:list="assertions.regex"
:assume-success = "assertions.assumeSuccess"
:callback="after"
v-if="type === options.REGEX"
/>
@ -174,7 +173,6 @@ export default {
this.reload();
},
copyRow() {
console.log("添加")
this.$emit('copyRow', this.assertions, this.node);
},
suggestJsonOpen() {
@ -219,7 +217,6 @@ export default {
this.assertions.jsonPath = [];
}
}
}
</script>

View File

@ -13,6 +13,11 @@
<el-input :disabled="isReadOnly" v-model="regex.expression" size="small" show-word-limit
:placeholder="$t('api_test.request.assertions.expression')"/>
</el-col>
<el-col class="assertion-checkbox">
<el-checkbox v-model="regex.assumeSuccess" :disabled="isReadOnly">
{{ $t('api_test.request.assertions.ignore_status') }}
</el-checkbox>
</el-col>
<el-col class="assertion-btn">
<el-button :disabled="isReadOnly" type="danger" size="mini" icon="el-icon-delete" circle @click="remove"
v-if="edit"/>
@ -47,11 +52,7 @@ export default {
isReadOnly: {
type: Boolean,
default: false
},
assumeSuccess: {
type: Boolean,
default: false
},
}
},
data() {
@ -80,7 +81,6 @@ export default {
getRegex() {
let regex = new Regex(this.regex);
regex.description = regex.subject + " has: " + regex.expression;
regex.assumeSuccess = this.assumeSuccess;
return regex;
},
setRegexDescription() {
@ -99,6 +99,11 @@ export default {
width: 100%;
}
.assertion-checkbox {
text-align: center;
width: 120px;
}
.assertion-btn {
text-align: center;
width: 60px;

View File

@ -17,7 +17,7 @@
<el-col :span="20">
<ms-api-assertion-text :is-read-only="isReadOnly" :list="assertions.regex" v-if="type === options.TEXT"
:callback="after"/>
<ms-api-assertion-regex :is-read-only="isReadOnly" :list="assertions.regex" :assume-success = "assertions.assumeSuccess" v-if="type === options.REGEX"
<ms-api-assertion-regex :is-read-only="isReadOnly" :list="assertions.regex" v-if="type === options.REGEX"
:callback="after"/>
<ms-api-assertion-json-path :is-read-only="isReadOnly" :list="assertions.jsonPath"
v-if="type === options.JSON_PATH" :callback="after"/>