fix(接口测试): 修复场景批量操作完成后没有提示出失败数据统计的问题
--bug=1038854 --user=宋天阳 【接口测试】场景列表-批量移动场景到目标模块下已存在-提示成功-实际失败 https://www.tapd.cn/55049933/s/1491870
This commit is contained in:
parent
3b4a12a362
commit
f18e51a4e3
|
@ -46,6 +46,7 @@ import { ExecuteConditionProcessor } from '@/models/apiTest/common';
|
||||||
import {
|
import {
|
||||||
ApiScenarioBatchDeleteParams,
|
ApiScenarioBatchDeleteParams,
|
||||||
ApiScenarioBatchEditParams,
|
ApiScenarioBatchEditParams,
|
||||||
|
ApiScenarioBatchOptionResult,
|
||||||
ApiScenarioBatchRunParams,
|
ApiScenarioBatchRunParams,
|
||||||
ApiScenarioDebugRequest,
|
ApiScenarioDebugRequest,
|
||||||
ApiScenarioGetModuleParams,
|
ApiScenarioGetModuleParams,
|
||||||
|
@ -147,10 +148,10 @@ export function batchOptionScenario(
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
if (optionType === 'batchMove') {
|
if (optionType === 'batchMove') {
|
||||||
return MSR.post({ url: BatchMoveScenarioUrl, data });
|
return MSR.post<ApiScenarioBatchOptionResult>({ url: BatchMoveScenarioUrl, data });
|
||||||
}
|
}
|
||||||
if (optionType === 'batchCopy') {
|
if (optionType === 'batchCopy') {
|
||||||
return MSR.post({ url: BatchCopyScenarioUrl, data });
|
return MSR.post<ApiScenarioBatchOptionResult>({ url: BatchCopyScenarioUrl, data });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -472,3 +472,9 @@ export interface GetSystemRequestParams {
|
||||||
scenarioRequest?: GetSystemRequestTypeParams;
|
scenarioRequest?: GetSystemRequestTypeParams;
|
||||||
refType: ScenarioStepRefType.COPY | ScenarioStepRefType.REF;
|
refType: ScenarioStepRefType.COPY | ScenarioStepRefType.REF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 场景批量操作结果
|
||||||
|
export interface ApiScenarioBatchOptionResult {
|
||||||
|
success: number;
|
||||||
|
error: number;
|
||||||
|
}
|
||||||
|
|
|
@ -790,6 +790,7 @@
|
||||||
dataIndex: 'environmentName',
|
dataIndex: 'environmentName',
|
||||||
showDrag: true,
|
showDrag: true,
|
||||||
width: 159,
|
width: 159,
|
||||||
|
showTooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'apiScenario.table.columns.steps',
|
title: 'apiScenario.table.columns.steps',
|
||||||
|
@ -1361,7 +1362,7 @@
|
||||||
} else if (isBatchCopy.value) {
|
} else if (isBatchCopy.value) {
|
||||||
optionType = 'batchCopy';
|
optionType = 'batchCopy';
|
||||||
}
|
}
|
||||||
await batchOptionScenario(optionType, {
|
const res = await batchOptionScenario(optionType, {
|
||||||
selectIds: batchParams.value?.selectedIds || [],
|
selectIds: batchParams.value?.selectedIds || [],
|
||||||
selectAll: !!batchParams.value?.selectAll,
|
selectAll: !!batchParams.value?.selectAll,
|
||||||
excludeIds: batchParams.value?.excludeIds || [],
|
excludeIds: batchParams.value?.excludeIds || [],
|
||||||
|
@ -1374,7 +1375,8 @@
|
||||||
Message.success(
|
Message.success(
|
||||||
t('api_scenario.batch_operation.success', {
|
t('api_scenario.batch_operation.success', {
|
||||||
opt: batchOptionType.value,
|
opt: batchOptionType.value,
|
||||||
name: selectedBatchOptModuleName?.value,
|
success: res?.success,
|
||||||
|
error: res?.error,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
tableSelected.value = [];
|
tableSelected.value = [];
|
||||||
|
|
|
@ -57,7 +57,7 @@ export default {
|
||||||
'apiScenario.times': 'bout',
|
'apiScenario.times': 'bout',
|
||||||
'apiScenario.executionResult': 'Execution result',
|
'apiScenario.executionResult': 'Execution result',
|
||||||
// 批量操作文案
|
// 批量操作文案
|
||||||
'api_scenario.batch_operation.success': 'Success {opt} to {name}',
|
'api_scenario.batch_operation.success': 'Success {success} ,error {error} ',
|
||||||
'api_scenario.table.batchMoveConfirm': 'Ready to {opt} {count} scenarios',
|
'api_scenario.table.batchMoveConfirm': 'Ready to {opt} {count} scenarios',
|
||||||
'apiScenario.name': 'Scene name',
|
'apiScenario.name': 'Scene name',
|
||||||
'apiScenario.nameRequired': 'Scene name cannot be empty',
|
'apiScenario.nameRequired': 'Scene name cannot be empty',
|
||||||
|
|
|
@ -72,7 +72,7 @@ export default {
|
||||||
'apiScenario.updateRefScenarioSuccess': '引用场景数据已更新',
|
'apiScenario.updateRefScenarioSuccess': '引用场景数据已更新',
|
||||||
'apiScenario.replaceSuccess': '步骤替换成功',
|
'apiScenario.replaceSuccess': '步骤替换成功',
|
||||||
// 批量操作文案
|
// 批量操作文案
|
||||||
'api_scenario.batch_operation.success': '成功{opt}至 {name}',
|
'api_scenario.batch_operation.success': '成功{opt} {success} 条,失败 {error} 条',
|
||||||
'api_scenario.table.batchMoveConfirm': '{opt}{count}个场景至已选模块',
|
'api_scenario.table.batchMoveConfirm': '{opt}{count}个场景至已选模块',
|
||||||
'apiScenario.name': '场景名称',
|
'apiScenario.name': '场景名称',
|
||||||
'apiScenario.nameRequired': '场景名称不能为空',
|
'apiScenario.nameRequired': '场景名称不能为空',
|
||||||
|
|
Loading…
Reference in New Issue