mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
test(editor): Add tests for node settings parameters composable (no-changelog) (#17232)
This commit is contained in:
@@ -19,7 +19,7 @@ import {
|
||||
isResourceLocatorValue,
|
||||
} from 'n8n-workflow';
|
||||
import type { INodeUi, IUpdateInformation } from '@/Interface';
|
||||
import { SWITCH_NODE_TYPE } from '@/constants';
|
||||
import { CUSTOM_API_CALL_KEY, SWITCH_NODE_TYPE } from '@/constants';
|
||||
import isEqual from 'lodash/isEqual';
|
||||
import get from 'lodash/get';
|
||||
import set from 'lodash/set';
|
||||
@@ -166,7 +166,12 @@ export function removeMismatchedOptionValues(
|
||||
nodeType.properties.forEach((prop) => {
|
||||
const displayOptions = prop.displayOptions;
|
||||
// Not processing parameters that are not set or don't have options
|
||||
if (!nodeParameterValues?.hasOwnProperty(prop.name) || !displayOptions || !prop.options) {
|
||||
if (
|
||||
!nodeParameterValues ||
|
||||
!Object.prototype.hasOwnProperty.call(nodeParameterValues, prop.name) ||
|
||||
!displayOptions ||
|
||||
!prop.options
|
||||
) {
|
||||
return;
|
||||
}
|
||||
// Only process the parameters that depend on the updated parameter
|
||||
@@ -353,3 +358,7 @@ export function parseFromExpression(
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
export function shouldSkipParamValidation(value: string | number | boolean | null) {
|
||||
return typeof value === 'string' && value.includes(CUSTOM_API_CALL_KEY);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user