fix(测试计划): 修改测试计划定时任务的配置可见项类型

--bug=1025626 --user=宋天阳 【测试跟踪】测试计划中只有ui测试用例-定时任务设置-其它配置显示资源池设置
https://www.tapd.cn/55049933/s/1364753
This commit is contained in:
song-tianyang 2023-04-20 14:37:44 +08:00 committed by 建国
parent d733631a29
commit 13bf6532d3
6 changed files with 19 additions and 21 deletions

View File

@ -98,7 +98,7 @@ public class HashTreeUtil {
return returnMap;
}
public synchronized Map<String, List<String>> getEnvParamsMapByHashTree(HashTree hashTree) {
public Map<String, List<String>> getEnvParamsMapByHashTree(HashTree hashTree) {
Map<String, List<String>> returnMap = new HashMap<>();
if (hashTree != null) {
for (Object hashTreeKey : hashTree.keySet()) {
@ -116,8 +116,8 @@ public class HashTreeUtil {
JSR223Sampler processor = (JSR223Sampler) hashTreeKey;
scriptValue = processor.getPropertyAsString(SCRIPT);
}
} catch (Exception ignored) {
LogUtil.error(ignored);
} catch (Exception e) {
LogUtil.error(e);
}
if (StringUtils.isNotEmpty(scriptValue)) {

View File

@ -531,7 +531,7 @@ public class BaseEnvironmentService extends NodeTreeService<ApiModuleDTO> {
return baseApiTestEnvironmentMapper.selectNameById(id);
}
public synchronized ApiTestEnvironmentWithBLOBs getMockEnvironmentByProjectId(String projectId) {
public ApiTestEnvironmentWithBLOBs getMockEnvironmentByProjectId(String projectId) {
SystemParameterService systemParameterService = CommonBeanFactory.getBean(SystemParameterService.class);
BaseSystemConfigDTO baseSystemConfigDTO = systemParameterService.getBaseInfo();

View File

@ -22,7 +22,7 @@ public class ChromeUtil {
return chromeUtils;
}
private synchronized WebDriver genWebDriver(String seleniumUrl, String language) {
private WebDriver genWebDriver(String seleniumUrl, String language) {
if (StringUtils.isEmpty(seleniumUrl)) {
LogUtil.error("Headless request is null! " + seleniumUrl);
return null;
@ -52,7 +52,7 @@ public class ChromeUtil {
return driver;
}
public synchronized Map<String, String> getImageInfo(HeadlessRequest request, String langurage) {
public Map<String, String> getImageInfo(HeadlessRequest request, String langurage) {
Map<String, String> returnMap = new HashMap<>();
if (request.isEmpty()) {
return returnMap;

View File

@ -160,7 +160,7 @@ public class TestPlanService {
@Resource
private ApiPoolDebugService apiPoolDebugService;
public synchronized TestPlan addTestPlan(AddTestPlanRequest testPlan) {
public TestPlan addTestPlan(AddTestPlanRequest testPlan) {
if (getTestPlanByName(testPlan.getName()).size() > 0) {
MSException.throwException(Translator.get("plan_name_already_exists"));
}
@ -678,7 +678,7 @@ public class TestPlanService {
} catch (Exception e) {
sqlSession.rollback();
throw new RuntimeException(e);
}finally {
} finally {
if (sqlSession != null && sqlSessionFactory != null) {
SqlSessionUtils.closeSqlSession(sqlSession, sqlSessionFactory);
}
@ -2009,7 +2009,7 @@ public class TestPlanService {
//未勾选资源池运行时将资源池ID赋空
runModeConfig.setResourcePoolId(null);
}
String apiRunConfig = JSON.toJSONString(runModeConfig);
return this.runTestPlan(testPlanId, testplanRunRequest.getProjectId(),
testplanRunRequest.getUserId(), testplanRunRequest.getTriggerMode(), testplanRunRequest.getReportId(), testplanRunRequest.getExecutionWay(), apiRunConfig);

View File

@ -86,12 +86,12 @@
<span class="ms-mode-span">{{ $t("run_mode.title") }}</span>
<el-radio-group v-model="runConfig.mode" @change="changeMode">
<el-radio label="serial">{{ $t("run_mode.serial") }}</el-radio>
<el-radio label="parallel">{{
$t("run_mode.parallel")
}}</el-radio>
<el-radio label="parallel"
>{{ $t("run_mode.parallel") }}
</el-radio>
</el-radio-group>
</div>
<div style="margin-top: 10px" v-if="haveUICase">
<div style="margin-top: 10px">
<span class="ms-mode-span">{{ $t("浏览器") }}</span>
<el-select
size="mini"
@ -214,16 +214,16 @@
<el-row>
<el-col :span="18" :offset="3">
<div>
<el-checkbox v-model="runConfig.onSampleError">{{
$t("api_test.fail_to_stop")
}}</el-checkbox>
<el-checkbox v-model="runConfig.onSampleError"
>{{ $t("api_test.fail_to_stop") }}
</el-checkbox>
</div>
</el-col>
</el-row>
</div>
<div v-if="haveUICase">
<div>
<el-row>
<el-col :span="3"> &nbsp; </el-col>
<el-col :span="3"> &nbsp;</el-col>
<el-col :span="18">
<div style="margin-top: 10px">
<el-checkbox v-model="runConfig.headlessEnabled">

View File

@ -1059,9 +1059,7 @@ export default {
async scheduleTask(row) {
row.redirectFrom = "testPlan";
this.currentPlanId = row.id;
this.haveUIScenario().then(() => {
this.$refs.scheduleMaintain.open(row);
});
this.$refs.scheduleMaintain.open(row);
},
saveSortField(key, orders) {
saveLastTableSortField(key, JSON.stringify(orders));