fix(接口测试): 修复并发控制器插件多出一个场景断言步骤问题

--bug=1014257 --user=赵勇 【接口测试】github#15083并行处理器插件在页面保存再另打开后,会自动带出场景断言组件,功能实现有误,请修改 https://www.tapd.cn/55049933/s/1187025
This commit is contained in:
fit2-zhao 2022-06-20 17:41:14 +08:00 committed by f2c-ci-robot[bot]
parent 4049e84240
commit bcdfb828c2
2 changed files with 26 additions and 6 deletions

View File

@ -195,9 +195,9 @@
<span class="custom-tree-node-col" style="padding-left:0px;padding-right:0px"
v-show="node && data.hashTree && data.hashTree.length > 0 && !data.isLeaf">
<span v-show="!node.expanded" class="el-icon-circle-plus-outline custom-node_e"
@click="openOrClose(node)"/>
@click="openOrClose(node,data)"/>
<span v-show="node.expanded" class="el-icon-remove-outline custom-node_e"
@click="openOrClose(node)"/>
@click="openOrClose(node,data)"/>
</span>
<!-- 批量操作 -->
<span :class="data.checkBox? 'custom-tree-node-hide' : 'custom-tree-node-col'"
@ -674,8 +674,18 @@ export default {
}
});
},
openOrClose(node) {
openOrClose(node, data) {
node.expanded = !node.expanded;
this.pluginOrder(data);
},
plugnOrder(nodes) {
//
if (nodes && nodes.type === 'GenericController' && nodes.hashTree) {
let data = nodes.hashTree.filter(v => v.type !== "Assertions");
for (let i = 0; i < data.length; i++) {
data[i].index = (i + 1);
}
}
},
hideNode(node) {
node.isLeaf = true;
@ -1310,7 +1320,12 @@ export default {
})
}
this.isBtnHide = false;
this.sort();
//
if (this.selectedTreeNode && this.selectedTreeNode.type === 'GenericController') {
this.plugnOrder(this.selectedTreeNode);
} else {
this.sort();
}
this.cancelBatchProcessing();
},
setApiParameter(item, refType, referenced) {
@ -1366,7 +1381,12 @@ export default {
});
this.isBtnHide = false;
this.$refs.scenarioApiRelevance.changeButtonLoadingType();
this.sort();
//
if (this.selectedTreeNode && this.selectedTreeNode.type === 'GenericController') {
this.plugnOrder(this.selectedTreeNode);
} else {
this.sort();
}
this.cancelBatchProcessing();
},
getMaintainerOptions() {

View File

@ -24,7 +24,7 @@ export function STEP() {
['MaxSamplerProxy', getDefaultSamplerMenu()],
['GenericController', getAll()],
['SpecialSteps', ['HTTPSamplerProxy', 'Assertions', 'DubboSampler', 'JDBCSampler', 'TCPSampler', 'Sampler', 'AbstractSampler', 'JSR223Processor', 'API', 'MsUiCommand']],
['AllSamplerProxy', ['HTTPSamplerProxy', 'DubboSampler', 'JDBCSampler', 'TCPSampler', 'Sampler', 'AbstractSampler', 'JSR223Processor', 'API', 'MsUiCommand']],
['AllSamplerProxy', ['GenericController','HTTPSamplerProxy', 'DubboSampler', 'JDBCSampler', 'TCPSampler', 'Sampler', 'AbstractSampler', 'JSR223Processor', 'API', 'MsUiCommand']],
['DEFINITION', ['HTTPSamplerProxy', 'DubboSampler', 'JDBCSampler', 'TCPSampler']],
['ALlSamplerStep', ['JSR223PreProcessor', 'JSR223PostProcessor', 'JDBCPreProcessor', 'JDBCPostProcessor', 'Assertions', 'Extract', 'ConstantTimer']],
['AllCanExecType', ['HTTPSamplerProxy', 'DubboSampler', 'JDBCSampler', 'TCPSampler', 'JSR223Processor', 'AbstractSampler']]]);