mirror of
https://github.com/metersphere/metersphere.git
synced 2025-01-31 01:47:48 +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 {
|
import {
|
||||||
defaultBodyParams,
|
defaultBodyParams,
|
||||||
defaultBodyParamsItem,
|
defaultBodyParamsItem,
|
||||||
|
defaultExtractParamItem,
|
||||||
defaultHeaderParamsItem,
|
defaultHeaderParamsItem,
|
||||||
defaultKeyValueParamItem,
|
defaultKeyValueParamItem,
|
||||||
defaultRequestParamsItem,
|
defaultRequestParamsItem,
|
||||||
|
@ -251,10 +252,16 @@ export function filterConditionsSqlValidParams(condition: ExecuteConditionConfig
|
||||||
if (processor.processorType === RequestConditionProcessor.SQL) {
|
if (processor.processorType === RequestConditionProcessor.SQL) {
|
||||||
processor.extractParams = filterKeyValParams(processor.extractParams || [], defaultKeyValueParamItem).validParams;
|
processor.extractParams = filterKeyValParams(processor.extractParams || [], defaultKeyValueParamItem).validParams;
|
||||||
} else if (processor.processorType === RequestConditionProcessor.EXTRACT && processor.extractors) {
|
} else if (processor.processorType === RequestConditionProcessor.EXTRACT && processor.extractors) {
|
||||||
processor.extractors = filterKeyValParams(
|
const defaultExtractorItem = cloneDeep(
|
||||||
processor.extractors,
|
processor.extractors.length
|
||||||
processor.extractors[processor.extractors.length - 1]
|
? {
|
||||||
).validParams;
|
...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;
|
return processor;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue