fix(接口自动化): 引用跳转

--bug=1008380 --user=郭雨琦 【接口测试】编辑场景,接口用例ID跳转会跳到系统设置页面
This commit is contained in:
guoyuqi 2021-11-26 17:35:59 +08:00 committed by xiaomeinvG
parent 7bfb92b5f7
commit 0fc774e15b
2 changed files with 41 additions and 0 deletions

View File

@ -646,6 +646,7 @@ export default {
response.data.sourceId = resource.resourceId;
response.data.type = resource.type;
response.data.refType = resource.refType;
debugger
this.clickCase(response.data)
} else {
this.$error("接口用例场景场景已经被删除");

View File

@ -22,6 +22,46 @@ export function getUrl(d) {
break;
}
break;
case "JDBCSampler":
switch (d.refType){
case "API":
url += "/api/definition?resourceId=" + resourceId;
break;
case "CASE":
url += "/api/definition?caseId=" + d.id;
break;
}
break;
case "DebugSampler":
switch (d.refType){
case "API":
url += "/api/definition?resourceId=" + resourceId;
break;
case "CASE":
url += "/api/definition?caseId=" + d.id;
break;
}
break;
case "DubboSampler":
switch (d.refType){
case "API":
url += "/api/definition?resourceId=" + resourceId;
break;
case "CASE":
url += "/api/definition?caseId=" + d.id;
break;
}
break;
case "TCPSampler":
switch (d.refType){
case "API":
url += "/api/definition?resourceId=" + resourceId;
break;
case "CASE":
url += "/api/definition?caseId=" + d.id;
break;
}
break;
case "scenario":
url += "/api/automation?resourceId=" + resourceId;
break;