fix(接口测试): 修复用例跳转报错问题
--bug=1014469 --user=赵勇 【接口测试】测试报告中某些用例删除,点击删除的case标题,页面会报错; https://www.tapd.cn/55049933/s/1192451
This commit is contained in:
parent
5d62ee5bfe
commit
3fe3ddbc46
|
@ -623,8 +623,8 @@ export default {
|
|||
},
|
||||
editScenario(row) {
|
||||
if (!row) {
|
||||
this.activeName === 'default'
|
||||
this.$error("跳转的应场景已经删除!");
|
||||
this.activeName = 'default';
|
||||
this.$error(this.$t('api_test.scenario_jump_message'));
|
||||
return;
|
||||
}
|
||||
const index = this.tabs.find(p => p.currentScenario.id === row.id && p.currentScenario.copy === row.copy);
|
||||
|
|
|
@ -628,9 +628,8 @@ export default {
|
|||
return;
|
||||
}
|
||||
this.loading = true;
|
||||
this.report.projectId = this.projectId;
|
||||
let url = "/api/scenario/report/update";
|
||||
this.result = this.$post(url, this.report, response => {
|
||||
let url = "/api/scenario/report/reName";
|
||||
this.result = this.$post(url, {id: this.report.id,name: this.report.name,reportType: this.report.reportType }, response => {
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
this.loading = false;
|
||||
this.$emit('refresh');
|
||||
|
|
|
@ -439,14 +439,14 @@ export default {
|
|||
}
|
||||
}
|
||||
this.getEnv();
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
// 通知过来的数据跳转到编辑
|
||||
if (this.$route.query.caseId) {
|
||||
this.activeDom = 'middle';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
setEnvironment(data) {
|
||||
if (data) {
|
||||
|
|
|
@ -497,14 +497,20 @@ export default {
|
|||
// 切换tab之后版本查询
|
||||
this.condition.versionId = this.currentVersion;
|
||||
this.initTable();
|
||||
this.getVersionOptions();
|
||||
this.checkVersionEnable();
|
||||
},
|
||||
mounted() {
|
||||
// 通知过来的数据跳转到编辑
|
||||
if (this.$route.query.caseId) {
|
||||
this.$get('/api/testcase/findById/' + this.$route.query.caseId, (response) => {
|
||||
if(!response.data){
|
||||
this.$error(this.$t('api_test.case_jump_message'));
|
||||
return;
|
||||
}
|
||||
this.handleTestCase(response.data);
|
||||
});
|
||||
}
|
||||
this.getVersionOptions();
|
||||
this.checkVersionEnable();
|
||||
},
|
||||
watch: {
|
||||
selectNodeIds() {
|
||||
|
|
|
@ -1121,6 +1121,8 @@ export default {
|
|||
hours: "H",
|
||||
},
|
||||
api_test: {
|
||||
case_jump_message: "The jump use case has been removed!",
|
||||
scenario_jump_message: "The jumped scene has been deleted!",
|
||||
is_continue: "Is continue",
|
||||
creator: "Creator",
|
||||
save_and_run: "Save and Run",
|
||||
|
|
|
@ -1127,6 +1127,8 @@ export default {
|
|||
hours: "时",
|
||||
},
|
||||
api_test: {
|
||||
case_jump_message: "跳转的用例已经删除!",
|
||||
scenario_jump_message: "跳转的场景已经删除!",
|
||||
is_continue: "是否继续",
|
||||
creator: "创建人",
|
||||
save_and_run: "保存并执行",
|
||||
|
|
|
@ -1127,6 +1127,8 @@ export default {
|
|||
hours: "時",
|
||||
},
|
||||
api_test: {
|
||||
case_jump_message: "跳轉的用例已經刪除!",
|
||||
scenario_jump_message: "跳轉的場景已經刪除!",
|
||||
is_continue: "是否繼續",
|
||||
creator: "創建人",
|
||||
save_and_run: "保存並執行",
|
||||
|
|
Loading…
Reference in New Issue