fix(UI 自动化): 【任务中心】UI场景用例的标题改成“UI测试用例”,和接口区分

--bug=1015119 --user=张大海 【任务中心】UI场景用例的标题改成“UI测试用例”,和接口区分 https://www.tapd.cn/55049933/s/1207334
This commit is contained in:
zhangdahai112 2022-07-22 15:30:19 +08:00 committed by zhangdahai112
parent 77a24d38bc
commit 0a8b0b2f51
5 changed files with 17 additions and 5 deletions

View File

@ -31,6 +31,7 @@ import io.metersphere.service.ScenarioExecutionInfoService;
import io.metersphere.service.SystemParameterService; import io.metersphere.service.SystemParameterService;
import io.metersphere.service.UserService; import io.metersphere.service.UserService;
import io.metersphere.track.dto.PlanReportCaseDTO; import io.metersphere.track.dto.PlanReportCaseDTO;
import io.metersphere.track.dto.UiRunModeConfigDTO;
import io.metersphere.utils.LoggerUtil; import io.metersphere.utils.LoggerUtil;
import io.metersphere.xmind.utils.FileUtil; import io.metersphere.xmind.utils.FileUtil;
import org.apache.commons.beanutils.BeanMap; import org.apache.commons.beanutils.BeanMap;
@ -907,7 +908,11 @@ public class ApiScenarioReportService {
if (config != null) { if (config != null) {
report.setEnvConfig(JSON.toJSONString(config)); report.setEnvConfig(JSON.toJSONString(config));
} }
report.setReportType(ReportTypeConstants.SCENARIO_INDEPENDENT.name()); if (config instanceof UiRunModeConfigDTO) {
report.setReportType(ReportTypeConstants.UI_INDEPENDENT.name());
} else {
report.setReportType(ReportTypeConstants.SCENARIO_INDEPENDENT.name());
}
return report; return report;
} }

View File

@ -81,7 +81,7 @@
<div v-for="item in taskData" :key="item.id" style="margin-bottom: 5px;"> <div v-for="item in taskData" :key="item.id" style="margin-bottom: 5px;">
<el-card class="ms-card-task" @click.native="showReport(item)"> <el-card class="ms-card-task" @click.native="showReport(item)">
<span> <span>
{{ getModeName(item.executionModule) }} : <el-link type="primary" class="ms-task-name-width"> {{ {{ getModeName(item) }} : <el-link type="primary" class="ms-task-name-width"> {{
item.name item.name
}} </el-link> }} </el-link>
</span> </span>
@ -327,10 +327,14 @@ export default {
} }
return true; return true;
}, },
getModeName(executionModule) { getModeName(item) {
switch (executionModule) { switch (item.executionModule) {
case "SCENARIO": case "SCENARIO":
return this.$t('test_track.scenario_test_case'); if (item.reportType !== "UI_INDEPENDENT") {
return this.$t('test_track.scenario_test_case');
} else {
return this.$t("test_track.ui_scenario_test_case");
}
case "PERFORMANCE": case "PERFORMANCE":
return this.$t('test_track.performance_test_case'); return this.$t('test_track.performance_test_case');
case "API": case "API":

View File

@ -2060,6 +2060,7 @@ export default {
ui_test_case: "UI Case", ui_test_case: "UI Case",
performance_test_case: "Performance Case", performance_test_case: "Performance Case",
scenario_test_case: "Scenario Case", scenario_test_case: "Scenario Case",
ui_scenario_test_case: "UI Scenario Case",
report_statistics: "Report Statistics", report_statistics: "Report Statistics",
sort: 'Sort', sort: 'Sort',
other_test_name: 'Other Test Name', other_test_name: 'Other Test Name',

View File

@ -2067,6 +2067,7 @@ export default {
ui_test_case: "UI 测试用例", ui_test_case: "UI 测试用例",
performance_test_case: "性能测试用例", performance_test_case: "性能测试用例",
scenario_test_case: "场景测试用例", scenario_test_case: "场景测试用例",
ui_scenario_test_case: "UI 测试用例",
report_statistics: "报告统计", report_statistics: "报告统计",
sort: '种类', sort: '种类',
other_test_name: '其他测试名称', other_test_name: '其他测试名称',

View File

@ -2064,6 +2064,7 @@ export default {
ui_test_case: "UI 測試用例", ui_test_case: "UI 測試用例",
performance_test_case: "性能測試用例", performance_test_case: "性能測試用例",
scenario_test_case: "場景測試用例", scenario_test_case: "場景測試用例",
ui_scenario_test_case: "UI 測試用例",
report_statistics: "報告統計", report_statistics: "報告統計",
sort: '種類', sort: '種類',
other_test_name: '其他測試名稱', other_test_name: '其他測試名稱',