mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix: Load remote resources even if expressions in non requried parameters resolve (#6987)
Github issue / Community forum post (link here to close automatically):
This commit is contained in:
64
packages/nodes-base/nodes/E2eTest/mock.ts
Normal file
64
packages/nodes-base/nodes/E2eTest/mock.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
import { array, name, uuid } from 'minifaker';
|
||||
import 'minifaker/locales/en';
|
||||
import type {
|
||||
INodeExecutionData,
|
||||
INodeListSearchResult,
|
||||
INodePropertyOptions,
|
||||
ResourceMapperFields,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export const returnData: INodeExecutionData[] = [
|
||||
{
|
||||
json: {
|
||||
id: '23423532',
|
||||
name: 'Hello World',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export const remoteOptions: INodePropertyOptions[] = [
|
||||
{
|
||||
name: 'Resource 1',
|
||||
value: 'resource1',
|
||||
},
|
||||
{
|
||||
name: 'Resource 2',
|
||||
value: 'resource2',
|
||||
},
|
||||
{
|
||||
name: 'Resource 3',
|
||||
value: 'resource3',
|
||||
},
|
||||
];
|
||||
|
||||
export const resourceMapperFields: ResourceMapperFields = {
|
||||
fields: [
|
||||
{
|
||||
id: 'id',
|
||||
displayName: 'ID',
|
||||
defaultMatch: true,
|
||||
canBeUsedToMatch: true,
|
||||
required: true,
|
||||
display: true,
|
||||
type: 'string',
|
||||
},
|
||||
{
|
||||
id: 'name',
|
||||
displayName: 'Name',
|
||||
defaultMatch: false,
|
||||
canBeUsedToMatch: false,
|
||||
required: false,
|
||||
display: true,
|
||||
type: 'string',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export const searchOptions: INodeListSearchResult['results'] = array(100, () => {
|
||||
const value = uuid.v4();
|
||||
return {
|
||||
name: name(),
|
||||
value,
|
||||
url: 'https://example.com/user/' + value,
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user