From 284a6099f25e3e301cc733041b5eb57f8d52b586 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Sun, 16 Feb 2020 19:06:51 -0800 Subject: [PATCH] :heavy_check_mark: Fix tests after Workflow changes --- packages/core/test/WorkflowExecute.test.ts | 2 +- packages/workflow/test/Workflow.test.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/core/test/WorkflowExecute.test.ts b/packages/core/test/WorkflowExecute.test.ts index 9083252c6c..811b90ceff 100644 --- a/packages/core/test/WorkflowExecute.test.ts +++ b/packages/core/test/WorkflowExecute.test.ts @@ -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(); const nodeExecutionOrder: string[] = []; diff --git a/packages/workflow/test/Workflow.test.ts b/packages/workflow/test/Workflow.test.ts index ad9280f47d..09cc1b871a 100644 --- a/packages/workflow/test/Workflow.test.ts +++ b/packages/workflow/test/Workflow.test.ts @@ -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 = {