fix(测试跟踪): 修改测试计划报告查看case报告控制台输出不完整的缺陷

--bug=1014433 --user=王孝刚 【测试跟踪】测试计划列表查看测试报告,接口测试日志过多时,显示不全
https://www.tapd.cn/55049933/s/1191643
This commit is contained in:
wxg0103 2022-06-29 15:52:46 +08:00 committed by f2c-ci-robot[bot]
parent ec5534d246
commit 245b36a228
3 changed files with 26 additions and 6 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="request-result"> <div class="request-result">
<ms-request-metric v-if="showMetric" :response="response"/> <ms-request-metric v-if="showMetric" :response="response"/>
<ms-response-result :currentProtocol="currentProtocol" :response="response"/> <ms-response-result :currentProtocol="currentProtocol" :response="response" :isTestPlan="isTestPlan"/>
</div> </div>
</template> </template>
@ -20,6 +20,12 @@
default() { default() {
return true; return true;
} }
},
isTestPlan: {
type: Boolean,
default() {
return false;
}
} }
}, },

View File

@ -3,15 +3,23 @@
<el-tabs v-model="activeName" v-show="isActive"> <el-tabs v-model="activeName" v-show="isActive">
<el-tab-pane :label="$t('api_test.definition.request.response_body')" name="body" class="pane"> <el-tab-pane :label="$t('api_test.definition.request.response_body')" name="body" class="pane">
<ms-sql-result-table v-if="isSqlType && activeName === 'body'" :body="responseResult.body"/> <ms-sql-result-table v-if="isSqlType && activeName === 'body'" :body="responseResult.body"/>
<ms-code-edit v-if="!isSqlType && isMsCodeEditShow && activeName === 'body'" :mode="mode" :read-only="true" :modes="modes" :data.sync="responseResult.body" ref="codeEdit"/> <ms-code-edit v-if="!isSqlType && isMsCodeEditShow && activeName === 'body'" :mode="mode" :read-only="true"
:modes="modes" :data.sync="responseResult.body" ref="codeEdit"/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('api_test.definition.request.response_header')" name="headers" class="pane"> <el-tab-pane :label="$t('api_test.definition.request.response_header')" name="headers" class="pane">
<ms-code-edit :mode="'text'" :read-only="true" :data.sync="responseResult.headers" v-if="activeName === 'headers'"/> <ms-code-edit :mode="'text'" :read-only="true" :data.sync="responseResult.headers"
v-if="activeName === 'headers'"/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('api_test.definition.request.console')" name="console" class="pane"> <el-tab-pane v-if="isTestPlan" :label="$t('api_test.definition.request.console')" name="console" class="pane">
<ms-code-edit :mode="'text'" :read-only="true" :data.sync="responseResult.console" v-if="activeName === 'console'"/> <ms-code-edit :mode="'text'" :read-only="true" :data.sync="responseResult.console"
v-if="activeName === 'console'" height="calc(100vh - 300px)"/>
</el-tab-pane>
<el-tab-pane v-if="!isTestPlan" :label="$t('api_test.definition.request.console')" name="console" class="pane">
<ms-code-edit :mode="'text'" :read-only="true" :data.sync="responseResult.console"
v-if="activeName === 'console'"/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('api_report.assertions')" name="assertions" class="pane assertions"> <el-tab-pane :label="$t('api_report.assertions')" name="assertions" class="pane assertions">
@ -56,6 +64,12 @@ export default {
props: { props: {
response: Object, response: Object,
currentProtocol: String, currentProtocol: String,
isTestPlan: {
type: Boolean,
default() {
return false;
}
}
}, },
data() { data() {

View File

@ -56,7 +56,7 @@
</ms-aside-container> </ms-aside-container>
<ms-main-container> <ms-main-container>
<el-card v-if="showResponse"> <el-card v-if="showResponse">
<ms-request-result-tail :response="response" ref="debugResult"/> <ms-request-result-tail :response="response" ref="debugResult" :is-test-plan="showResponse"/>
</el-card> </el-card>
<div class="empty" v-else>{{ $t('test_track.plan.load_case.content_empty') }}</div> <div class="empty" v-else>{{ $t('test_track.plan.load_case.content_empty') }}</div>
</ms-main-container> </ms-main-container>