fix(接口测试): 测试报告界面中查看接口用例断言弹窗中无法完整显示断言代码

--bug=1009238 --user=王孝刚 [github#8828] 测试报告界面中查看接口用例断言弹窗中无法完整显示断言代码
https://www.tapd.cn/55049933/s/1087858
This commit is contained in:
wxg0103 2021-12-29 09:54:27 +08:00 committed by jianxing
parent d2ca68cacd
commit 0ad9689e78
5 changed files with 7 additions and 3 deletions

View File

@ -33,6 +33,7 @@ public class MsAssertions extends MsTestElement {
private MsAssertionDocument document; private MsAssertionDocument document;
private static final String delimiter = "split=="; private static final String delimiter = "split==";
private static final String delimiterScript = "split&&";
@Override @Override
public void toHashTree(HashTree tree, List<MsTestElement> hashTree, MsParameter msParameter) { public void toHashTree(HashTree tree, List<MsTestElement> hashTree, MsParameter msParameter) {
@ -176,9 +177,9 @@ public class MsAssertions extends MsTestElement {
JSR223Assertion assertion = new JSR223Assertion(); JSR223Assertion assertion = new JSR223Assertion();
assertion.setEnabled(this.isEnable()); assertion.setEnabled(this.isEnable());
if (StringUtils.isNotEmpty(assertionJSR223.getDesc())) { if (StringUtils.isNotEmpty(assertionJSR223.getDesc())) {
assertion.setName("JSR223" + delimiter + this.getName() + delimiter + assertionJSR223.getDesc() + "&&" + assertionJSR223.getScript()); assertion.setName("JSR223" + delimiter + this.getName() + delimiter + assertionJSR223.getDesc() + delimiterScript + assertionJSR223.getScript());
} else { } else {
assertion.setName("JSR223" + delimiter + this.getName() + delimiter + "JSR223Assertion" + "&&" + assertionJSR223.getScript()); assertion.setName("JSR223" + delimiter + this.getName() + delimiter + "JSR223Assertion" + delimiterScript + assertionJSR223.getScript());
} }
assertion.setProperty(TestElement.TEST_CLASS, JSR223Assertion.class.getName()); assertion.setProperty(TestElement.TEST_CLASS, JSR223Assertion.class.getName());
assertion.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI")); assertion.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI"));

View File

@ -344,7 +344,7 @@ export default {
} }
} else { } else {
this.$emit('invisible'); this.$emit('invisible');
this.$warning('报告已删除'); this.$warning(this.$t('commons.report_delete'));
} }
}, },
buildReport() { buildReport() {

View File

@ -223,6 +223,7 @@ export default {
run_fail: "Run Fail", run_fail: "Run Fail",
run_warning: "Is running, please check later", run_warning: "Is running, please check later",
run_stop: "The current task has been stopped and the report cannot be viewed", run_stop: "The current task has been stopped and the report cannot be viewed",
report_delete: "Report deleted",
follow_success: "Follow Success", follow_success: "Follow Success",
cancel_follow_success: "Cancel Follow Success", cancel_follow_success: "Cancel Follow Success",
generate_test_data: "Generate test data", generate_test_data: "Generate test data",

View File

@ -223,6 +223,7 @@ export default {
run_completed: "执行完成", run_completed: "执行完成",
run_warning: "正在运行中,请稍后查看", run_warning: "正在运行中,请稍后查看",
run_stop: "当前任务已停止,无法查看报告", run_stop: "当前任务已停止,无法查看报告",
report_delete: "报告已删除",
run_fail: "执行失败", run_fail: "执行失败",
follow_success: "关注成功", follow_success: "关注成功",
cancel_follow_success: "取消关注成功", cancel_follow_success: "取消关注成功",

View File

@ -223,6 +223,7 @@ export default {
run_completed: "執行完成", run_completed: "執行完成",
run_warning: "正在運行中,請稍後查看", run_warning: "正在運行中,請稍後查看",
run_stop: "當前任務已停止,無法查看報告", run_stop: "當前任務已停止,無法查看報告",
report_delete: "報告已删除",
run_fail: "執行失敗", run_fail: "執行失敗",
follow_success: "關註成功", follow_success: "關註成功",
cancel_follow_success: "取消關註成功", cancel_follow_success: "取消關註成功",