fix(接口测试): 修复导入的文档断言导入数组格式的数据,名称不是下标值的缺陷
--bug=1029217 --user=王孝刚 【接口测试】文档断言-导入-字段为数组类型-参数名可编辑 https://www.tapd.cn/55049933/s/1410058
This commit is contained in:
parent
3e8ef46913
commit
8fc7fb5261
|
@ -26,6 +26,7 @@ public class JSONToDocumentUtil {
|
|||
List<DocumentElement> childrenElements = new LinkedList<>();
|
||||
DocumentElement documentElement = new DocumentElement(StringUtils.EMPTY, PropertyConstant.ARRAY, StringUtils.EMPTY, childrenElements);
|
||||
documentElement.setArrayVerification(true);
|
||||
documentElement.setName(String.valueOf(i));
|
||||
children.add(documentElement);
|
||||
jsonDataFormatting((JSONArray) value, childrenElements);
|
||||
} else {
|
||||
|
|
|
@ -618,6 +618,9 @@ export default {
|
|||
row.type = 'object';
|
||||
}
|
||||
let newRow = this.getNewRow();
|
||||
if (row.type === 'array') {
|
||||
newRow.name = !this.mapData.get(row.id) ? 0 : this.mapData.get(row.id).length;
|
||||
}
|
||||
newRow.idList = [row.id, newRow.id];
|
||||
newRow.parentId = row.id;
|
||||
if (this.mapData.has(row.id)) {
|
||||
|
|
Loading…
Reference in New Issue