fix(接口测试): 修复断言添加子字段无效的缺陷
--bug=1019419 --user=王孝刚 【接口测试】github#19488,接口自动化TEST界面断言文档结构时“添加子字段”按钮功能无效 https://www.tapd.cn/55049933/s/1289916
This commit is contained in:
parent
38d80c8fe1
commit
64a27c48ff
|
@ -76,6 +76,7 @@ public class JSONToDocumentUtils {
|
|||
JSONArray array = JSON.parseArray(json);
|
||||
jsonDataFormatting(array, children);
|
||||
} else {
|
||||
roots.add(new DocumentElement().newRoot(BasicConstant.ARRAY, children));
|
||||
JSONArray array = JSON.parseArray(json);
|
||||
jsonDataFormatting(array, roots);
|
||||
}
|
||||
|
@ -85,6 +86,7 @@ public class JSONToDocumentUtils {
|
|||
JSONObject object = JSON.parseObject(json);
|
||||
jsonDataFormatting(object, children);
|
||||
} else {
|
||||
roots.add(new DocumentElement().newRoot(BasicConstant.OBJECT, children));
|
||||
JSONObject object = JSON.parseObject(json);
|
||||
jsonDataFormatting(object, roots);
|
||||
}
|
||||
|
|
|
@ -183,7 +183,11 @@ export function mergeRequestDocumentData(request) {
|
|||
if (index !== -1) {
|
||||
if (request.hashTree[index].document && request.hashTree[index].document.originalData && request.hashTree[index].document.tableData.size && request.hashTree[index].document.tableData.size !== 0) {
|
||||
mergeDocumentData(request.hashTree[index].document.originalData, request.hashTree[index].document.tableData);
|
||||
request.hashTree[index].document.data.json = request.hashTree[index].document.originalData;
|
||||
if (request.hashTree[index].document.type === 'json') {
|
||||
request.hashTree[index].document.data.json = request.hashTree[index].document.originalData;
|
||||
} else {
|
||||
request.hashTree[index].document.data.xml = request.hashTree[index].document.originalData;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -196,7 +196,7 @@ export default {
|
|||
if (this.document.type === "JSON") {
|
||||
this.document.data.json = this.originalData;
|
||||
} else if (this.document.type === "XML") {
|
||||
this.document.data.xml = this.tableData;
|
||||
this.document.data.xml = this.originalData;
|
||||
}
|
||||
},
|
||||
tableDataList(data) {
|
||||
|
@ -311,7 +311,7 @@ export default {
|
|||
if (this.document.data.xmlFollowAPI) {
|
||||
this.getDocument();
|
||||
} else {
|
||||
this.tableData = this.document.data.xml;
|
||||
this.tableDataList(this.document.data.xml);
|
||||
}
|
||||
}
|
||||
this.reload();
|
||||
|
|
Loading…
Reference in New Issue