fix(接口测试): 修复创建case时无法跟随api定义获取内容的缺陷
--bug=1013421 --user=王孝刚 [BUG] [接口测试] github#13861在用例中添加文档结构断言,选择跟随API定义时,不能将API定义中的内容获取过来,导致断言不生效 https://www.tapd.cn/55049933/s/1165606
This commit is contained in:
parent
cead079de9
commit
fb54c4d853
|
@ -218,8 +218,10 @@ export default {
|
|||
},
|
||||
getDocument() {
|
||||
// 来自场景步骤,请求id为用例id
|
||||
if (this.document && this.document.nodeType && (this.document.nodeType === "scenario" || this.document.nodeType === "Case")) {
|
||||
if (this.document && this.document.nodeType && this.document.nodeType === "scenario") {
|
||||
this.getCase();
|
||||
} else if (this.document && this.document.nodeType && this.document.nodeType === "Case" && this.document.apiDefinitionId) {
|
||||
this.getAPI(this.document.apiDefinitionId);
|
||||
} else {
|
||||
this.getAPI();
|
||||
}
|
||||
|
|
|
@ -314,7 +314,8 @@ export default {
|
|||
if (this.apiCase.request && this.apiCase.request.hashTree && this.apiCase.request.hashTree.length > 0) {
|
||||
this.apiCase.request.hashTree.forEach(item => {
|
||||
if (item.type === 'Assertions') {
|
||||
item.document.nodeType = 'Case'
|
||||
item.document.nodeType = 'Case';
|
||||
item.document.apiDefinitionId = this.apiCase.apiDefinitionId;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue