fix(接口定义) 用例历史数据处理

--bug=1006958 --user=赵勇 添加了认证配置的接口用例执行时报错 https://www.tapd.cn/55049933/s/1052429
This commit is contained in:
fit2-zhao 2021-09-27 16:31:47 +08:00 committed by fit2-zhao
parent dd10ae60a6
commit 0c692cd794
14 changed files with 48 additions and 6 deletions

View File

@ -877,6 +877,9 @@ export default {
if (!stepArray[i].clazzName) {
stepArray[i].clazzName = TYPE_TO_C.get(stepArray[i].type);
}
if (stepArray[i] && stepArray[i].authManager && !stepArray[i].authManager.clazzName) {
stepArray[i].authManager.clazzName = TYPE_TO_C.get(stepArray[i].authManager.type);
}
if (stepArray[i].hashTree && stepArray[i].hashTree.length > 0) {
this.sort(stepArray[i].hashTree);
}

View File

@ -39,6 +39,9 @@ export default {
if (!stepArray[i].clazzName) {
stepArray[i].clazzName = TYPE_TO_C.get(stepArray[i].type);
}
if (stepArray[i] && stepArray[i].authManager && !stepArray[i].authManager.clazzName) {
stepArray[i].authManager.clazzName = TYPE_TO_C.get(stepArray[i].authManager.type);
}
if (stepArray[i].hashTree && stepArray[i].hashTree.length > 0) {
this.sort(stepArray[i].hashTree);
}

View File

@ -967,6 +967,9 @@ export default {
if (!stepArray[i].clazzName) {
stepArray[i].clazzName = TYPE_TO_C.get(stepArray[i].type);
}
if (stepArray[i] && stepArray[i].authManager && !stepArray[i].authManager.clazzName) {
stepArray[i].authManager.clazzName = TYPE_TO_C.get(stepArray[i].authManager.type);
}
if (!stepArray[i].projectId) {
// IDIDIDID
stepArray[i].projectId = scenarioProjectId ? scenarioProjectId : this.projectId;
@ -1378,6 +1381,9 @@ export default {
if (!hashTree[i].clazzName) {
hashTree[i].clazzName = TYPE_TO_C.get(hashTree[i].type);
}
if (hashTree[i] && hashTree[i].authManager && !hashTree[i].authManager.clazzName) {
hashTree[i].authManager.clazzName = TYPE_TO_C.get(hashTree[i].authManager.type);
}
if (hashTree[i].hashTree && hashTree[i].hashTree.length > 0) {
this.formatData(hashTree[i].hashTree);
}

View File

@ -183,6 +183,9 @@ export default {
if (!stepArray[i].clazzName) {
stepArray[i].clazzName = TYPE_TO_C.get(stepArray[i].type);
}
if (stepArray[i] && stepArray[i].authManager && !stepArray[i].authManager.clazzName) {
stepArray[i].authManager.clazzName = TYPE_TO_C.get(stepArray[i].authManager.type);
}
if (stepArray[i].hashTree && stepArray[i].hashTree.length > 0) {
this.sort(stepArray[i].hashTree);
}

View File

@ -64,6 +64,9 @@ export default {
if (!stepArray[i].clazzName) {
stepArray[i].clazzName = TYPE_TO_C.get(stepArray[i].type);
}
if (stepArray[i] && stepArray[i].authManager && !stepArray[i].authManager.clazzName) {
stepArray[i].authManager.clazzName = TYPE_TO_C.get(stepArray[i].authManager.type);
}
if (stepArray[i].hashTree && stepArray[i].hashTree.length > 0) {
this.sort(stepArray[i].hashTree);
}

View File

@ -108,6 +108,9 @@
if (!stepArray[i].clazzName) {
stepArray[i].clazzName = TYPE_TO_C.get(stepArray[i].type);
}
if (stepArray[i] && stepArray[i].authManager && !stepArray[i].authManager.clazzName) {
stepArray[i].authManager.clazzName = TYPE_TO_C.get(stepArray[i].authManager.type);
}
if (stepArray[i].hashTree && stepArray[i].hashTree.length > 0) {
this.compatibleHistory(stepArray[i].hashTree);
}

View File

@ -397,6 +397,9 @@ export default {
if (!stepArray[i].clazzName) {
stepArray[i].clazzName = TYPE_TO_C.get(stepArray[i].type);
}
if (stepArray[i] && stepArray[i].authManager && !stepArray[i].authManager.clazzName) {
stepArray[i].authManager.clazzName = TYPE_TO_C.get(stepArray[i].authManager.type);
}
if (stepArray[i].hashTree && stepArray[i].hashTree.length > 0) {
this.sort(stepArray[i].hashTree);
}
@ -438,6 +441,9 @@ export default {
}
if (tmp.request) {
tmp.request.clazzName = TYPE_TO_C.get(tmp.request.type);
if (tmp.request.authManager) {
tmp.request.authManager.clazzName = TYPE_TO_C.get(tmp.request.authManager.type);
}
this.sort(tmp.request.hashTree);
}
this.result = this.$fileUpload(url, null, bodyFiles, tmp, (response) => {

View File

@ -58,22 +58,19 @@
<script>
import ApiCaseHeader from "./ApiCaseHeader";
import ApiCaseItem from "./ApiCaseItem";
import MsRun from "../Run";
import {getCurrentProjectID, getUUID} from "@/common/js/utils";
import MsDrawer from "../../../../common/components/MsDrawer";
import {CASE_ORDER, CASE_PRIORITY, DUBBO_METHOD, REQ_METHOD, SQL_METHOD, TCP_METHOD} from "../../model/JsonData";
import {API_CASE_CONFIGS} from "@/business/components/common/components/search/search-components";
import MsBatchEdit from "../basis/BatchEdit";
export default {
name: 'ApiCaseList',
components: {
MsDrawer,
MsRun,
MsRun: () => import("../Run"),
ApiCaseHeader,
ApiCaseItem,
MsBatchEdit,
ApiCaseItem: () => import("./ApiCaseItem"),
MsBatchEdit: () => import("../basis/BatchEdit"),
MsTaskCenter: () => import("../../../../task/TaskCenter"),
},
props: {

View File

@ -165,6 +165,9 @@ export default {
if (!stepArray[i].clazzName) {
stepArray[i].clazzName = TYPE_TO_C.get(stepArray[i].type);
}
if (stepArray[i] && stepArray[i].authManager && !stepArray[i].authManager.clazzName) {
stepArray[i].authManager.clazzName = TYPE_TO_C.get(stepArray[i].authManager.type);
}
if (stepArray[i].hashTree && stepArray[i].hashTree.length > 0) {
this.compatibleHistory(stepArray[i].hashTree);
}

View File

@ -217,6 +217,9 @@ export default {
if (!stepArray[i].clazzName) {
stepArray[i].clazzName = TYPE_TO_C.get(stepArray[i].type);
}
if (stepArray[i] && stepArray[i].authManager && !stepArray[i].authManager.clazzName) {
stepArray[i].authManager.clazzName = TYPE_TO_C.get(stepArray[i].authManager.type);
}
if (stepArray[i].hashTree && stepArray[i].hashTree.length > 0) {
this.compatibleHistory(stepArray[i].hashTree);
}

View File

@ -1040,6 +1040,9 @@ export default {
if (!stepArray[i].clazzName) {
stepArray[i].clazzName = TYPE_TO_C.get(stepArray[i].type);
}
if (stepArray[i] && stepArray[i].authManager && !stepArray[i].authManager.clazzName) {
stepArray[i].authManager.clazzName = TYPE_TO_C.get(stepArray[i].authManager.type);
}
if (stepArray[i].hashTree && stepArray[i].hashTree.length > 0) {
this.sortHashTree(stepArray[i].hashTree);
}

View File

@ -53,6 +53,9 @@
if (!stepArray[i].clazzName) {
stepArray[i].clazzName = TYPE_TO_C.get(stepArray[i].type);
}
if (stepArray[i] && stepArray[i].authManager && !stepArray[i].authManager.clazzName) {
stepArray[i].authManager.clazzName = TYPE_TO_C.get(stepArray[i].authManager.type);
}
if (stepArray[i].hashTree && stepArray[i].hashTree.length > 0) {
this.sortHashTree(stepArray[i].hashTree);
}

View File

@ -225,6 +225,9 @@ export default {
if (!stepArray[i].clazzName) {
stepArray[i].clazzName = TYPE_TO_C.get(stepArray[i].type);
}
if (stepArray[i] && stepArray[i].authManager && !stepArray[i].authManager.clazzName) {
stepArray[i].authManager.clazzName = TYPE_TO_C.get(stepArray[i].authManager.type);
}
if (stepArray[i].hashTree && stepArray[i].hashTree.length > 0) {
this.compatibleHistory(stepArray[i].hashTree);
}

View File

@ -63,6 +63,9 @@ export default {
if (!stepArray[i].clazzName) {
stepArray[i].clazzName = TYPE_TO_C.get(stepArray[i].type);
}
if (stepArray[i] && stepArray[i].authManager && !stepArray[i].authManager.clazzName) {
stepArray[i].authManager.clazzName = TYPE_TO_C.get(stepArray[i].authManager.type);
}
if (stepArray[i].hashTree && stepArray[i].hashTree.length > 0) {
this.sort(stepArray[i].hashTree);
}