fix(测试跟踪): 只有UI用例时测试计划屏蔽资源池选择框

--bug=1020120 --user=张大海 【UI测试】禁用本地执行资源池-测试计划-只关联了UI用例-执行计划提示“请选择资源池” https://www.tapd.cn/55049933/s/1303312
This commit is contained in:
zhangdahai112 2022-11-23 19:58:44 +08:00 committed by zhangdahai112
parent 3c8a9c8a53
commit 2378d5f084
3 changed files with 14 additions and 10 deletions

View File

@ -1639,10 +1639,6 @@ public class TestPlanService {
return true;
}
if (planTestPlanUiScenarioCaseService.haveUiCase(planId)) {
return true;
}
return planTestPlanLoadCaseService.haveExecCase(planId);
}

View File

@ -58,7 +58,7 @@
<!-- 串行 -->
<div
class="mode-row"
v-if="runConfig.mode === 'serial' && testType === 'API'"
v-if="runConfig.mode === 'serial' && testType === 'API' && haveOtherExecCase"
>
<el-checkbox
v-model="runConfig.runWithinResourcePool"
@ -86,7 +86,7 @@
<!-- 并行 -->
<div
class="mode-row"
v-if="runConfig.mode === 'parallel' && testType === 'API'"
v-if="runConfig.mode === 'parallel' && testType === 'API' && haveOtherExecCase"
>
<el-checkbox
v-model="runConfig.runWithinResourcePool"
@ -278,6 +278,10 @@ export default {
type: Boolean,
default: false,
},
haveOtherExecCase: {
type: Boolean,
default: false,
},
},
methods: {
open(testType, runModeConfig) {

View File

@ -316,7 +316,7 @@
:type="'plan'" :have-u-i-case="haveUICase"/>
<ms-test-plan-schedule-batch-switch ref="scheduleBatchSwitch" @refresh="refresh"/>
<ms-test-plan-run-mode-with-env @handleRunBatch="_handleRun" ref="runMode" :plan-case-ids="[]" :type="'plan'"
:plan-id="currentPlanId" :show-save="true" :have-u-i-case="haveUICase"/>
:plan-id="currentPlanId" :show-save="true" :have-u-i-case="haveUICase" :have-other-exec-case="haveOtherExecCase"/>
<test-plan-report-review ref="testCaseReportView"/>
<ms-task-center ref="taskCenter" :show-menu="false"/>
<el-dialog
@ -477,7 +477,10 @@ export default {
},
],
batchExecuteType: "serial",
haveUICase: false
//UI
haveUICase: false,
//API/
haveOtherExecCase: false,
};
},
watch: {
@ -823,8 +826,9 @@ export default {
.then(() => {
testPlanHaveExecCase(row.id)
.then(async res => {
const haveExecCase = res.data;
if (haveExecCase) {
this.haveOtherExecCase = res.data;
//ui
if (this.haveOtherExecCase || this.haveUICase) {
this.$refs.runMode.open('API', row.runModeConfig);
} else {
this.$router.push('/track/plan/view/' + row.id);