diff --git a/frontend/src/api/modules/test-plan/testPlan.ts b/frontend/src/api/modules/test-plan/testPlan.ts index 8b6facc1f4..69817ee692 100644 --- a/frontend/src/api/modules/test-plan/testPlan.ts +++ b/frontend/src/api/modules/test-plan/testPlan.ts @@ -16,7 +16,6 @@ import { deletePlanUrl, DeleteTestPlanModuleUrl, DisassociateCaseUrl, - EditCaseLastExecResultUrl, ExecuteHistoryUrl, followPlanUrl, GenerateReportUrl, @@ -54,7 +53,6 @@ import type { BatchFeatureCaseParams, BatchUpdateCaseExecutorParams, DisassociateCaseParams, - EditLastExecResultParams, ExecuteHistoryItem, ExecuteHistoryType, FollowPlanParams, @@ -196,10 +194,6 @@ export function getFeatureCaseModule(planId: string) { export function disassociateCase(data: DisassociateCaseParams) { return MSR.post({ url: DisassociateCaseUrl, data }); } -// 计划详情-功能用例列表-编辑执行结果 -export function editLastExecResult(data: EditLastExecResultParams) { - return MSR.post({ url: EditCaseLastExecResultUrl, data }); -} // 计划详情-功能用例列表-拖拽排序 export const sortFeatureCase = (data: SortFeatureCaseParams) => { return MSR.post({ url: SortFeatureCaseUrl, data }); diff --git a/frontend/src/api/requrls/test-plan/testPlan.ts b/frontend/src/api/requrls/test-plan/testPlan.ts index 4aaf8e86f0..bc798d3a8e 100644 --- a/frontend/src/api/requrls/test-plan/testPlan.ts +++ b/frontend/src/api/requrls/test-plan/testPlan.ts @@ -56,8 +56,6 @@ export const GetFeatureCaseModuleCountUrl = '/test-plan/functional/case/module/c export const GetFeatureCaseModuleUrl = '/test-plan/functional/case/tree'; // 计划详情-功能用例列表-拖拽排序 export const SortFeatureCaseUrl = '/test-plan/functional/case/sort'; -// 计划详情-功能用例列表-编辑执行结果 -export const EditCaseLastExecResultUrl = '/test-plan/functional/case/edit'; // 计划详情-功能用例-取消关联用例 export const DisassociateCaseUrl = '/test-plan/functional/case/disassociate'; // 计划详情-功能用例-批量取消关联用例 diff --git a/frontend/src/components/business/ms-tree/index.vue b/frontend/src/components/business/ms-tree/index.vue index 99baad53cc..fd483085e7 100644 --- a/frontend/src/components/business/ms-tree/index.vue +++ b/frontend/src/components/business/ms-tree/index.vue @@ -238,7 +238,7 @@ if (titleMatches || filteredChildren.length > 0) { result.push({ ...item, - expanded: titleMatches || filteredChildren.length > 0, + expanded: true, [props.fieldNames.children]: filteredChildren, }); } diff --git a/frontend/src/models/testPlan/testPlan.ts b/frontend/src/models/testPlan/testPlan.ts index 75226305a2..74d789273b 100644 --- a/frontend/src/models/testPlan/testPlan.ts +++ b/frontend/src/models/testPlan/testPlan.ts @@ -160,10 +160,6 @@ export interface DisassociateCaseParams { id: string; } -export interface EditLastExecResultParams extends DisassociateCaseParams { - lastExecResult: string; -} - export interface BatchFeatureCaseParams extends BatchActionQueryParams { testPlanId: string; moduleIds?: string[]; diff --git a/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue b/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue index cf68607e71..fa5ab1d136 100644 --- a/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue +++ b/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue @@ -186,9 +186,9 @@ batchExecuteCase, batchUpdateCaseExecutor, disassociateCase, - editLastExecResult, getPlanDetailFeatureCaseList, GetTestPlanUsers, + runFeatureCase, sortFeatureCase, } from '@/api/modules/test-plan/testPlan'; import { defaultExecuteForm } from '@/config/testPlan'; @@ -502,9 +502,11 @@ // 更新执行结果 async function handleEditLastExecResult(record: PlanDetailFeatureCaseItem) { try { - await editLastExecResult({ + await runFeatureCase({ id: record.id, + projectId: appStore.currentProjectId, testPlanId: props.planId, + caseId: record.caseId, lastExecResult: record.lastExecResult, }); Message.success(t('common.updateSuccess'));