refactor(接口测试): 断言表达式内容过长显示提示
--story=1007679 --user=赵勇 #13627[企业用户] 断言中如果字符过长显示不全,期望有悬浮显示的功能 https://www.tapd.cn/55049933/s/1180364
This commit is contained in:
parent
160434560f
commit
ad32abe6a7
|
@ -2,8 +2,10 @@
|
|||
<div v-loading="loading">
|
||||
<el-row :gutter="10" type="flex" justify="space-between" align="middle">
|
||||
<el-col>
|
||||
<el-tooltip :disabled="showTip" placement="top" :content="jsonPath.expression">
|
||||
<el-input :disabled="isReadOnly" v-model="jsonPath.expression" maxlength="500" size="small" show-word-limit
|
||||
:placeholder="$t('api_test.request.extract.json_path_expression')"/>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-select :disabled="isReadOnly" v-model="jsonPath.option" class="ms-col-type" size="small"
|
||||
|
@ -69,7 +71,8 @@
|
|||
|
||||
data() {
|
||||
return {
|
||||
loading: false
|
||||
loading: false,
|
||||
showTip: true,
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -103,6 +106,7 @@
|
|||
})
|
||||
},
|
||||
setJSONPathDescription() {
|
||||
this.showTip = this.jsonPath.expression.length < 50;
|
||||
this.jsonPath.description = this.jsonPath.expression + " expect: " + (this.jsonPath.expect ? this.jsonPath.expect : '');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,10 @@
|
|||
</el-select>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-tooltip :disabled="showTip" placement="top" :content="regex.expression">
|
||||
<el-input :disabled="isReadOnly" v-model="regex.expression" size="small" show-word-limit
|
||||
:placeholder="$t('api_test.request.assertions.expression')"/>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col class="assertion-checkbox">
|
||||
<el-checkbox v-model="regex.assumeSuccess" :disabled="isReadOnly">
|
||||
|
@ -61,6 +63,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
subjects: ASSERTION_REGEX_SUBJECT,
|
||||
showTip: true,
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -88,6 +91,7 @@ export default {
|
|||
return regex;
|
||||
},
|
||||
setRegexDescription() {
|
||||
this.showTip = this.regex.description.length < 80;
|
||||
this.regex.description = this.regex.subject + " has: " + this.regex.expression;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue