refactor(接口测试): 优化插件被删除后执行的提示信息
--bug=1027473 --user=王孝刚 【接口测试】场景详情-插件被删除-单步骤调试-有时调试成功/有时提示调用资源池失败 https://www.tapd.cn/55049933/s/1388396
This commit is contained in:
parent
475fda0d79
commit
7c29efffa0
|
@ -1293,7 +1293,7 @@ export default {
|
||||||
this.mergeScenario(this.scenarioDefinition);
|
this.mergeScenario(this.scenarioDefinition);
|
||||||
this.validatePluginData(this.scenarioDefinition);
|
this.validatePluginData(this.scenarioDefinition);
|
||||||
if (this.pluginDelStep) {
|
if (this.pluginDelStep) {
|
||||||
this.$error('场景包含插件步骤,对应场景已经删除不能执行!');
|
this.$error(this.$t('automation.scenario_plugin_run_warning'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/*触发执行操作*/
|
/*触发执行操作*/
|
||||||
|
@ -1755,7 +1755,7 @@ export default {
|
||||||
this.validatePluginData(this.scenarioDefinition);
|
this.validatePluginData(this.scenarioDefinition);
|
||||||
if (this.pluginDelStep) {
|
if (this.pluginDelStep) {
|
||||||
this.debugLoading = false;
|
this.debugLoading = false;
|
||||||
this.$error('场景包含插件步骤,对应场景已经删除不能调试!');
|
this.$error(this.$t('automation.scenario_plugin_run_warning'));
|
||||||
|
|
||||||
this.clearResult(this.scenarioDefinition);
|
this.clearResult(this.scenarioDefinition);
|
||||||
this.clearNodeStatus(this.$refs.stepTree.root.childNodes);
|
this.clearNodeStatus(this.$refs.stepTree.root.childNodes);
|
||||||
|
@ -1899,7 +1899,7 @@ export default {
|
||||||
}
|
}
|
||||||
this.validatePluginData(this.scenarioDefinition);
|
this.validatePluginData(this.scenarioDefinition);
|
||||||
if (this.pluginDelStep) {
|
if (this.pluginDelStep) {
|
||||||
this.$error('场景包含插件步骤,对应场景已经删除不能编辑!');
|
this.$error(this.$t('automation.scenario_plugin_save_warning'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
|
|
|
@ -368,6 +368,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
run() {
|
run() {
|
||||||
|
if(this.request.plugin_del){
|
||||||
|
this.$error(this.$t('automation.scenario_plugin_save_warning'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.request.debug = true;
|
this.request.debug = true;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.runData = [];
|
this.runData = [];
|
||||||
|
|
|
@ -176,37 +176,7 @@ export default {
|
||||||
reloadData: '',
|
reloadData: '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
assertions: {
|
|
||||||
handler(v) {
|
|
||||||
this.computeStep();
|
|
||||||
},
|
|
||||||
deep: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
computeStep() {
|
|
||||||
let ruleSize = 0;
|
|
||||||
ruleSize =
|
|
||||||
this.assertions.jsonPath.length +
|
|
||||||
this.assertions.jsr223.length +
|
|
||||||
this.assertions.regex.length +
|
|
||||||
this.assertions.xpath2.length;
|
|
||||||
if (
|
|
||||||
this.assertions &&
|
|
||||||
this.assertions.document.data &&
|
|
||||||
(this.assertions.document.data.json.length > 0 || this.assertions.document.data.xml.length > 0)
|
|
||||||
) {
|
|
||||||
ruleSize++;
|
|
||||||
}
|
|
||||||
if (this.assertions.duration && this.assertions.duration.value > 0) {
|
|
||||||
ruleSize++;
|
|
||||||
}
|
|
||||||
ruleSize += this.assertions.text ? this.assertions.text.length : 0;
|
|
||||||
this.request.ruleSize = ruleSize;
|
|
||||||
this.$emit('reload');
|
|
||||||
},
|
|
||||||
|
|
||||||
after() {
|
after() {
|
||||||
this.type = '';
|
this.type = '';
|
||||||
this.reloadData = getUUID().substring(0, 8);
|
this.reloadData = getUUID().substring(0, 8);
|
||||||
|
|
|
@ -135,6 +135,9 @@ const message = {
|
||||||
'The current may cause page loading exceptions, whether to continue?',
|
'The current may cause page loading exceptions, whether to continue?',
|
||||||
case_message: 'Please select a case',
|
case_message: 'Please select a case',
|
||||||
scenario_message: 'Please select a scene',
|
scenario_message: 'Please select a scene',
|
||||||
|
scenario_plugin_debug_warning: 'The scenario contains plugin steps, and the corresponding scenario has been deleted and cannot be debugged! ',
|
||||||
|
scenario_plugin_save_warning: 'The scene contains plugin steps, and the corresponding scene has been deleted and cannot be edited! ',
|
||||||
|
scenario_plugin_run_warning: 'The scenario contains plugin steps, and the corresponding scenario has been deleted and cannot be executed!',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -130,6 +130,9 @@ const message = {
|
||||||
scenario_step_ref_message: '当前操作可能导致页面加载异常,是否继续',
|
scenario_step_ref_message: '当前操作可能导致页面加载异常,是否继续',
|
||||||
case_message: '请选择案例',
|
case_message: '请选择案例',
|
||||||
scenario_message: '请选择场景',
|
scenario_message: '请选择场景',
|
||||||
|
scenario_plugin_debug_warning: '场景包含插件步骤,对应场景已经删除不能调试!',
|
||||||
|
scenario_plugin_save_warning: '场景包含插件步骤,对应场景已经删除不能编辑!',
|
||||||
|
scenario_plugin_run_warning: '场景包含插件步骤,对应场景已经删除不能执行!',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -130,6 +130,9 @@ const message = {
|
||||||
scenario_step_ref_message: '當前操作可能導致頁面加載異常,是否繼續',
|
scenario_step_ref_message: '當前操作可能導致頁面加載異常,是否繼續',
|
||||||
case_message: '請選擇案例',
|
case_message: '請選擇案例',
|
||||||
scenario_message: '請選擇場景',
|
scenario_message: '請選擇場景',
|
||||||
|
scenario_plugin_debug_warning:'場景包含挿件步驟,對應場景已經刪除不能調試! ',
|
||||||
|
scenario_plugin_save_warning: '場景包含挿件步驟,對應場景已經刪除不能編輯! ',
|
||||||
|
scenario_plugin_run_warning: '場景包含挿件步驟,對應場景已經刪除不能運行! '
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue