fix(测试计划): 功能用例列表-修改执行结果调用接口

This commit is contained in:
teukkk 2024-05-27 19:13:15 +08:00 committed by Craftsman
parent 5f4cbe3b36
commit 01aa4fe633
5 changed files with 5 additions and 15 deletions

View File

@ -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 });

View File

@ -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';
// 计划详情-功能用例-批量取消关联用例

View File

@ -238,7 +238,7 @@
if (titleMatches || filteredChildren.length > 0) {
result.push({
...item,
expanded: titleMatches || filteredChildren.length > 0,
expanded: true,
[props.fieldNames.children]: filteredChildren,
});
}

View File

@ -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[];

View File

@ -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'));