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) { export function uiScenarioModulePlanList(planId) {
return get(BASE_URL + `list/module/${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"/> @batchEdit="batchEdit"/>
<ui-run-mode @handleRunBatch="handleRunBatch" ref="runMode" :custom-run-mode="true" <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"/> <ms-task-center ref="taskCenter" :show-menu="false"/>
</div> </div>
@ -440,7 +440,7 @@ export default {
let rows = this.orderBySelectRows(this.$refs.table.selectRows); let rows = this.orderBySelectRows(this.$refs.table.selectRows);
this.planCaseIds = []; this.planCaseIds = [];
rows.forEach(row => { rows.forEach(row => {
this.planCaseIds.push(row.caseId); this.planCaseIds.push(row.id);
}) })
this.conditionRequest.id = getUUID(); this.conditionRequest.id = getUUID();
this.conditionRequest.ids = this.planCaseIds; this.conditionRequest.ids = this.planCaseIds;

View File

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