fix(接口定义): 修复场景引用别的场景自定义脚本不执行的缺陷 (#18151)
--bug=1017074 --user=王孝刚 【接口测试】github #18028,新建一个接口自动化场景,输入名称,然后引用一个场景,被引用场景里有自定义脚本,在未保存的情况下,选择环境,点调试,被引用场景自定义脚本不会被执行。 https://www.tapd.cn/55049933/s/1248955 Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
parent
d4cd37c7a3
commit
b35c9c92d5
|
@ -66,11 +66,11 @@
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import {generateShareInfoWithExpired} from "@/network/share";
|
import {generateShareInfoWithExpired} from "@/network/share";
|
||||||
import {getCurrentProjectID} from "@/common/js/utils";
|
|
||||||
import MsTag from "@/business/components/common/components/MsTag";
|
import MsTag from "@/business/components/common/components/MsTag";
|
||||||
|
import {getCurrentProjectID, getCurrentWorkspaceId, getUUID} from "@/common/js/utils";
|
||||||
|
|
||||||
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
|
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
|
||||||
const UiDownloadScreenshot = requireComponent.keys().length > 0 ? requireComponent("./ui/automation/report/UiDownloadScreenshot.vue") : {};
|
const UiDownloadScreenshot = requireComponent.keys().length > 0 ? requireComponent("./ui/automation/report/UiDownloadScreenshot.vue") : {};
|
||||||
import {getCurrentProjectID, getCurrentWorkspaceId, getUUID} from "@/common/js/utils";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsApiReportViewHeader",
|
name: "MsApiReportViewHeader",
|
||||||
|
@ -161,7 +161,7 @@ export default {
|
||||||
pram.shareType = 'API_REPORT';
|
pram.shareType = 'API_REPORT';
|
||||||
let thisHost = window.location.host;
|
let thisHost = window.location.host;
|
||||||
let shareUrl = thisHost + "/shareApiReport";
|
let shareUrl = thisHost + "/shareApiReport";
|
||||||
if(this.isUi){
|
if (this.isUi) {
|
||||||
pram.shareType = 'UI_REPORT';
|
pram.shareType = 'UI_REPORT';
|
||||||
shareUrl = thisHost + "/shareUiReport";
|
shareUrl = thisHost + "/shareUiReport";
|
||||||
}
|
}
|
||||||
|
@ -170,8 +170,8 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getProjectApplication() {
|
getProjectApplication() {
|
||||||
let path = "/API_SHARE_REPORT_TIME";
|
let path = "/API_SHARE_REPORT_TIME";
|
||||||
if(this.isUi){
|
if (this.isUi) {
|
||||||
path = "/UI_SHARE_REPORT_TIME";
|
path = "/UI_SHARE_REPORT_TIME";
|
||||||
}
|
}
|
||||||
this.$get('/project_application/get/' + getCurrentProjectID() + path, res => {
|
this.$get('/project_application/get/' + getCurrentProjectID() + path, res => {
|
||||||
|
|
|
@ -392,9 +392,9 @@ import {
|
||||||
handleCtrlREvent,
|
handleCtrlREvent,
|
||||||
handleCtrlSEvent,
|
handleCtrlSEvent,
|
||||||
hasLicense,
|
hasLicense,
|
||||||
|
hasPermission,
|
||||||
objToStrMap,
|
objToStrMap,
|
||||||
strMapToObj,
|
strMapToObj
|
||||||
hasPermission
|
|
||||||
} from "@/common/js/utils";
|
} from "@/common/js/utils";
|
||||||
import "@/common/css/material-icons.css";
|
import "@/common/css/material-icons.css";
|
||||||
import OutsideClick from "@/common/js/outside-click";
|
import OutsideClick from "@/common/js/outside-click";
|
||||||
|
@ -1393,7 +1393,7 @@ export default {
|
||||||
},
|
},
|
||||||
resetResourceId(hashTree) {
|
resetResourceId(hashTree) {
|
||||||
hashTree.forEach(item => {
|
hashTree.forEach(item => {
|
||||||
item.resourceId = getUUID();
|
item.resourceId = item.resourceId || getUUID();
|
||||||
if (item.hashTree && item.hashTree.length > 0) {
|
if (item.hashTree && item.hashTree.length > 0) {
|
||||||
this.resetResourceId(item.hashTree);
|
this.resetResourceId(item.hashTree);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue