mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
✔️ Fix tests after Workflow changes
This commit is contained in:
parent
a56a49574b
commit
284a6099f2
|
@ -579,7 +579,7 @@ describe('WorkflowExecute', () => {
|
|||
for (const testData of tests) {
|
||||
test(testData.description, async () => {
|
||||
|
||||
const workflowInstance = new Workflow('test', testData.input.workflowData.nodes, testData.input.workflowData.connections, false, nodeTypes);
|
||||
const workflowInstance = new Workflow({ id: 'test', nodes: testData.input.workflowData.nodes, connections: testData.input.workflowData.connections, active: false, nodeTypes });
|
||||
|
||||
const waitPromise = await createDeferredPromise<IRun>();
|
||||
const nodeExecutionOrder: string[] = [];
|
||||
|
|
|
@ -138,7 +138,7 @@ describe('Workflow', () => {
|
|||
];
|
||||
|
||||
const nodeTypes = Helpers.NodeTypes();
|
||||
const workflow = new Workflow(undefined, [], {}, false, nodeTypes);
|
||||
const workflow = new Workflow({ nodes: [], connections: {}, active: false, nodeTypes });
|
||||
|
||||
for (const testData of tests) {
|
||||
test(testData.description, () => {
|
||||
|
@ -565,7 +565,7 @@ describe('Workflow', () => {
|
|||
executeNodes.push(createNodeData(node));
|
||||
}
|
||||
|
||||
workflow = new Workflow(undefined, executeNodes, testData.input.connections as IConnections, false, nodeTypes);
|
||||
workflow = new Workflow({ nodes: executeNodes, connections: testData.input.connections as IConnections, active: false, nodeTypes });
|
||||
workflow.renameNode(testData.input.currentName, testData.input.newName);
|
||||
|
||||
resultNodes = {};
|
||||
|
@ -1039,7 +1039,7 @@ describe('Workflow', () => {
|
|||
}
|
||||
};
|
||||
|
||||
const workflow = new Workflow(undefined, nodes, connections, false, nodeTypes);
|
||||
const workflow = new Workflow({ nodes, connections, active: false, nodeTypes });
|
||||
const activeNodeName = testData.input.hasOwnProperty('Node3') ? 'Node3' : 'Node2';
|
||||
|
||||
const runExecutionData: IRunExecutionData = {
|
||||
|
@ -1126,7 +1126,7 @@ describe('Workflow', () => {
|
|||
// };
|
||||
|
||||
// const nodeTypes = Helpers.NodeTypes();
|
||||
// const workflow = new Workflow(nodes, connections, false, nodeTypes);
|
||||
// const workflow = new Workflow({ nodes, connections, active: false, nodeTypes });
|
||||
// const activeNodeName = 'Node2';
|
||||
|
||||
// // @ts-ignore
|
||||
|
@ -1193,7 +1193,7 @@ describe('Workflow', () => {
|
|||
];
|
||||
const connections: IConnections = {};
|
||||
|
||||
const workflow = new Workflow(undefined, nodes, connections, false, nodeTypes);
|
||||
const workflow = new Workflow({ nodes, connections, active: false, nodeTypes });
|
||||
const activeNodeName = 'Node1';
|
||||
|
||||
const runExecutionData: IRunExecutionData = {
|
||||
|
|
Loading…
Reference in a new issue