mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(core): Fix populating of node custom api call options (#5347)
* feat(core): Fix populating of node custom api call options * lint fixes * Adress PR comments * Add e2e test and only inject custom API options for latest version * Make sure to injectCustomApiCallOption for the latest version of node * feat(cli): Move apiCallOption injection to LoadNodesAndCredentials and add e2e tests to check for custom nodes credentials * Load nodes and credentials fixtures from a single place * Console warning if credential is invalid during customApiOptions injection
This commit is contained in:
@@ -14,3 +14,30 @@
|
||||
// ***********************************************************
|
||||
|
||||
import './commands';
|
||||
import CustomNodeFixture from '../fixtures/Custom_node.json';
|
||||
import CustomNodeWithN8nCredentialFixture from '../fixtures/Custom_node_n8n_credential.json';
|
||||
import CustomNodeWithCustomCredentialFixture from '../fixtures/Custom_node_custom_credential.json';
|
||||
import CustomCredential from '../fixtures/Custom_credential.json';
|
||||
|
||||
// Load custom nodes and credentials fixtures
|
||||
beforeEach(() => {
|
||||
cy.intercept('GET', '/types/nodes.json', (req) => {
|
||||
req.continue((res) => {
|
||||
const nodes = res.body;
|
||||
|
||||
res.headers['cache-control'] = 'no-cache, no-store';
|
||||
nodes.push(CustomNodeFixture, CustomNodeWithN8nCredentialFixture, CustomNodeWithCustomCredentialFixture);
|
||||
res.send(nodes);
|
||||
});
|
||||
}).as('nodesIntercept');
|
||||
|
||||
cy.intercept('GET', '/types/credentials.json', (req) => {
|
||||
req.continue((res) => {
|
||||
const credentials = res.body;
|
||||
|
||||
res.headers['cache-control'] = 'no-cache, no-store';
|
||||
credentials.push(CustomCredential);
|
||||
res.send(credentials);
|
||||
});
|
||||
}).as('credentialsIntercept');
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user