fix(接口定义): 修复场景列表显示unexecute状态的缺陷
--bug=1021459 --user=王孝刚 【接口测试】执行场景结果是未执行的时候,最后结果字段显示了unexecute https://www.tapd.cn/55049933/s/1321706
This commit is contained in:
parent
783ad1cf1c
commit
083fa1c699
|
@ -218,6 +218,9 @@
|
|||
<el-link type="danger" @click="showReport(row)" v-else-if="row.lastResult === 'Fail'">
|
||||
{{ $t('api_test.automation.fail') }}
|
||||
</el-link>
|
||||
<el-link v-else-if="!row.lastResult || row.lastResult === 'unexecute'" :disabled="true">
|
||||
{{ $t('api_test.home_page.detail_card.unexecute') }}
|
||||
</el-link>
|
||||
<el-link type="danger" style="color: #F6972A" @click="showReport(row)"
|
||||
v-else-if="row.lastResult === 'errorReportResult'">
|
||||
{{ $t('error_report_library.option.name') }}
|
||||
|
|
|
@ -2146,14 +2146,21 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
recursionDelete(resourceId, nodes) {
|
||||
getAllCheckedNodes() {
|
||||
if (this.$refs.stepTree) {
|
||||
return this.$refs.stepTree.getCheckedNodes();
|
||||
}
|
||||
return [];
|
||||
},
|
||||
recursionDelete(item, nodes) {
|
||||
for (let i in nodes) {
|
||||
if (nodes[i]) {
|
||||
if (resourceId === nodes[i].resourceId) {
|
||||
//复制的case的断言的resourceId是一样的,所以要加上parentIndex做唯一标识
|
||||
if (item.resourceId === nodes[i].resourceId && item.parentIndex === nodes[i].parentIndex) {
|
||||
nodes.splice(i, 1);
|
||||
} else {
|
||||
if (nodes[i].hashTree != undefined && nodes[i].hashTree.length > 0) {
|
||||
this.recursionDelete(resourceId, nodes[i].hashTree);
|
||||
this.recursionDelete(item, nodes[i].hashTree);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -892,6 +892,14 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
resetResourceId(hashTree) {
|
||||
hashTree.forEach((item) => {
|
||||
item.resourceId = getUUID();
|
||||
if (item.hashTree && item.hashTree.length > 0) {
|
||||
this.resetResourceId(item.hashTree);
|
||||
}
|
||||
});
|
||||
},
|
||||
getCaseAndOpen(id, apiName, apiId) {
|
||||
this.$get('/api/testcase/findById/' + id, (response) => {
|
||||
let data = response.data;
|
||||
|
@ -903,6 +911,9 @@ export default {
|
|||
} else if (apiCaseRequest.type === "JDBCSampler") {
|
||||
apiCaseRequest.method = "SQL";
|
||||
}
|
||||
if (apiCaseRequest.hashTree && apiCaseRequest.hashTree.length > 0) {
|
||||
this.resetResourceId(apiCaseRequest.hashTree);
|
||||
}
|
||||
apiCaseRequest.name = apiName;
|
||||
let obj = {
|
||||
name: "copy_" + data.name,
|
||||
|
|
|
@ -148,7 +148,8 @@ export function API_SCENARIO_FILTERS () {
|
|||
],
|
||||
RESULT_FILTERS: [
|
||||
{text: i18n.t('api_test.automation.fail'), value: 'Fail'},
|
||||
{text: i18n.t('api_test.automation.success'), value: 'Success'}
|
||||
{text: i18n.t('api_test.automation.success'), value: 'Success'},
|
||||
{text: i18n.t('api_test.home_page.detail_card.unexecute'), value: 'unexecute'}
|
||||
]
|
||||
};
|
||||
/*LEVEL_FILTERS: [
|
||||
|
|
Loading…
Reference in New Issue