fix(接口测试): 修复beanshell断言没有内容的缺陷
--bug=1027705 --user=王孝刚 【接口测试】github#25504,beanshell 脚本断言,在不勾选 JSR223 时,断言结果恒为真 https://www.tapd.cn/55049933/s/1393101 --bug=1027569 --user=王孝刚 【接口测试】场景回收站切到到场景列表-模块树未更新 https://www.tapd.cn/55049933/s/1393106
This commit is contained in:
parent
fd16fab6ed
commit
9e9b55ef63
|
@ -193,15 +193,8 @@ public class MsAssertions extends MsTestElement {
|
|||
|
||||
private TestElement jsr223Assertion(MsAssertionJSR223 assertionJSR223) {
|
||||
TestElement assertion = new JSR223Assertion();
|
||||
assertion.setEnabled(this.isEnable());
|
||||
if (StringUtils.isNotEmpty(assertionJSR223.getDesc())) {
|
||||
assertion.setName("JSR223" + delimiter + this.getName() + delimiter + assertionJSR223.getDesc() + delimiterScript + assertionJSR223.getScript());
|
||||
} else {
|
||||
assertion.setName("JSR223" + delimiter + this.getName() + delimiter + "JSR223Assertion" + delimiterScript + assertionJSR223.getScript());
|
||||
}
|
||||
assertion.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI"));
|
||||
assertion.setProperty(TestElement.TEST_CLASS, JSR223Assertion.class.getName());
|
||||
assertion.setProperty("cacheKey", "false");
|
||||
String scriptLanguage = assertionJSR223.getScriptLanguage();
|
||||
if (StringUtils.equals(scriptLanguage, "nashornScript")) {
|
||||
scriptLanguage = "nashorn";
|
||||
|
@ -219,6 +212,13 @@ public class MsAssertions extends MsTestElement {
|
|||
assertion.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("BeanShellAssertionGui"));
|
||||
assertion.setProperty(BeanShellAssertion.SCRIPT, assertionJSR223.getScript());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(assertionJSR223.getDesc())) {
|
||||
assertion.setName("JSR223" + delimiter + this.getName() + delimiter + assertionJSR223.getDesc() + delimiterScript + assertionJSR223.getScript());
|
||||
} else {
|
||||
assertion.setName("JSR223" + delimiter + this.getName() + delimiter + "JSR223Assertion" + delimiterScript + assertionJSR223.getScript());
|
||||
}
|
||||
assertion.setEnabled(this.isEnable());
|
||||
assertion.setProperty("cacheKey", "false");
|
||||
assertion.setProperty("scriptLanguage", scriptLanguage);
|
||||
assertion.setProperty(ElementConstants.SCRIPT, assertionJSR223.getScript());
|
||||
return assertion;
|
||||
|
|
|
@ -159,6 +159,9 @@ export default {
|
|||
relevanceProjectId() {
|
||||
this.list();
|
||||
},
|
||||
isTrashData() {
|
||||
this.list();
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.$EventBus.$on('scenarioConditionBus', (param) => {
|
||||
|
|
Loading…
Reference in New Issue