fix(接口测试): 修复脚本页面除groovy语言别的也可以看见报文处理的缺陷
--bug=1023982 --user=王孝刚 [接口测试] github#22422 TCP 协议前置脚本-报文头添加长度脚本只使用于 groovy,其他类型脚本报错,建议修改脚本模板,或者隐藏其他脚本的生成入口 https://www.tapd.cn/55049933/s/1346218
This commit is contained in:
parent
180c92dd7b
commit
bd893d3ec4
|
@ -120,6 +120,7 @@ export default {
|
|||
' report = reportlengthStr+report;\n' +
|
||||
' ctx.getCurrentSampler().setRequestData(report);\n' +
|
||||
'}',
|
||||
disabled: this.isGroovy
|
||||
},
|
||||
{
|
||||
title: this.$t('api_test.request.processor.code_hide_report_length'),
|
||||
|
@ -180,6 +181,11 @@ export default {
|
|||
this.reload();
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isGroovy() {
|
||||
return this.jsr223ProcessorData.scriptLanguage !== 'groovy';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addTemplate(template) {
|
||||
if (!this.jsr223ProcessorData.script) {
|
||||
|
@ -199,6 +205,11 @@ export default {
|
|||
this.$nextTick(() => (this.isCodeEditAlive = true));
|
||||
},
|
||||
languageChange(language) {
|
||||
if (language === 'groovy') {
|
||||
this.codeTemplates[5].hideScript = true;
|
||||
} else {
|
||||
this.codeTemplates[5].hideScript = this.isHideScript();
|
||||
}
|
||||
this.jsr223ProcessorData.scriptLanguage = language;
|
||||
this.$emit("languageChange");
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue