Merge remote-tracking branch 'origin/v1.8' into v1.8

This commit is contained in:
song.tianyang 2021-03-30 17:16:49 +08:00
commit e63a56257c
8 changed files with 38 additions and 26 deletions

View File

@ -333,10 +333,6 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
for (SampleResult subResult : result.getSubResults()) { for (SampleResult subResult : result.getSubResults()) {
requestResult.getSubRequestResults().add(getRequestResult(subResult)); requestResult.getSubRequestResults().add(getRequestResult(subResult));
} }
for (SampleResult subResult : result.getSubResults()) {
requestResult.getSubRequestResults().add(getRequestResult(subResult));
}
ResponseResult responseResult = requestResult.getResponseResult(); ResponseResult responseResult = requestResult.getResponseResult();
responseResult.setBody(result.getResponseDataAsString()); responseResult.setBody(result.getResponseDataAsString());
responseResult.setHeaders(result.getResponseHeaders()); responseResult.setHeaders(result.getResponseHeaders());

View File

@ -182,25 +182,19 @@ public class TestCaseService {
List<TestCaseWithBLOBs> caseList = testCaseMapper.selectByExampleWithBLOBs(example); List<TestCaseWithBLOBs> caseList = testCaseMapper.selectByExampleWithBLOBs(example);
// 如果上边字段全部相同去检查 steps remark // 如果上边字段全部相同去检查 remark steps
boolean isExt = false;
String caseRemark = testCase.getRemark();
if (StringUtils.isBlank(caseRemark)) {
caseRemark = "";
}
if (!CollectionUtils.isEmpty(caseList)) { if (!CollectionUtils.isEmpty(caseList)) {
String caseRemark = testCase.getRemark();
String caseSteps = testCase.getSteps();
for (TestCaseWithBLOBs tc : caseList) { for (TestCaseWithBLOBs tc : caseList) {
String steps = tc.getSteps(); String steps = tc.getSteps();
String remark = tc.getRemark(); String remark = tc.getRemark();
if (StringUtils.equals(steps, testCase.getSteps()) && StringUtils.equals(remark, caseRemark)) { if (StringUtils.equals(steps, caseSteps) && StringUtils.equals(remark, caseRemark)) {
//MSException.throwException(Translator.get("test_case_already_exists")); //MSException.throwException(Translator.get("test_case_already_exists"));
isExt = true; return tc;
} }
} }
} }
if (isExt) {
return caseList.get(0);
}
} }
return null; return null;
} }

View File

@ -113,8 +113,8 @@ public class XmindCaseParser {
for (int i = 0; i < nodes.length; i++) { for (int i = 0; i < nodes.length; i++) {
if (i != 0 && StringUtils.equals(nodes[i].trim(), "")) { if (i != 0 && StringUtils.equals(nodes[i].trim(), "")) {
process.add(Translator.get("module_not_null"), path); process.add(Translator.get("module_not_null"), path);
} else if (nodes[i].trim().length() > 30) { } else if (nodes[i].trim().length() > 100) {
process.add(Translator.get("module") + Translator.get("test_track.length_less_than") + "30", path + nodes[i].trim()); process.add(Translator.get("module") + Translator.get("test_track.length_less_than") + "100", path + nodes[i].trim());
} else { } else {
path += nodes[i].trim() + "/"; path += nodes[i].trim() + "/";
} }
@ -150,8 +150,8 @@ public class XmindCaseParser {
if (i != 0 && StringUtils.equals(nodes[i].trim(), "")) { if (i != 0 && StringUtils.equals(nodes[i].trim(), "")) {
process.add(Translator.get("test_case") + Translator.get("module_not_null"), nodePath + data.getName()); process.add(Translator.get("test_case") + Translator.get("module_not_null"), nodePath + data.getName());
break; break;
} else if (nodes[i].trim().length() > 30) { } else if (nodes[i].trim().length() > 100) {
process.add(Translator.get("module") + Translator.get("test_track.length_less_than") + "30 ", nodes[i].trim()); process.add(Translator.get("module") + Translator.get("test_track.length_less_than") + "100 ", nodes[i].trim());
break; break;
} }
} }

View File

@ -144,7 +144,7 @@ password_format_is_incorrect=有效密码8-30位英文大小写字母+数
please_input_workspace_member=请填写该工作空间相关人员 please_input_workspace_member=请填写该工作空间相关人员
test_case_report_template_repeat=同一工作空间下不能存在同名模版 test_case_report_template_repeat=同一工作空间下不能存在同名模版
plan_name_already_exists=测试计划名称已存在 plan_name_already_exists=测试计划名称已存在
test_case_already_exists_excel=导入文件中存在重复用例 test_case_already_exists_excel=文件中存在多条相同用例
test_case_module_already_exists=同层级下已存在该模块名称 test_case_module_already_exists=同层级下已存在该模块名称
api_test_name_already_exists=测试名称已经存在 api_test_name_already_exists=测试名称已经存在
functional_method_tip=功能测试不支持自动方式 functional_method_tip=功能测试不支持自动方式

View File

@ -144,7 +144,7 @@ password_format_is_incorrect=有效密碼8-30位英文大小寫字母+數
please_input_workspace_member=請填寫該工作空間相關人員 please_input_workspace_member=請填寫該工作空間相關人員
test_case_report_template_repeat=同壹工作空間下不能存在同名模版 test_case_report_template_repeat=同壹工作空間下不能存在同名模版
plan_name_already_exists=測試計劃名稱已存在 plan_name_already_exists=測試計劃名稱已存在
test_case_already_exists_excel=導入文件中存在重復用例 test_case_already_exists_excel=文件中存在多條相同用例
test_case_module_already_exists=同層級下已存在該模塊名稱 test_case_module_already_exists=同層級下已存在該模塊名稱
api_test_name_already_exists=測試名稱已經存在 api_test_name_already_exists=測試名稱已經存在
functional_method_tip=功能測試不支持自動方式 functional_method_tip=功能測試不支持自動方式

View File

@ -100,7 +100,14 @@
<div class="ms-debug-div" @click="showAll"> <div class="ms-debug-div" @click="showAll">
<el-row style="margin: 5px"> <el-row style="margin: 5px">
<el-col :span="6" class="ms-col-one ms-font"> <el-col :span="6" class="ms-col-one ms-font">
{{ currentScenario.name === undefined || '' ? $t('api_test.scenario.name') : currentScenario.name }} <el-tooltip placement="top" effect="light">
<template v-slot:content>
<div>{{ currentScenario.name }}</div>
</template>
<span class="scenario-name">
{{ currentScenario.name === undefined || '' ? $t('api_test.scenario.name') : currentScenario.name }}
</span>
</el-tooltip>
</el-col> </el-col>
<el-col :span="3" class="ms-col-one ms-font"> <el-col :span="3" class="ms-col-one ms-font">
{{$t('api_test.automation.step_total')}}{{scenarioDefinition.length}} {{$t('api_test.automation.step_total')}}{{scenarioDefinition.length}}
@ -447,7 +454,7 @@
}, },
}, },
methods: { methods: {
setModule(id,data) { setModule(id, data) {
this.currentScenario.apiScenarioModuleId = id; this.currentScenario.apiScenarioModuleId = id;
this.currentScenario.modulePath = data.path; this.currentScenario.modulePath = data.path;
}, },
@ -1250,4 +1257,14 @@
font-size: 18px; font-size: 18px;
} }
.scenario-name {
display: inline-block;
margin: 0 5px;
overflow-x: hidden;
padding-bottom: 0;
text-overflow: ellipsis;
vertical-align: middle;
white-space: nowrap;
width: 200px;
}
</style> </style>

View File

@ -163,4 +163,9 @@ export default {
margin-left: 6px; margin-left: 6px;
} }
/deep/ .el-icon-close:hover {
font-size: 30px;
font-weight: bold;
}
</style> </style>

View File

@ -20,7 +20,7 @@
<el-table-column width="30" :resizable="false" align="center"> <el-table-column width="30" :resizable="false" align="center">
<template v-slot:default="scope"> <template v-slot:default="scope">
<show-more-btn :is-show="scope.row.showMore" :buttons="buttons" :size="selectDataCounts"/> <show-more-btn :is-show="scope.row.showMore" :buttons="buttons" :size="selectDataCounts" v-tester/>
</template> </template>
</el-table-column> </el-table-column>
@ -49,7 +49,7 @@
<ms-table-operator-button :tip="$t('test_track.plan_view.view_report')" icon="el-icon-document" <ms-table-operator-button :tip="$t('test_track.plan_view.view_report')" icon="el-icon-document"
@exec="openReport(scope.row.id)"/> @exec="openReport(scope.row.id)"/>
<ms-table-operator-button type="danger" :tip="$t('commons.delete')" icon="el-icon-delete" <ms-table-operator-button type="danger" :tip="$t('commons.delete')" icon="el-icon-delete"
@exec="handleDelete(scope.row)" /> @exec="handleDelete(scope.row)" v-tester/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>