fix(测试计划): 报告中UI用例未执行tab页未展示未执行数据

--bug=1024732 --user=李玉号
【UI测试】报告导出-未执行tab页未展示未执行数据
https://www.tapd.cn/55049933/s/1355416
This commit is contained in:
shiziyuan9527 2023-03-24 10:33:29 +08:00 committed by lyh
parent 53be1d8dee
commit c4c76eb822
2 changed files with 20 additions and 7 deletions

View File

@ -41,6 +41,10 @@ export default {
isShare: Boolean,
isTemplate: Boolean,
shareId: String,
isUi: {
default: false,
type: Boolean
}
},
data() {
return {
@ -52,11 +56,6 @@ export default {
this.$refs.resultsTree.root.expanded = true;
}
},
computed: {
isUi() {
return this.report && this.report.reportType && this.report.reportType.startsWith("UI");
},
},
methods: {
filterNode(value, data) {
if (!data.value && (!data.children || data.children.length === 0)) {
@ -74,7 +73,17 @@ export default {
}
} else {
if (this.isUi) {
if (value === 'PENDING') {
if (data.value.status === 'PENDING') {
return true;
}
} else if (value === 'ERROR') {
if (data.value.status === 'ERROR') {
return true;
}
} else {
return data.value.success === false && data.value.startTime > 0;
}
} else {
return data.totalStatus !== 'errorReportResult' && data.value.error > 0;
}

View File

@ -38,6 +38,7 @@
:report="report"
:is-share="isShare"
:share-id="shareId"
:is-ui="true"
v-on:requestResult="requestResult"
ref="resultsTree"
/>
@ -57,6 +58,7 @@
:treeData="fullTreeNodes"
ref="failsTree"
:errorReport="content.error"
:is-ui="true"
/>
</el-tab-pane>
<!--error step -->
@ -75,6 +77,7 @@
:console="content.console"
:treeData="fullTreeNodes"
ref="errorReportTree"
:is-ui="true"
/>
</el-tab-pane>
<!-- Not performed step -->
@ -93,6 +96,7 @@
:console="content.console"
:treeData="fullTreeNodes"
ref="unExecuteTree"
:is-ui="true"
/>
</el-tab-pane>
<!-- console -->
@ -212,7 +216,7 @@ export default {
} else if (this.activeName === "errorReport") {
this.$refs.errorReportTree.filter("errorReport");
} else if (this.activeName === "unExecute") {
this.$refs.unExecuteTree.filter("unexecute");
this.$refs.unExecuteTree.filter("PENDING");
}
},
init() {