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 fit2-zhao
parent 0ea3474fae
commit 04d42a112b
2 changed files with 20 additions and 7 deletions

View File

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

View File

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