refactor(接口测试): 工作台跳转和页面及时刷新消息通知排除自己

--user=郭雨琦
This commit is contained in:
guoyuqi 2022-08-18 14:02:21 +08:00 committed by f2c-ci-robot[bot]
parent d4845c9801
commit c9d61a1665
8 changed files with 17 additions and 10 deletions

View File

@ -45,9 +45,9 @@ import io.metersphere.log.vo.DetailColumn;
import io.metersphere.log.vo.OperatingLogDetails;
import io.metersphere.log.vo.api.AutomationReference;
import io.metersphere.log.vo.schedule.ScheduleReference;
import io.metersphere.metadata.service.FileAssociationService;
import io.metersphere.notice.sender.NoticeModel;
import io.metersphere.notice.service.NoticeSendService;
import io.metersphere.metadata.service.FileAssociationService;
import io.metersphere.plugin.core.MsTestElement;
import io.metersphere.service.*;
import io.metersphere.track.dto.TestPlanDTO;
@ -1439,6 +1439,7 @@ public class ApiAutomationService {
.testId(apiScenario.getId())
.subject(Translator.get("scenario_update_notice"))
.paramMap(paramMap)
.excludeSelf(true)
.event(NoticeConstants.Event.UPDATE)
.build();
noticeSendService.send(NoticeConstants.TaskType.API_AUTOMATION_TASK, noticeModel);
@ -1455,6 +1456,7 @@ public class ApiAutomationService {
.testId(apiScenario.getId())
.subject(Translator.get("scenario_create_notice"))
.paramMap(paramMap)
.excludeSelf(true)
.event(NoticeConstants.Event.CREATE)
.build();
noticeSendService.send(NoticeConstants.TaskType.API_AUTOMATION_TASK, noticeModel);

View File

@ -1155,6 +1155,7 @@ public class ApiDefinitionService {
.testId(apiDefinitionWithBLOBs.getId())
.subject(Translator.get("api_update_notice"))
.paramMap(paramMap)
.excludeSelf(true)
.event(NoticeConstants.Event.UPDATE)
.build();
noticeSendService.send(NoticeConstants.TaskType.API_DEFINITION_TASK, noticeModel);
@ -1171,6 +1172,7 @@ public class ApiDefinitionService {
.testId(apiDefinitionWithBLOBs.getId())
.subject(Translator.get("api_create_notice"))
.paramMap(paramMap)
.excludeSelf(true)
.event(NoticeConstants.Event.CREATE)
.build();
noticeSendService.send(NoticeConstants.TaskType.API_DEFINITION_TASK, noticeModel);
@ -1186,6 +1188,7 @@ public class ApiDefinitionService {
.testId(apiTestCase.getId())
.subject(Translator.get("api_case_update_notice"))
.paramMap(paramMap)
.excludeSelf(true)
.event(NoticeConstants.Event.CASE_UPDATE)
.build();
noticeSendService.send(NoticeConstants.TaskType.API_DEFINITION_TASK, noticeModel);
@ -1201,6 +1204,7 @@ public class ApiDefinitionService {
.testId(apiTestCase.getId())
.subject(Translator.get("api_case_create_notice"))
.paramMap(paramMap)
.excludeSelf(true)
.event(NoticeConstants.Event.CASE_CREATE)
.build();
noticeSendService.send(NoticeConstants.TaskType.API_DEFINITION_TASK, noticeModel);

View File

@ -92,7 +92,7 @@ public class MailNoticeSender extends AbstractNoticeSender {
LogUtil.debug("发件人地址" + javaMailSender.getUsername());
LogUtil.debug("helper" + helper);
helper.setSubject("MeterSphere " + subject);
helper.setSubject("MeterSphere " + subject);
LogUtil.info("收件人地址: {}", Arrays.asList(users));
helper.setText(context, true);

View File

@ -414,9 +414,9 @@ parallel=Parallel
plan_warning=The test plan does not have an associated executable use case
csv_no_exist=CSV file does not exist
update_scenario=Updated the scene
scenario_update_notice=Scene Update Notification
scenario_update_notice=Interface Automation Notification
create_scenario=new scene
scenario_create_notice=Scene creation notification
scenario_create_notice=Interface Automation Notification
update_api=Updated interface definition
api_update_notice=Interface update notification
create_api=New interface definition

View File

@ -413,9 +413,9 @@ parallel=并行
plan_warning=测试计划没有关联可执行的用例
csv_no_exist=CSV文件不存在
update_scenario=更新了场景
scenario_update_notice=场景更新通知
scenario_update_notice=接口自动化通知
create_scenario=新建了场景
scenario_create_notice=场景新建通知
scenario_create_notice=接口自动化通知
update_api=更新了接口定义
api_update_notice=接口更新通知
create_api=新建了接口定义

View File

@ -412,9 +412,9 @@ parallel=並行
plan_warning=測試計劃沒有關聯可執行的用例
csv_no_exist=CSV檔案不存在
update_scenario=更新了場景
scenario_update_notice=場景更新通知
scenario_update_notice=接口自動化通知
create_scenario=新建了場景
scenario_create_notice=場景新建通知
scenario_create_notice=接口自動化通知
update_api=更新了接口定義
api_update_notice=接口更新通知
create_api=新建了接口定義

View File

@ -755,7 +755,7 @@ export default {
if (routeParamObj) {
let dataRange = routeParamObj.dataSelectRange;
let dataType = routeParamObj.dataType;
if (dataRange && dataRange instanceof String) {
if (dataRange && typeof dataRange === 'string') {
let selectParamArr = dataRange.split("edit:");
if (selectParamArr.length === 2) {
let scenarioId = selectParamArr[1];
@ -769,7 +769,7 @@ export default {
} else {
let dataRange = this.$route.params.dataSelectRange;
let dataType = this.$route.params.dataType;
if (dataRange && dataRange instanceof String) {
if (dataRange && typeof dataRange === 'string') {
let selectParamArr = dataRange.split("edit:");
if (selectParamArr.length === 2) {
let scenarioId = selectParamArr[1];

View File

@ -437,6 +437,7 @@ export default {
},
'caseSyncRuleRelation.showUpdateRule': {
handler(v) {
this.noShowSyncRuleRelation = v;
this.$EventBus.$emit('showXpackCaseBtn', v);
}
}