mirror of
https://github.com/metersphere/metersphere.git
synced 2025-01-29 08:57:51 +08:00
fix(接口测试): 参数提取表格过滤条件修复
This commit is contained in:
parent
ddf18efe14
commit
91cd58c649
1 changed files with 11 additions and 4 deletions
|
@ -12,6 +12,7 @@ import { RequestBodyFormat, RequestConditionProcessor, RequestParamsType } from
|
|||
import {
|
||||
defaultBodyParams,
|
||||
defaultBodyParamsItem,
|
||||
defaultExtractParamItem,
|
||||
defaultHeaderParamsItem,
|
||||
defaultKeyValueParamItem,
|
||||
defaultRequestParamsItem,
|
||||
|
@ -251,10 +252,16 @@ export function filterConditionsSqlValidParams(condition: ExecuteConditionConfig
|
|||
if (processor.processorType === RequestConditionProcessor.SQL) {
|
||||
processor.extractParams = filterKeyValParams(processor.extractParams || [], defaultKeyValueParamItem).validParams;
|
||||
} else if (processor.processorType === RequestConditionProcessor.EXTRACT && processor.extractors) {
|
||||
processor.extractors = filterKeyValParams(
|
||||
processor.extractors,
|
||||
processor.extractors[processor.extractors.length - 1]
|
||||
).validParams;
|
||||
const defaultExtractorItem = cloneDeep(
|
||||
processor.extractors.length
|
||||
? {
|
||||
...defaultExtractParamItem,
|
||||
variableType: processor.extractors[processor.extractors.length - 1].variableType,
|
||||
extractType: processor.extractors[processor.extractors.length - 1].extractType,
|
||||
}
|
||||
: defaultExtractParamItem
|
||||
);
|
||||
processor.extractors = filterKeyValParams(processor.extractors, defaultExtractorItem).validParams;
|
||||
}
|
||||
return processor;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue