fix(接口测试): 修复场景历史数据断言子步骤关闭状态下-调试仍执行断言的缺陷
--bug=1013042 --user=王孝刚 【接口测试】github#12904,老用例默认关闭状态,调试的时候断言也不生效了(关闭状态下-调试仍执行断言) https://www.tapd.cn/55049933/s/1154505
This commit is contained in:
parent
295ab80b6b
commit
a1661c7c65
|
@ -47,29 +47,41 @@ export function getProtocolFilter(protocolType) {
|
|||
export function parse(item) {
|
||||
if (item.jsonPath) {
|
||||
item.jsonPath.forEach(node => {
|
||||
node.enable = item.enable;
|
||||
if (node.enable === undefined) {
|
||||
node.enable = item.enable;
|
||||
}
|
||||
})
|
||||
}
|
||||
if (item.jsr223) {
|
||||
item.jsr223.forEach(node => {
|
||||
node.enable = item.enable;
|
||||
if (node.enable === undefined) {
|
||||
node.enable = item.enable;
|
||||
}
|
||||
})
|
||||
}
|
||||
if (item.regex) {
|
||||
item.regex.forEach(node => {
|
||||
node.enable = item.enable;
|
||||
if (node.enable === undefined) {
|
||||
node.enable = item.enable;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (item.xpath2) {
|
||||
item.xpath2.forEach(node => {
|
||||
node.enable = item.enable;
|
||||
if (node.enable === undefined) {
|
||||
node.enable = item.enable;
|
||||
}
|
||||
})
|
||||
}
|
||||
if (item.duration && item.duration.value > 0) {
|
||||
item.duration.enable = item.enable;
|
||||
if (item.duration.enable === undefined) {
|
||||
item.duration.enable = item.enable;
|
||||
}
|
||||
}
|
||||
if (item.document && item.document.data && (item.document.data.json.length > 0 || item.document.data.xml.length > 0)) {
|
||||
item.document.enable = item.enable;
|
||||
if (item.document.enable === undefined) {
|
||||
item.document.enable = item.enable;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,6 +97,7 @@ export function hisDataProcessing(array, request) {
|
|||
let item = array[index];
|
||||
if (item.type === "Assertions" && isOne) {
|
||||
assertions = JSON.parse(JSON.stringify(item));
|
||||
parse(assertions);
|
||||
isOne = false;
|
||||
assertionsIndex.push(item);
|
||||
} else if (item.type === "Assertions") {
|
||||
|
|
|
@ -805,6 +805,7 @@ export class AssertionDocument extends BaseConfig {
|
|||
this.include = false;
|
||||
this.typeVerification = false;
|
||||
this.type = "object";
|
||||
this.enable = true;
|
||||
this.arrayVerification = false;
|
||||
this.contentVerifications = "none";
|
||||
this.expectedOutcome = "";
|
||||
|
@ -851,7 +852,7 @@ export class Text extends AssertionType {
|
|||
this.subject = undefined;
|
||||
this.condition = undefined;
|
||||
this.value = undefined;
|
||||
|
||||
this.enable = true;
|
||||
this.set(options);
|
||||
}
|
||||
}
|
||||
|
@ -919,7 +920,7 @@ export class JSONPath extends AssertionType {
|
|||
this.expression = undefined;
|
||||
this.expect = undefined;
|
||||
this.description = undefined;
|
||||
|
||||
this.enable = true;
|
||||
this.set(options);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue