fix(UI自动化): 测试计划-UI用例列表-批量执行-环境显示错误

--bug=1021693 --user=张大海 【测试跟踪】测试计划-UI用例列表-批量执行-环境显示错误 https://www.tapd.cn/55049933/s/1323945
This commit is contained in:
zhangdahai112 2023-01-07 15:48:42 +08:00 committed by zhangdahai112
parent 1db0e15741
commit dc23cee80a
3 changed files with 11 additions and 4 deletions

View File

@ -43,3 +43,7 @@ export function testPlanUiScenarioCaseDelete(id) {
export function uiScenarioModulePlanList(planId) {
return get(BASE_URL + `list/module/${planId}`);
}
export function testPlanUiScenarioCaseEnv(params) {
return post(BASE_URL + 'get/env', params);
}

View File

@ -178,7 +178,7 @@
@batchEdit="batchEdit"/>
<ui-run-mode @handleRunBatch="handleRunBatch" ref="runMode" :custom-run-mode="true"
:custom-serial-on-sample-error="true" :request="conditionRequest"/>
:custom-serial-on-sample-error="true" :request="conditionRequest" :plan-case-ids="planCaseIds"/>
<ms-task-center ref="taskCenter" :show-menu="false"/>
</div>
@ -440,7 +440,7 @@ export default {
let rows = this.orderBySelectRows(this.$refs.table.selectRows);
this.planCaseIds = [];
rows.forEach(row => {
this.planCaseIds.push(row.caseId);
this.planCaseIds.push(row.id);
})
this.conditionRequest.id = getUUID();
this.conditionRequest.ids = this.planCaseIds;

View File

@ -192,8 +192,8 @@
<script>
import MsDialogFooter from 'metersphere-frontend/src/components/MsDialogFooter'
import {getCurrentProjectID, getOwnerProjects, strMapToObj} from "@/business/utils/sdk-utils";
import {uiScenarioEnvMap} from "@/api/remote/ui/ui-automation";
import EnvSelectPopover from "@/business/plan/env/EnvSelectPopover";
import {testPlanUiScenarioCaseEnv} from "@/api/remote/ui/test-plan-ui-scenario-case";
export default {
name: "UiRunMode",
@ -230,6 +230,9 @@ export default {
};
},
props: {
planCaseIds: {
type: Array,
},
request: {
type: Object,
},
@ -326,7 +329,7 @@ export default {
showScenarioPopover() {
let currentProjectID = getCurrentProjectID();
this.projectIds.clear();
uiScenarioEnvMap(this.request).then((res) => {
testPlanUiScenarioCaseEnv(this.request.ids).then((res) => {
let data = res.data;
this.projectEnvListMap = data;
if (data) {