fix(接口测试): 接口首页不同协议的用例跳转

--user=郭雨琦
--bug=1014073
【接口测试】首页-过去7天测试计划失败用例TOP10,非HTTP的接口也会跳到HTTP页面
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001014073
This commit is contained in:
guoyuqi 2022-06-15 16:34:04 +08:00 committed by fit2-zhao
parent ee9ddeb3b1
commit 7613166535
2 changed files with 24 additions and 17 deletions

View File

@ -80,10 +80,15 @@ export default {
this.$emit('redirectPage', 'testPlanEdit', null, param);
break;
case "apiCase":
this.$get('/api/definition/get/' + param.id, (response) => {
let api = response.data;
if (!api) {
this.$get('/api/testcase/findById/' + param.id, (response) => {
let apiCase = response.data;
if (!apiCase) {
this.$message.error(this.$t('commons.api_case') + this.$t('commons.not_exist'))
} else {
this.$get('/api/definition/get/' + apiCase.apiDefinitionId, (response) => {
let api = response.data;
if (api) {
this.$message.error(this.$t('api_test.home_page.api_details_card.title') + this.$t('commons.not_exist'))
} else {
if (param.protocol === 'dubbo://') {
param.protocol = 'DUBBO'
@ -102,6 +107,8 @@ export default {
window.open(definitionData.href, '_blank');
}
});
}
});
break;
case "scenario":
this.$emit('redirectPage', 'scenario', 'scenario', 'edit:' + param.id);

View File

@ -30,7 +30,7 @@
<span v-if="!data.isEdit" class="node-icon">
<i class="el-icon-folder"/>
</span>
<el-tooltip class="item" effect="dark" :content="data.name" placement="top-start" open-delay="1000">
<el-tooltip class="item" effect="dark" :content="data.name" placement="top-start" :open-delay="1000">
<span v-if="!data.isEdit" class="node-title" v-text="data.name"/>
</el-tooltip>