refactor(接口测试): 场景自定义请求步骤角标计算

This commit is contained in:
fit2-zhao 2024-03-25 15:31:24 +08:00 committed by Craftsman
parent 3d78e72bc5
commit 4b9a8f5a3b
1 changed files with 15 additions and 3 deletions

View File

@ -565,11 +565,23 @@
const restNum = filterKeyValParams(requestVModel.value.rest, defaultRequestParamsItem).validParams.length; const restNum = filterKeyValParams(requestVModel.value.rest, defaultRequestParamsItem).validParams.length;
return `${restNum > 0 ? restNum : ''}`; return `${restNum > 0 ? restNum : ''}`;
case RequestComposition.PRECONDITION: case RequestComposition.PRECONDITION:
return `${requestVModel.value.children[0].preProcessorConfig.processors.length || ''}`; return `${
requestVModel.value.children[0].preProcessorConfig.processors.length > 99
? '99+'
: requestVModel.value.children[0].preProcessorConfig.processors.length || ''
}`;
case RequestComposition.POST_CONDITION: case RequestComposition.POST_CONDITION:
return `${requestVModel.value.children[0].postProcessorConfig.processors.length || ''}`; return `${
requestVModel.value.children[0].postProcessorConfig.processors.length > 99
? '99+'
: requestVModel.value.children[0].postProcessorConfig.processors.length || ''
}`;
case RequestComposition.ASSERTION: case RequestComposition.ASSERTION:
return `${requestVModel.value.children[0].assertionConfig.assertions.length || ''}`; return `${
requestVModel.value.children[0].assertionConfig.assertions.length > 99
? '99+'
: requestVModel.value.children[0].assertionConfig.assertions.length || ''
}`;
case RequestComposition.AUTH: case RequestComposition.AUTH:
return requestVModel.value.authConfig.authType !== RequestAuthType.NONE ? '1' : ''; return requestVModel.value.authConfig.authType !== RequestAuthType.NONE ? '1' : '';
default: default: