fix(测试跟踪): 测试计划开启允许重复后,关联接口没有过滤掉case为空的接口

--bug=1010731 --user=陈建星 【测试计划】-开启允许关联重复用例-该计划关联接口用例页面列表显示了全部接口-这些接口都没有CASE https://www.tapd.cn/55049933/s/1115706
This commit is contained in:
chenjianxing 2022-03-09 16:28:54 +08:00 committed by fit2-zhao
parent ef1c0acb83
commit 6c0dcb5e7d
3 changed files with 20 additions and 3 deletions

View File

@ -480,6 +480,9 @@
)
)
</if>
<if test="request.repeatCase">
and api_definition.case_total is not null and api_definition.case_total > 0
</if>
<include refid="queryVersionCondition">
<property name="versionTable" value="api_definition"/>
</include>

View File

@ -327,15 +327,21 @@ export default {
this.buildReport();
} else if (this.isShare) {
getShareScenarioReport(this.shareId, this.reportId, (data) => {
this.checkReport(data);
this.handleGetScenarioReport(data);
});
} else {
getScenarioReport(this.reportId, (data) => {
this.checkReport(data);
this.handleGetScenarioReport(data);
});
}
},
checkReport(data) {
if (!data) {
this.$emit('reportNotExist');
}
},
handleGetScenarioReport(data) {
if (data) {
this.report = data;

View File

@ -57,8 +57,16 @@
</el-card>
</ms-aside-container>
<ms-main-container>
<ms-api-report v-if="showResponse" :is-plan="true" :share-id="shareId" :is-share="isShare"
:template-report="response" :is-template="isTemplate" :infoDb="true" :report-id="reportId"/>
<ms-api-report
v-if="showResponse"
:is-plan="true"
:share-id="shareId"
:is-share="isShare"
:template-report="response"
:is-template="isTemplate"
:infoDb="true"
:report-id="reportId"
@reportNotExist="showResponse = false"/>
<div class="empty" v-else>{{ $t('test_track.plan.load_case.content_empty') }}</div>
</ms-main-container>
</el-container>