diff --git a/frontend/src/business/components/api/definition/ApiDefinition.vue b/frontend/src/business/components/api/definition/ApiDefinition.vue index 39db360be4..2556e08d5c 100644 --- a/frontend/src/business/components/api/definition/ApiDefinition.vue +++ b/frontend/src/business/components/api/definition/ApiDefinition.vue @@ -560,6 +560,9 @@ export default { type: action, api: api, }); + if(action === "ADD") { + this.activeTab = "api"; + } this.apiDefaultTab = newTabName; }, debug(id) { @@ -650,7 +653,7 @@ export default { row.tags = JSON.parse(row.tags); } } - this.handleTabsEdit(name, "ADD", row); + this.handleTabsEdit(name, "TEST", row); }, mockConfig(data) { let targetName = this.$t("commons.mock") + "-" + data.apiName; diff --git a/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue b/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue index 59fdf873dd..da0bdec0e5 100644 --- a/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue +++ b/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue @@ -220,27 +220,6 @@ export default { } else { this.addCase(); } - // this.$post("/api/testcase/list", this.condition, response => { - // let data = response.data; - // data.forEach(apiCase => { - // if (apiCase.tags && apiCase.tags.length > 0) { - // apiCase.tags = JSON.parse(apiCase.tags); - // this.$set(apiCase, 'selected', false); - // } - // if (Object.prototype.toString.call(apiCase.request).match(/\[object (\w+)\]/)[1].toLowerCase() !== 'object') { - // apiCase.request = JSON.parse(apiCase.request); - // } - // if (!apiCase.request.hashTree) { - // apiCase.request.hashTree = []; - // } - // }); - // this.apiCaseList = data; - // if (apiCase) { - // this.copyCase(apiCase); - // } else { - // this.addCase(); - // } - // }); }, apiCaseClose() {