fix(接口测试): 修复文档结构数组类型必含校验问题

--bug=1010130 --user=赵勇 【接口测试】 github#10194,添加文档断言,检验字段类型,是否必填不准确。响应json数据中包含jsonArray对象中的字段值无法检验 https://www.tapd.cn/55049933/s/1102408
This commit is contained in:
fit2-zhao 2022-02-09 17:44:16 +08:00 committed by fit2-zhao
parent e20201c435
commit 45eee7a483
1 changed files with 7 additions and 1 deletions

View File

@ -30,7 +30,7 @@
<el-table-column prop="include" width="78" :label="$t('api_test.request.assertions.must_contain')"
:render-header="renderHeader">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.include" @change="handleCheckOneChange" :disabled="checked"/>
<el-checkbox v-model="scope.row.include" @change="handleCheckOneChange" :disabled="checked || scope.row.type==='array'"/>
</template>
</el-table-column>
@ -307,6 +307,9 @@ export default {
arr.forEach(item => {
if (type === 1) {
item.include = val
if (item.type === 'array') {
item.include = false;
}
}
if (type === 2) {
item.typeVerification = val
@ -326,6 +329,9 @@ export default {
}
this.tableData.forEach(item => {
item.include = val;
if (item.type === 'array') {
item.include = false;
}
this.childrenChecked(item.children, 1, val);
})
},