fix(接口自动化): 断言将忽略移到最外层
--bug=1004217 --user=郭雨琦 断言将忽略移到最外层
This commit is contained in:
parent
80431d81d5
commit
d04602ae67
|
@ -33,6 +33,9 @@
|
|||
<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>
|
||||
|
@ -259,5 +262,8 @@ fieldset {
|
|||
cursor: pointer;
|
||||
border-color: #783887;
|
||||
}
|
||||
|
||||
.assertion-checkbox {
|
||||
text-align: center;
|
||||
width: 120px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -13,11 +13,6 @@
|
|||
<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"/>
|
||||
|
@ -51,7 +46,11 @@ export default {
|
|||
isReadOnly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
assumeSuccess: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
|
@ -80,6 +79,7 @@ export default {
|
|||
getRegex() {
|
||||
let regex = new Regex(this.regex);
|
||||
regex.description = regex.subject + " has: " + regex.expression;
|
||||
regex.assumeSuccess = this.assumeSuccess;
|
||||
return regex;
|
||||
},
|
||||
setRegexDescription() {
|
||||
|
@ -98,11 +98,6 @@ export default {
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
.assertion-checkbox {
|
||||
text-align: center;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.assertion-btn {
|
||||
text-align: center;
|
||||
width: 60px;
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
<ms-api-assertion-regex
|
||||
:is-read-only="isReadOnly"
|
||||
:list="assertions.regex"
|
||||
:assume-success = "assertions.assumeSuccess"
|
||||
:callback="after"
|
||||
v-if="type === options.REGEX"
|
||||
/>
|
||||
|
@ -173,6 +174,7 @@ export default {
|
|||
this.reload();
|
||||
},
|
||||
copyRow() {
|
||||
console.log("添加")
|
||||
this.$emit('copyRow', this.assertions, this.node);
|
||||
},
|
||||
suggestJsonOpen() {
|
||||
|
@ -217,6 +219,7 @@ export default {
|
|||
this.assertions.jsonPath = [];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -13,11 +13,6 @@
|
|||
<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"/>
|
||||
|
@ -52,7 +47,11 @@ export default {
|
|||
isReadOnly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
assumeSuccess: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
|
@ -81,6 +80,7 @@ export default {
|
|||
getRegex() {
|
||||
let regex = new Regex(this.regex);
|
||||
regex.description = regex.subject + " has: " + regex.expression;
|
||||
regex.assumeSuccess = this.assumeSuccess;
|
||||
return regex;
|
||||
},
|
||||
setRegexDescription() {
|
||||
|
@ -99,11 +99,6 @@ export default {
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
.assertion-checkbox {
|
||||
text-align: center;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.assertion-btn {
|
||||
text-align: center;
|
||||
width: 60px;
|
||||
|
|
|
@ -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" v-if="type === options.REGEX"
|
||||
<ms-api-assertion-regex :is-read-only="isReadOnly" :list="assertions.regex" :assume-success = "assertions.assumeSuccess" 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"/>
|
||||
|
|
Loading…
Reference in New Issue