diff --git a/front-end/__tests__/components/API.test.js b/front-end/__tests__/components/API.test.js
new file mode 100644
index 0000000..fb3d7cb
--- /dev/null
+++ b/front-end/__tests__/components/API.test.js
@@ -0,0 +1,180 @@
+import React from 'react'
+import { render } from '@testing-library/react'
+import * as API from '../../src/API';
+import VPLinkModel from '../../src/components/VPLink/VPLinkModel';
+import CustomNodeModel from '../../src/components/CustomNode/CustomNodeModel';
+import VPPortModel from '../../src/components/VPPort/VPPortModel'
+
+global.console = {log: jest.fn()}
+global.URL.createObjectURL = jest.fn(() => 'http://localhost:8080/');
+global.URL.revokeObjectURL = jest.fn();
+
+describe('Validates API calls', () => {
+
+ beforeEach(() => {
+ global.fetch = jest.fn(() => Promise.resolve({
+ ok: true,
+ data: [],
+ json: jest.fn(() => []),
+ text: jest.fn(() => Promise.resolve({})),
+ headers:{
+ get: (s)=>{
+ if (s === "content-type") {
+ return "text";
+ }
+
+ if (s === "Content-Disposition") {
+ return "filenameToDownload";
+ }
+ }
+ }
+ }));
+ });
+
+ it('Validates executionOrder', () => {
+ API.executionOrder();
+ expect(global.fetch.mock.calls.length).toBe(1);
+ expect(global.fetch.mock.calls[0][1]).toStrictEqual({});
+ expect(global.fetch.mock.calls[0][0]).toBe("/workflow/execute");
+ });
+
+ it('Validates execute', () => {
+ const node = {
+ options: {
+ id: 'nodeId'
+ }
+ };
+
+ API.execute(node);
+ expect(global.fetch.mock.calls.length).toBe(1);
+ expect(global.fetch.mock.calls[0][1]).toStrictEqual({});
+ expect(global.fetch.mock.calls[0][0]).toBe("/node/nodeId/execute");
+ });
+
+ it('Validates retrieveData', () => {
+ API.retrieveData("nodeId");
+ expect(global.fetch.mock.calls.length).toBe(1);
+ expect(global.fetch.mock.calls[0][1]).toStrictEqual({});
+ expect(global.fetch.mock.calls[0][0]).toBe("/node/nodeId/retrieve_data");
+ });
+
+ it('Validates downloadDataFile', () => {
+ const node = {
+ options: {
+ id: 'nodeId'
+ },
+ config: {}
+ };
+
+ API.downloadDataFile(node);
+ expect(global.fetch.mock.calls.length).toBe(1);
+ expect(global.fetch.mock.calls[0][0]).toBe("/workflow/download");
+ });
+
+ it('Validates uploadDataFile', () => {
+ const formData = { data: {}};
+ const options = {method: "POST", body: formData};
+ API.uploadDataFile(formData);
+ expect(global.fetch.mock.calls.length).toBe(1);
+ expect(global.fetch.mock.calls[0][1]).toStrictEqual(options);
+ expect(global.fetch.mock.calls[0][0]).toBe("/workflow/upload");
+ });
+
+ it('Validates deleteEdge', () => {
+ const sourceModel = new CustomNodeModel({id: "myId1", num_in: 2, num_out: 1});
+ const targetModel = new CustomNodeModel({id: "myId2", num_in: 2, num_out: 1});
+
+ const sourcePort = new VPPortModel({name: 'source-port-name'});
+ sourcePort.setParent(sourceModel);
+ const targetPort = new VPPortModel({name: 'target-port-name'});
+ targetPort.setParent(targetModel);
+ const linkModel = new VPLinkModel();
+ linkModel.setSourcePort(sourcePort);
+ linkModel.setTargetPort(targetPort);
+
+ const options = {method: "POST"};
+ API.deleteEdge(linkModel);
+
+ expect(global.fetch.mock.calls.length).toBe(2);
+ expect(global.fetch.mock.calls[0][1]).toStrictEqual(options);
+ expect(global.fetch.mock.calls[0][0]).toBe("/node/edge/myId1/myId2");
+
+ });
+
+ it('Validates addEdge', () => {
+ const sourceModel = new CustomNodeModel({id: "myId1", num_in: 2, num_out: 1});
+ const targetModel = new CustomNodeModel({id: "myId2", num_in: 2, num_out: 1});
+
+ const sourcePort = new VPPortModel({name: 'source-port-name', in: true});
+ sourcePort.setParent(sourceModel);
+ const targetPort = new VPPortModel({name: 'target-port-name'});
+ targetPort.setParent(targetModel);
+ const linkModel = new VPLinkModel();
+ linkModel.setSourcePort(sourcePort);
+ linkModel.setTargetPort(targetPort);
+
+ const options = {method: "POST"};
+ API.addEdge(linkModel);
+
+ expect(global.fetch.mock.calls.length).toBe(2);
+ expect(global.fetch.mock.calls[0][1]).toStrictEqual(options);
+ expect(global.fetch.mock.calls[0][0]).toBe("/node/edge/myId2/myId1");
+
+ });
+
+ it('Validates uploadWorkflow', () => {
+ const formData = { data: {}};
+ const options = {method: "POST", body: formData};
+ API.uploadWorkflow(formData);
+ expect(global.fetch.mock.calls.length).toBe(1);
+ expect(global.fetch.mock.calls[0][1]).toStrictEqual(options);
+ expect(global.fetch.mock.calls[0][0]).toBe("/workflow/open");
+ });
+
+ it('Validates initWorkflow', () => {
+ const sourceModel = new CustomNodeModel({id: "myId1", num_in: 2, num_out: 1});
+ API.initWorkflow(sourceModel);
+ expect(global.fetch.mock.calls.length).toBe(1);
+ expect(global.fetch.mock.calls[0][0]).toBe("/workflow/new");
+ });
+
+ it('Validates getGlobalVars', () => {
+ API.getGlobalVars();
+ expect(global.fetch.mock.calls.length).toBe(1);
+ expect(global.fetch.mock.calls[0][0]).toBe("/workflow/globals");
+ });
+
+ it('Validates getNodes', () => {
+ API.getNodes();
+ expect(global.fetch.mock.calls.length).toBe(1);
+ expect(global.fetch.mock.calls[0][0]).toBe("/workflow/nodes");
+ });
+
+ it('Validates updateNode', () => {
+ const sourceModel = new CustomNodeModel({id: "myId1", num_in: 2, num_out: 1});
+ API.updateNode(sourceModel);
+ expect(global.fetch.mock.calls.length).toBe(1);
+ expect(global.fetch.mock.calls[0][0]).toBe("/node/myId1");
+ });
+
+ it('Validates deleteNode', () => {
+ const sourceModel = new CustomNodeModel({id: "myId1", num_in: 2, num_out: 1});
+ API.deleteNode(sourceModel);
+ expect(global.fetch.mock.calls.length).toBe(1);
+ expect(global.fetch.mock.calls[0][0]).toBe("/node/myId1");
+ });
+
+ it('Validates addNode', () => {
+ const sourceModel = new CustomNodeModel({id: "myId1", num_in: 2, num_out: 1});
+ API.addNode(sourceModel);
+ expect(global.fetch.mock.calls.length).toBe(1);
+ expect(global.fetch.mock.calls[0][0]).toBe("/node/");
+ });
+
+ it('Validates getNode', () => {
+ API.getNode("myId1");
+ expect(global.fetch.mock.calls.length).toBe(1);
+ expect(global.fetch.mock.calls[0][0]).toBe("/node/myId1");
+ });
+
+});
diff --git a/front-end/__tests__/components/About.test.js b/front-end/__tests__/components/About.test.js
new file mode 100644
index 0000000..1e025c7
--- /dev/null
+++ b/front-end/__tests__/components/About.test.js
@@ -0,0 +1,42 @@
+import React from 'react'
+import { render } from '@testing-library/react'
+import ReactDOM from 'react-dom';
+import About from '../../src/components/About';
+
+global.console = {error: jest.fn()}
+
+global.fetch = jest.fn(() => Promise.resolve({
+ data: [],
+ json: jest.fn(() => [])
+}));
+
+describe('Validates About', () => {
+ it('Does not display About info', () => {
+ const div = React.createElement('div');
+ const app = render(, div);
+ expect(app).toMatchSnapshot();
+ });
+
+ it('Displays About info', () => {
+ const div = React.createElement('div');
+ const app = render(, div);
+ expect(app).toMatchSnapshot();
+ });
+
+ it('Validates closing', () => {
+ const props = {
+ show: true
+ };
+
+ const event = {
+ preventDefault: jest.fn(() => [])
+ };
+
+ const about = new About(props);
+ about.componentDidMount();
+ about.handleShow(event);
+ about.handleClose();
+
+ expect(event.preventDefault.mock.calls.length).toBe(1);
+ });
+});
diff --git a/front-end/__tests__/components/App.test.js b/front-end/__tests__/components/App.test.js
new file mode 100644
index 0000000..56d1cba
--- /dev/null
+++ b/front-end/__tests__/components/App.test.js
@@ -0,0 +1,17 @@
+import React from 'react'
+import { render } from '@testing-library/react'
+import App from '../../src/components/App';
+
+global.console = {log: jest.fn()}
+
+global.fetch = jest.fn(() => Promise.resolve({
+ data: [],
+ json: jest.fn(() => [])
+}));
+
+describe('Validates App initialization', () => {
+ it('Creates App', () => {
+ const app = render();
+ expect(app).toMatchSnapshot();
+ });
+});
diff --git a/front-end/__tests__/components/CustomNode/CustomNodeFactory.test.js b/front-end/__tests__/components/CustomNode/CustomNodeFactory.test.js
new file mode 100644
index 0000000..4fd3dc9
--- /dev/null
+++ b/front-end/__tests__/components/CustomNode/CustomNodeFactory.test.js
@@ -0,0 +1,28 @@
+import React from 'react'
+import { render } from '@testing-library/react'
+import CustomNodeFactory from '../../../src/components/CustomNode/CustomNodeFactory';
+import CustomNodeModel from '../../../src/components/CustomNode/CustomNodeModel';
+import CustomNodeWidget from '../../../src/components/CustomNode/CustomNodeWidget';
+
+describe('Validate CustomNodeFactory', () => {
+ it('CustomNodeFactory generates CustomNodeWidget', () => {
+ const customNodeFactory = new CustomNodeFactory();
+ const node = new CustomNodeModel({id: "myId"});
+ const model = {
+ node: node,
+ };
+ const event = {
+ model: model,
+ initialConfig: {
+ options: { id: "modelId"},
+ config: {}
+ }
+ };
+ const widget = customNodeFactory.generateReactWidget(event);
+ expect(React.isValidElement(widget)).toBe(true);
+
+ const nodeModel = customNodeFactory.generateModel(event);
+ expect(nodeModel instanceof CustomNodeModel).toBe(true);
+ expect(nodeModel.getNodeId()).toBe("modelId");
+ });
+})
diff --git a/front-end/__tests__/components/CustomNode/CustomNodeModel.test.js b/front-end/__tests__/components/CustomNode/CustomNodeModel.test.js
new file mode 100644
index 0000000..7935cdd
--- /dev/null
+++ b/front-end/__tests__/components/CustomNode/CustomNodeModel.test.js
@@ -0,0 +1,27 @@
+import React from 'react'
+import CustomNodeModel from '../../../src/components/CustomNode/CustomNodeModel';
+import CustomNodeFactory from '../../../src/components/CustomNode/CustomNodeFactory';
+import VPPortFactory from '../../../src/components/VPPort/VPPortFactory';
+import createEngine from '@projectstorm/react-diagrams';
+
+
+describe('Validates CustomNodeModel', () => {
+ it('Validates serialization/deserialization', () => {
+ const node = new CustomNodeModel({id: "myId", num_in: 2, num_out: 1});
+ node.setStatus("Complete");
+ const engine = createEngine();
+ engine.getNodeFactories().registerFactory(new CustomNodeFactory());
+ engine.getPortFactories().registerFactory(new VPPortFactory());
+
+ const serializedModel = node.serialize();
+ const event = {
+ data: serializedModel,
+ engine: engine,
+ registerModel: jest.fn(() => [])
+ };
+ const otherNode = new CustomNodeModel();
+ otherNode.deserialize(event, engine);
+
+ expect(event.registerModel.mock.calls.length).toBe(4);
+ });
+});
diff --git a/front-end/__tests__/components/CustomNode/CustomNodeWidget.test.js b/front-end/__tests__/components/CustomNode/CustomNodeWidget.test.js
new file mode 100644
index 0000000..6345c17
--- /dev/null
+++ b/front-end/__tests__/components/CustomNode/CustomNodeWidget.test.js
@@ -0,0 +1,106 @@
+import React from 'react'
+import createEngine from '@projectstorm/react-diagrams';
+import { render } from '@testing-library/react'
+import { shallow, mount } from 'enzyme';
+import CustomNodeWidget from '../../../src/components/CustomNode/CustomNodeWidget';
+import CustomNodeModel from '../../../src/components/CustomNode/CustomNodeModel';
+
+global.console = {log: jest.fn(), error: jest.fn()}
+
+
+describe('Validate CustomNodeWidget', () => {
+
+ beforeEach(() => {
+ global.fetch = jest.fn(() => Promise.resolve({
+ ok: true,
+ data: [],
+ json: jest.fn(() => []),
+ text: jest.fn(() => Promise.resolve({})),
+ headers:{
+ get: (s)=>{
+ if (s === "content-type") {
+ return "text";
+ }
+
+ if (s === "Content-Disposition") {
+ return "filenameToDownload";
+ }
+ }
+ }
+ }));
+
+ const createElement = document.createElement.bind(document);
+document.createElement = (tagName) => {
+ if (tagName === 'canvas') {
+ return {
+ getContext: () => ({}),
+ measureText: () => ({})
+ };
+ }
+ return createElement(tagName);
+};
+
+ });
+
+ it('Display CustomNodeWidget', () => {
+ const node = new CustomNodeModel({id: "myId"});
+ const model = {
+ node: node,
+ globals: {}
+ };
+ const engine = createEngine();
+ engine.setModel(model);
+
+ const customNodeWidget = render(
+
+ );
+ expect(customNodeWidget).toMatchSnapshot();
+ });
+
+ it('Validates CustomNodeWidget', () => {
+ const node = new CustomNodeModel({id: "myId"});
+ const model = {
+ node: node,
+ globals: {}
+ };
+ const engine = createEngine();
+ engine.setModel(model);
+
+ const nodeWidget = shallow();
+
+ expect(nodeWidget.state('showConfig')).toBe(false);
+ nodeWidget.find({ className: 'custom-node-configure' }).simulate('click');
+
+ expect(nodeWidget.state('showConfig')).toBe(true);
+ });
+
+ it('Mounts CustomNodeWidget', () => {
+ const node = new CustomNodeModel({id: "myId"});
+ const model = {
+ node: node,
+ globals: {}
+ };
+ const engine = createEngine();
+ engine.setModel(model);
+
+ const nodeWidget = mount();
+
+ expect(nodeWidget.state('showConfig')).toBe(false);
+ expect(nodeWidget.state('showGraph')).toBe(false);
+ });
+
+ it('Accepts configuration', () => {
+ const node = new CustomNodeModel({id: "myId"});
+ const repaintCanvas = jest.fn(() => [])
+ const engine = {
+ repaintCanvas: repaintCanvas
+ }
+ const props = { node: node, engine: engine};
+ const nodeWidget = new CustomNodeWidget(props);
+ nodeWidget.acceptConfiguration({}, {});
+ });
+})
diff --git a/front-end/__tests__/components/CustomNode/GraphView.test.js b/front-end/__tests__/components/CustomNode/GraphView.test.js
index 228ba46..88f19db 100644
--- a/front-end/__tests__/components/CustomNode/GraphView.test.js
+++ b/front-end/__tests__/components/CustomNode/GraphView.test.js
@@ -1,8 +1,23 @@
import React from 'react'
import { render } from '@testing-library/react'
+import { shallow, mount } from 'enzyme';
+import { VariableSizeGrid as Grid } from 'react-window';
import CustomNodeModel from '../../../src/components/CustomNode/CustomNodeModel';
import GraphView from '../../../src/components/CustomNode/GraphView';
+global.console = {log: jest.fn()}
+
+const data = {"AAPL_x": {"0": "2014-01-02", "1": "2014-01-03", "2": "2014-01-06", "3": "2014-01-07", "4": "2014-01-08", "5": "2014-01-09", "6": "2014-01-10", "7": "2014-01-13", "8": "2014-01-14", "9": "2014-01-15", "10": "2014-01-16", "11": "2014-01-17", "12": "2014-01-21", "13": "2014-01-22", "14": "2014-01-23"}, "AAPL_y": {"0": 77.44539475, "1": 77.04557544, "2": 74.89697204, "3": 75.856461, "4": 75.09194679, "5": 76.20263178, "6": 75.2301837, "7": 73.84891755, "8": 75.0113527, "9": 77.14481412, "10": 77.33058367, "11": 76.85652616, "12": 75.39394758, "13": 76.7763823, "14": 76.64038513}};
+
+const response = {
+ json: jest.fn(() => {
+ return data;
+ }),
+ ok: true
+};
+
+global.fetch = jest.fn(() => Promise.resolve(response));
+
describe('Validate Graph Modal', () => {
it('Display warning message', () => {
const node = new CustomNodeModel({id: "myId"});
@@ -15,4 +30,25 @@ describe('Validate Graph Modal', () => {
);
expect(graphView).toMatchSnapshot();
});
+
+ it('Display data', (done) => {
+ const node = new CustomNodeModel({id: "myId", options:
+ { node_type: "Read CSV",
+ status: "complete"}});
+ const graphView = shallow( {}}
+ onDelete={() => {}}
+ onSubmit={() => {}} />);
+
+ expect(graphView.state('loading')).toBe(false);
+ graphView.find('Button').at(1).simulate('click');
+ expect(graphView.state('loading')).toBe(true);
+ setTimeout(()=>{
+ graphView.update();
+ expect(graphView.state('loading')).toBe(false);
+ done();
+ }, 1000);
+ });
});
diff --git a/front-end/__tests__/components/CustomNode/Input/BooleanInput.test.js b/front-end/__tests__/components/CustomNode/Input/BooleanInput.test.js
new file mode 100644
index 0000000..07a4cba
--- /dev/null
+++ b/front-end/__tests__/components/CustomNode/Input/BooleanInput.test.js
@@ -0,0 +1,39 @@
+import React from 'react'
+import { shallow, mount } from 'enzyme';
+import BooleanInput from '../../../../src/components/CustomNode/Input/BooleanInput';
+
+describe('Validates BooleanInpupt', () => {
+ it('Display BooleanInput', () => {
+ const booleanInput = shallow();
+ expect(booleanInput).toMatchSnapshot();
+ });
+
+ it('Checked BooleanInput', () => {
+
+ const onChange = jest.fn(() => []);
+ const booleanInput = shallow();
+
+ expect(booleanInput.find({name: "booleanSelector"}).prop('checked')).toBe(false);
+
+ booleanInput.find({name: "booleanSelector"}).simulate('change', {target: {checked: true}})
+
+ booleanInput.update();
+ expect(booleanInput.find({name: "booleanSelector"}).prop('checked')).toBe(true);
+ });
+
+ it('Checked BooleanInput onChange', () => {
+
+ const onChange = jest.fn(() => []);
+ const booleanInput = mount();
+
+ booleanInput.find({keyName: "booleanSelector"}).simulate('change', {target: {checked: true}})
+
+ expect(onChange.mock.calls.length).toBe(1);
+ });
+});
diff --git a/front-end/__tests__/components/CustomNode/Input/FileUploadInput.test.js b/front-end/__tests__/components/CustomNode/Input/FileUploadInput.test.js
new file mode 100644
index 0000000..e790e37
--- /dev/null
+++ b/front-end/__tests__/components/CustomNode/Input/FileUploadInput.test.js
@@ -0,0 +1,61 @@
+import React from 'react'
+import { shallow, mount } from 'enzyme';
+import FileUploadInput from '../../../../src/components/CustomNode/Input/FileUploadInput';
+import CustomNodeModel from '../../../../src/components/CustomNode/CustomNodeModel';
+
+describe('Validates FileUploadInput', () => {
+
+ beforeEach(() => {
+ global.console = {log: jest.fn(() => []), error: jest.fn(() => [])};
+
+ global.fetch = jest.fn(() => Promise.resolve({
+ ok: true,
+ data: [],
+ json: jest.fn(() => []),
+ text: jest.fn(() => Promise.resolve({})),
+ headers:{
+ get: (s)=>{
+ if (s === "content-type") {
+ return "text";
+ }
+
+ if (s === "Content-Disposition") {
+ return "filenameToDownload";
+ }
+ }
+ }
+ }));
+ });
+
+
+ it('Display FileUploadInput', () => {
+ const node = new CustomNodeModel({id: "myId", num_in: 2, num_out: 1, is_global: false});
+ const onChange = jest.fn(() => []);
+ const disableFunc = jest.fn(() => []);
+ const input = mount();
+ expect(input).toMatchSnapshot();
+ });
+
+ it('FileUploadInput selects a file', () => {
+ const node = new CustomNodeModel({id: "myId", num_in: 2, num_out: 1, is_global: false});
+ const onChange = jest.fn(() => []);
+ const disableFunc = jest.fn(() => []);
+ const input = mount();
+
+ const event = { preventDefault: jest.fn(() => [])};
+ input.find({keyName: "uploadFile"}).simulate('change', event);
+ expect(event.preventDefault.mock.calls.length).toBe(1);
+
+ });
+
+});
diff --git a/front-end/__tests__/components/CustomNode/Input/FlowVariableOverride.test.js b/front-end/__tests__/components/CustomNode/Input/FlowVariableOverride.test.js
new file mode 100644
index 0000000..b167cc0
--- /dev/null
+++ b/front-end/__tests__/components/CustomNode/Input/FlowVariableOverride.test.js
@@ -0,0 +1,39 @@
+import React from 'react'
+import { shallow, mount } from 'enzyme';
+import { Form } from 'react-bootstrap';
+import FlowVariableOverride from '../../../../src/components/CustomNode/Input/FlowVariableOverride';
+
+const nodes = {"Visualization": [{"name": "Graph Node", "node_key": "GraphNode", "node_type": "visualization", "num_in": 1, "num_out": 0, "color": "red", "filename": "graph", "doc": "Displays a pandas DataFrame in a visual graph.\n\n Raises:\n NodeException: any error generating Altair Chart.\n ", "options": {"graph_type": "bar", "mark_options": false, "width": 10, "height": 10, "encode_options": true, "x_axis": "a", "y_axis": "average(b)"}, "option_types": {"graph_type": {"type": "select", "label": "Graph Type", "value": "bar", "docstring": "Graph viz type", "options": ["area", "bar", "line", "point"]}, "mark_options": {"type": "boolean", "label": "Specify mark options", "value": false, "docstring": "Specify mark options"}, "width": {"type": "int", "label": "Mark width", "value": 10, "docstring": "Width of marks"}, "height": {"type": "int", "label": "Mark height", "value": 10, "docstring": "Height of marks"}, "encode_options": {"type": "boolean", "label": "Specify encoding options", "value": true, "docstring": "Specify encoding options"}, "x_axis": {"type": "string", "label": "X-Axis", "value": "a", "docstring": "X-axis values"}, "y_axis": {"type": "string", "label": "Y-Axis", "value": "average(b)", "docstring": "Y-axis values"}}, "download_result": false}], "Flow Control":
+[{"node_id":"nodeId01", "name": "Integer Input", "node_key": "IntegerNode", "node_type": "flow_control", "num_in": 1, "num_out": 1, "color": "purple", "filename": "integer_input", "doc": "StringNode object\n\n Allows for Strings to replace 'string' fields in Nodes\n ", "options": {"default_value": null, "var_name": "my_var"}, "option_types": {"default_value": {"type": "int", "label": "Default Value", "value": null, "docstring": "Value this node will pass as a flow variable"}, "var_name": {"type": "string", "label": "Variable Name", "value": "my_var", "docstring": "Name of the variable to use in another Node"}}, "download_result": false},
+{ "node_id":"nodeId02", "name": "String Input", "node_key": "StringNode", "node_type": "flow_control", "num_in": 1, "num_out": 1, "color": "purple", "filename": "string_input", "doc": "StringNode object\n\n Allows for Strings to replace 'string' fields in Nodes\n ", "options": {"default_value": null, "var_name": "my_var"}, "option_types": {"default_value": {"type": "string", "label": "Default Value", "value": null, "docstring": "Value this node will pass as a flow variable"}, "var_name": {"type": "string", "label": "Variable Name", "value": "my_var", "docstring": "Name of the variable to use in another Node"}}, "download_result": false}], "Manipulation": [{"name": "Joiner", "node_key": "JoinNode", "node_type": "manipulation", "num_in": 2, "num_out": 1, "color": "goldenrod", "filename": "join", "doc": null, "options": {"on": null}, "option_types": {"on": {"type": "string", "label": "Join Column", "value": null, "docstring": "Name of column to join on"}}, "download_result": false},
+{ "node_id":"nodeId03", "name": "Filter", "node_key": "FilterNode", "node_type": "manipulation", "num_in": 1, "num_out": 1, "color": "goldenrod", "filename": "filter", "doc": null, "options": {"items": null, "like": null, "regex": null, "axis": null}, "option_types": {"items": {"type": "string", "label": "Items", "value": null, "docstring": "Keep labels from axis which are in items"}, "like": {"type": "string", "label": "Like", "value": null, "docstring": "Keep labels from axis for which like in label == True."}, "regex": {"type": "string", "label": "Regex", "value": null, "docstring": "Keep labels from axis for which re.search(regex, label) == True."}, "axis": {"type": "string", "label": "Axis", "value": null, "docstring": "The axis to filter on."}}, "download_result": false},
+{ "node_id":"nodeId04", "name": "Pivoting", "node_key": "PivotNode", "node_type": "manipulation", "num_in": 1, "num_out": 3, "color": "goldenrod", "filename": "pivot", "doc": null, "options": {"index": null, "values": null, "columns": null, "aggfunc": "mean", "fill_value": null, "margins": false, "dropna": true, "margins_name": "All", "observed": false}, "option_types": {"index": {"type": "string", "label": "Index", "value": null, "docstring": "Column to aggregate (column, grouper, array or list)"}, "values": {"type": "string", "label": "Values", "value": null, "docstring": "Column name to use to populate new frame's values (column, grouper, array or list)"}, "columns": {"type": "string", "label": "Column Name Row", "value": null, "docstring": "Column(s) to use for populating new frame values. (column, grouper, array or list)"}, "aggfunc": {"type": "string", "label": "Aggregation function", "value": "mean", "docstring": "Function used for aggregation (function, list of functions, dict, default numpy.mean)"}, "fill_value": {"type": "string", "label": "Fill value", "value": null, "docstring": "Value to replace missing values with (scalar)"}, "margins": {"type": "boolean", "label": "Margins name", "value": false, "docstring": "Add all rows/columns"}, "dropna": {"type": "boolean", "label": "Drop NaN columns", "value": true, "docstring": "Ignore columns with all NaN entries"}, "margins_name": {"type": "string", "label": "Margins name", "value": "All", "docstring": "Name of the row/column that will contain the totals when margins is True"}, "observed": {"type": "boolean", "label": "Column Name Row", "value": false, "docstring": "Row number with column names (0-indexed) or \"infer\""}}, "download_result": false}], "I/O": [{"name": "Read CSV", "node_key": "ReadCsvNode", "node_type": "io", "num_in": 0, "num_out": 1, "color": "green", "filename": "read_csv", "doc": "ReadCsvNode\n\n Reads a CSV file into a pandas DataFrame.\n\n Raises:\n NodeException: any error reading CSV file, converting\n to DataFrame.\n ", "options": {"file": null, "sep": ",", "header": "infer"}, "option_types": {"file": {"type": "file", "label": "File", "value": null, "docstring": "CSV File"}, "sep": {"type": "string", "label": "Delimiter", "value": ",", "docstring": "Column delimiter"}, "header": {"type": "string", "label": "Header Row", "value": "infer", "docstring": "Row number containing column names (0-indexed)"}}, "download_result": false}, {"name": "Write CSV", "node_key": "WriteCsvNode", "node_type": "io", "num_in": 1, "num_out": 0, "color": "green", "filename": "write_csv", "doc": "WriteCsvNode\n\n Writes the current DataFrame to a CSV file.\n\n Raises:\n NodeException: any error writing CSV file, converting\n from DataFrame.\n ", "options": {"file": null, "sep": ",", "index": true}, "option_types": {"file": {"type": "string", "label": "Filename", "value": null, "docstring": "CSV file to write"}, "sep": {"type": "string", "label": "Delimiter", "value": ",", "docstring": "Column delimiter"}, "index": {"type": "boolean", "label": "Write Index", "value": true, "docstring": "Write index as column?"}}, "download_result": true}], "Custom Nodes": [{"name": "Table Creator", "node_key": "TableCreatorNode", "node_type": "custom_nodes", "num_in": 0, "num_out": 1, "color": "green", "filename": "table_creator", "doc": "Accepts raw-text CSV input to create data tables.\n\n Raises:\n NodeException: any error reading CSV file, converting\n to DataFrame.\n ", "options": {"input": "", "sep": ",", "header": "infer"}, "option_types": {"input": {"type": "text", "label": "Input", "value": "", "docstring": "Text input"}, "sep": {"type": "string", "label": "Delimiter", "value": ",", "docstring": "Column delimiter"}, "header": {"type": "string", "label": "Header Row", "value": "infer", "docstring": "Row number containing column names (0-indexed)"}}, "download_result": false}]};
+
+
+
+describe('Validates FlowVariableOverride', () => {
+ it('Display FlowVariableOverride', () => {
+ const override = shallow();
+ expect(override).toMatchSnapshot();
+ });
+
+ it('Validates FlowVariableOverride behavior', () => {
+ const onChange = jest.fn(() => []);
+ const onFlowCheck = jest.fn(() => []);
+ const override = shallow();
+
+ override.find(Form.Check).simulate('change', {target: {checked: true}})
+
+ expect(onFlowCheck.mock.calls.length).toBe(1);
+
+ override.find(Form.Control).simulate('change', {target: {value: "nodeId01"}})
+
+ expect(onChange.mock.calls.length).toBe(1);
+ });
+});
diff --git a/front-end/__tests__/components/CustomNode/Input/OptionInput.test.js b/front-end/__tests__/components/CustomNode/Input/OptionInput.test.js
new file mode 100644
index 0000000..37e01d5
--- /dev/null
+++ b/front-end/__tests__/components/CustomNode/Input/OptionInput.test.js
@@ -0,0 +1,77 @@
+import React from 'react'
+import { shallow, mount } from 'enzyme';
+import CustomNodeModel from '../../../../src/components/CustomNode/CustomNodeModel';
+import OptionInput from '../../../../src/components/CustomNode/Input/OptionInput';
+
+const nodes = {"Visualization": [{"name": "Graph Node", "node_key": "GraphNode", "node_type": "visualization", "num_in": 1, "num_out": 0, "color": "red", "filename": "graph", "doc": "Displays a pandas DataFrame in a visual graph.\n\n Raises:\n NodeException: any error generating Altair Chart.\n ", "options": {"graph_type": "bar", "mark_options": false, "width": 10, "height": 10, "encode_options": true, "x_axis": "a", "y_axis": "average(b)"}, "option_types": {"graph_type": {"type": "select", "label": "Graph Type", "value": "bar", "docstring": "Graph viz type", "options": ["area", "bar", "line", "point"]}, "mark_options": {"type": "boolean", "label": "Specify mark options", "value": false, "docstring": "Specify mark options"}, "width": {"type": "int", "label": "Mark width", "value": 10, "docstring": "Width of marks"}, "height": {"type": "int", "label": "Mark height", "value": 10, "docstring": "Height of marks"}, "encode_options": {"type": "boolean", "label": "Specify encoding options", "value": true, "docstring": "Specify encoding options"}, "x_axis": {"type": "string", "label": "X-Axis", "value": "a", "docstring": "X-axis values"}, "y_axis": {"type": "string", "label": "Y-Axis", "value": "average(b)", "docstring": "Y-axis values"}}, "download_result": false}], "Flow Control":
+[{"node_id":"nodeId01", "name": "Integer Input", "node_key": "IntegerNode", "node_type": "flow_control", "num_in": 1, "num_out": 1, "color": "purple", "filename": "integer_input", "doc": "StringNode object\n\n Allows for Strings to replace 'string' fields in Nodes\n ", "options": {"default_value": null, "var_name": "my_var"}, "option_types": {"default_value": {"type": "int", "label": "Default Value", "value": null, "docstring": "Value this node will pass as a flow variable"}, "var_name": {"type": "string", "label": "Variable Name", "value": "my_var", "docstring": "Name of the variable to use in another Node"}}, "download_result": false},
+{ "node_id":"nodeId02", "name": "String Input", "node_key": "StringNode", "node_type": "flow_control", "num_in": 1, "num_out": 1, "color": "purple", "filename": "string_input", "doc": "StringNode object\n\n Allows for Strings to replace 'string' fields in Nodes\n ", "options": {"default_value": null, "var_name": "my_var"}, "option_types": {"default_value": {"type": "string", "label": "Default Value", "value": null, "docstring": "Value this node will pass as a flow variable"}, "var_name": {"type": "string", "label": "Variable Name", "value": "my_var", "docstring": "Name of the variable to use in another Node"}}, "download_result": false}], "Manipulation": [{"name": "Joiner", "node_key": "JoinNode", "node_type": "manipulation", "num_in": 2, "num_out": 1, "color": "goldenrod", "filename": "join", "doc": null, "options": {"on": null}, "option_types": {"on": {"type": "string", "label": "Join Column", "value": null, "docstring": "Name of column to join on"}}, "download_result": false},
+{ "node_id":"nodeId03", "name": "Filter", "node_key": "FilterNode", "node_type": "manipulation", "num_in": 1, "num_out": 1, "color": "goldenrod", "filename": "filter", "doc": null, "options": {"items": null, "like": null, "regex": null, "axis": null}, "option_types": {"items": {"type": "string", "label": "Items", "value": null, "docstring": "Keep labels from axis which are in items"}, "like": {"type": "string", "label": "Like", "value": null, "docstring": "Keep labels from axis for which like in label == True."}, "regex": {"type": "string", "label": "Regex", "value": null, "docstring": "Keep labels from axis for which re.search(regex, label) == True."}, "axis": {"type": "string", "label": "Axis", "value": null, "docstring": "The axis to filter on."}}, "download_result": false},
+{ "node_id":"nodeId04", "name": "Pivoting", "node_key": "PivotNode", "node_type": "manipulation", "num_in": 1, "num_out": 3, "color": "goldenrod", "filename": "pivot", "doc": null, "options": {"index": null, "values": null, "columns": null, "aggfunc": "mean", "fill_value": null, "margins": false, "dropna": true, "margins_name": "All", "observed": false}, "option_types": {"index": {"type": "string", "label": "Index", "value": null, "docstring": "Column to aggregate (column, grouper, array or list)"}, "values": {"type": "string", "label": "Values", "value": null, "docstring": "Column name to use to populate new frame's values (column, grouper, array or list)"}, "columns": {"type": "string", "label": "Column Name Row", "value": null, "docstring": "Column(s) to use for populating new frame values. (column, grouper, array or list)"}, "aggfunc": {"type": "string", "label": "Aggregation function", "value": "mean", "docstring": "Function used for aggregation (function, list of functions, dict, default numpy.mean)"}, "fill_value": {"type": "string", "label": "Fill value", "value": null, "docstring": "Value to replace missing values with (scalar)"}, "margins": {"type": "boolean", "label": "Margins name", "value": false, "docstring": "Add all rows/columns"}, "dropna": {"type": "boolean", "label": "Drop NaN columns", "value": true, "docstring": "Ignore columns with all NaN entries"}, "margins_name": {"type": "string", "label": "Margins name", "value": "All", "docstring": "Name of the row/column that will contain the totals when margins is True"}, "observed": {"type": "boolean", "label": "Column Name Row", "value": false, "docstring": "Row number with column names (0-indexed) or \"infer\""}}, "download_result": false}], "I/O": [{"name": "Read CSV", "node_key": "ReadCsvNode", "node_type": "io", "num_in": 0, "num_out": 1, "color": "green", "filename": "read_csv", "doc": "ReadCsvNode\n\n Reads a CSV file into a pandas DataFrame.\n\n Raises:\n NodeException: any error reading CSV file, converting\n to DataFrame.\n ", "options": {"file": null, "sep": ",", "header": "infer"}, "option_types": {"file": {"type": "file", "label": "File", "value": null, "docstring": "CSV File"}, "sep": {"type": "string", "label": "Delimiter", "value": ",", "docstring": "Column delimiter"}, "header": {"type": "string", "label": "Header Row", "value": "infer", "docstring": "Row number containing column names (0-indexed)"}}, "download_result": false}, {"name": "Write CSV", "node_key": "WriteCsvNode", "node_type": "io", "num_in": 1, "num_out": 0, "color": "green", "filename": "write_csv", "doc": "WriteCsvNode\n\n Writes the current DataFrame to a CSV file.\n\n Raises:\n NodeException: any error writing CSV file, converting\n from DataFrame.\n ", "options": {"file": null, "sep": ",", "index": true}, "option_types": {"file": {"type": "string", "label": "Filename", "value": null, "docstring": "CSV file to write"}, "sep": {"type": "string", "label": "Delimiter", "value": ",", "docstring": "Column delimiter"}, "index": {"type": "boolean", "label": "Write Index", "value": true, "docstring": "Write index as column?"}}, "download_result": true}], "Custom Nodes": [{"name": "Table Creator", "node_key": "TableCreatorNode", "node_type": "custom_nodes", "num_in": 0, "num_out": 1, "color": "green", "filename": "table_creator", "doc": "Accepts raw-text CSV input to create data tables.\n\n Raises:\n NodeException: any error reading CSV file, converting\n to DataFrame.\n ", "options": {"input": "", "sep": ",", "header": "infer"}, "option_types": {"input": {"type": "text", "label": "Input", "value": "", "docstring": "Text input"}, "sep": {"type": "string", "label": "Delimiter", "value": ",", "docstring": "Column delimiter"}, "header": {"type": "string", "label": "Header Row", "value": "infer", "docstring": "Row number containing column names (0-indexed)"}}, "download_result": false}]};
+
+describe('Validates OptionInput', () => {
+ it('Display OptionInput', () => {
+ const optionInput = shallow();
+ expect(optionInput).toMatchSnapshot();
+ });
+
+ it('Display OptionInput as FileUploadInput', () => {
+ const node = new CustomNodeModel({id: "myId", num_in: 2, num_out: 1, is_global: false});
+ const optionInput = shallow();
+ expect(optionInput).toMatchSnapshot();
+ });
+
+ it('Display OptionInput as SimpleInput', () => {
+ const node = new CustomNodeModel({id: "myId", num_in: 2, num_out: 1, is_global: false});
+ const optionInput = shallow();
+ expect(optionInput).toMatchSnapshot();
+ });
+
+ it('Display OptionInput as text', () => {
+ const node = new CustomNodeModel({id: "myId", num_in: 2, num_out: 1, is_global: false});
+ const optionInput = shallow();
+ expect(optionInput).toMatchSnapshot();
+ });
+
+ it('Display OptionInput as int', () => {
+ const node = new CustomNodeModel({id: "myId", num_in: 2, num_out: 1, is_global: false});
+ const optionInput = shallow();
+ expect(optionInput).toMatchSnapshot();
+ });
+
+ it('Display OptionInput as BooleanInput', () => {
+ const node = new CustomNodeModel({id: "myId", num_in: 2, num_out: 1, is_global: false});
+ const optionInput = shallow();
+ expect(optionInput).toMatchSnapshot();
+ });
+
+ it('Display OptionInput as SelectInput', () => {
+ const node = new CustomNodeModel({id: "myId", num_in: 2, num_out: 1, is_global: false});
+ const optionInput = shallow();
+ expect(optionInput).toMatchSnapshot();
+ });
+});
diff --git a/front-end/__tests__/components/CustomNode/Input/SelectInput.test.js b/front-end/__tests__/components/CustomNode/Input/SelectInput.test.js
new file mode 100644
index 0000000..eb039f1
--- /dev/null
+++ b/front-end/__tests__/components/CustomNode/Input/SelectInput.test.js
@@ -0,0 +1,29 @@
+import React from 'react'
+import { shallow, mount } from 'enzyme';
+import SelectInput from '../../../../src/components/CustomNode/Input/SelectInput';
+
+describe('Validates SelectInput', () => {
+ it('Display SelectInput', () => {
+ const options =["area", "bar", "line", "point"];
+ const input = shallow();
+ expect(input).toMatchSnapshot();
+ });
+
+ it('SelectInput onChange', () => {
+ const onChange = jest.fn(() => []);
+ const options =["area", "bar", "line", "point"];
+ const input = mount();
+
+ expect(onChange.mock.calls.length).toBe(1);
+ input.find({keyName: "selectInputPlot"}).simulate('change', {target: {value: "bar"}})
+
+ expect(onChange.mock.calls.length).toBe(2);
+ });
+});
diff --git a/front-end/__tests__/components/CustomNode/Input/SimpleInput.test.js b/front-end/__tests__/components/CustomNode/Input/SimpleInput.test.js
new file mode 100644
index 0000000..6895a2f
--- /dev/null
+++ b/front-end/__tests__/components/CustomNode/Input/SimpleInput.test.js
@@ -0,0 +1,24 @@
+import React from 'react'
+import { shallow, mount } from 'enzyme';
+import SimpleInput from '../../../../src/components/CustomNode/Input/SimpleInput';
+
+describe('Validates SimpleInput', () => {
+ it('Display SimpleInput', () => {
+ const input = shallow();
+ expect(input).toMatchSnapshot();
+ });
+
+ it('Display SimpleInput as number', () => {
+ const changeFn = jest.fn(() => []);
+ const input = mount();
+
+ expect(changeFn.mock.calls.length).toBe(1);
+ input.find({keyName: "numberInput"}).simulate('change', {target: {value: 654321}})
+ expect(changeFn.mock.calls.length).toBe(2);
+ });
+});
diff --git a/front-end/__tests__/components/CustomNode/Input/__snapshots__/BooleanInput.test.js.snap b/front-end/__tests__/components/CustomNode/Input/__snapshots__/BooleanInput.test.js.snap
new file mode 100644
index 0000000..dfec036
--- /dev/null
+++ b/front-end/__tests__/components/CustomNode/Input/__snapshots__/BooleanInput.test.js.snap
@@ -0,0 +1,3 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Validates BooleanInpupt Display BooleanInput 1`] = `ShallowWrapper {}`;
diff --git a/front-end/__tests__/components/CustomNode/Input/__snapshots__/FileUploadInput.test.js.snap b/front-end/__tests__/components/CustomNode/Input/__snapshots__/FileUploadInput.test.js.snap
new file mode 100644
index 0000000..fa9d1ae
--- /dev/null
+++ b/front-end/__tests__/components/CustomNode/Input/__snapshots__/FileUploadInput.test.js.snap
@@ -0,0 +1,3 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Validates FileUploadInput Display FileUploadInput 1`] = `ReactWrapper {}`;
diff --git a/front-end/__tests__/components/CustomNode/Input/__snapshots__/FlowVariableOverride.test.js.snap b/front-end/__tests__/components/CustomNode/Input/__snapshots__/FlowVariableOverride.test.js.snap
new file mode 100644
index 0000000..e12dcfc
--- /dev/null
+++ b/front-end/__tests__/components/CustomNode/Input/__snapshots__/FlowVariableOverride.test.js.snap
@@ -0,0 +1,3 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Validates FlowVariableOverride Display FlowVariableOverride 1`] = `ShallowWrapper {}`;
diff --git a/front-end/__tests__/components/CustomNode/Input/__snapshots__/OptionInput.test.js.snap b/front-end/__tests__/components/CustomNode/Input/__snapshots__/OptionInput.test.js.snap
new file mode 100644
index 0000000..6d2bc10
--- /dev/null
+++ b/front-end/__tests__/components/CustomNode/Input/__snapshots__/OptionInput.test.js.snap
@@ -0,0 +1,15 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Validates OptionInput Display OptionInput 1`] = `ShallowWrapper {}`;
+
+exports[`Validates OptionInput Display OptionInput as BooleanInput 1`] = `ShallowWrapper {}`;
+
+exports[`Validates OptionInput Display OptionInput as FileUploadInput 1`] = `ShallowWrapper {}`;
+
+exports[`Validates OptionInput Display OptionInput as SelectInput 1`] = `ShallowWrapper {}`;
+
+exports[`Validates OptionInput Display OptionInput as SimpleInput 1`] = `ShallowWrapper {}`;
+
+exports[`Validates OptionInput Display OptionInput as int 1`] = `ShallowWrapper {}`;
+
+exports[`Validates OptionInput Display OptionInput as text 1`] = `ShallowWrapper {}`;
diff --git a/front-end/__tests__/components/CustomNode/Input/__snapshots__/SelectInput.test.js.snap b/front-end/__tests__/components/CustomNode/Input/__snapshots__/SelectInput.test.js.snap
new file mode 100644
index 0000000..b96f413
--- /dev/null
+++ b/front-end/__tests__/components/CustomNode/Input/__snapshots__/SelectInput.test.js.snap
@@ -0,0 +1,3 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Validates SelectInput Display SelectInput 1`] = `ShallowWrapper {}`;
diff --git a/front-end/__tests__/components/CustomNode/Input/__snapshots__/SimpleInput.test.js.snap b/front-end/__tests__/components/CustomNode/Input/__snapshots__/SimpleInput.test.js.snap
new file mode 100644
index 0000000..c1effb7
--- /dev/null
+++ b/front-end/__tests__/components/CustomNode/Input/__snapshots__/SimpleInput.test.js.snap
@@ -0,0 +1,3 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Validates SimpleInput Display SimpleInput 1`] = `ShallowWrapper {}`;
diff --git a/front-end/__tests__/components/CustomNode/NodeConfig.test.js b/front-end/__tests__/components/CustomNode/NodeConfig.test.js
index d3751fe..0e45cde 100644
--- a/front-end/__tests__/components/CustomNode/NodeConfig.test.js
+++ b/front-end/__tests__/components/CustomNode/NodeConfig.test.js
@@ -1,8 +1,24 @@
import React from 'react'
+import { Col, Modal, Button, Form } from 'react-bootstrap';
import { render } from '@testing-library/react'
+import { shallow, mount } from 'enzyme';
import CustomNodeModel from '../../../src/components/CustomNode/CustomNodeModel';
import NodeConfig from '../../../src/components/CustomNode/NodeConfig';
+import OptionInput from '../../../src/components/CustomNode/NodeConfig';
+import FileUploadInput from '../../../src/components/CustomNode/NodeConfig';
+import SimpleInput from '../../../src/components/CustomNode/NodeConfig';
+import BooleanInput from '../../../src/components/CustomNode/NodeConfig';
+import FlowVariableOverride from '../../../src/components/CustomNode/NodeConfig';
+import SelectInput from '../../../src/components/CustomNode/NodeConfig';
+global.console = {log: jest.fn()}
+
+global.fetch = jest.fn(() => Promise.resolve({
+ data: [],
+ json: jest.fn(() => [])
+}));
+
+global.confirm = (s) => true;
describe('Validate NodeConfig Modal', () => {
it('Display configuration', () => {
@@ -16,4 +32,47 @@ describe('Validate NodeConfig Modal', () => {
);
expect(nodeConfig).toMatchSnapshot();
});
+
+ it('Validates handleDelete',() => {
+ const props = {
+ onDelete: jest.fn(() => []),
+ toggleShow: jest.fn(() => [])
+ };
+
+ const nodeConfig = new NodeConfig(props);
+ nodeConfig.handleDelete();
+
+ expect(props.onDelete.mock.calls.length).toBe(1);
+ expect(props.toggleShow.mock.calls.length).toBe(1);
+ });
+
+ it('Validates handleSubmit', () => {
+ const props = {
+ onSubmit: jest.fn(() => []),
+ toggleShow: jest.fn(() => [])
+ };
+
+ const event = {
+ preventDefault: jest.fn(() => [])
+ };
+
+ const nodeConfig = new NodeConfig(props);
+ nodeConfig.handleSubmit(event);
+
+ expect(event.preventDefault.mock.calls.length).toBe(1);
+ expect(props.onSubmit.mock.calls.length).toBe(1);
+ expect(props.toggleShow.mock.calls.length).toBe(1);
+ });
+
+ it('Validates OptionInput with properties', () => {
+ const optionInputRendered = render();
+
+ expect(optionInputRendered).toMatchSnapshot();
+ });
+
+
})
diff --git a/front-end/__tests__/components/CustomNode/__snapshots__/CustomNodeWidget.test.js.snap b/front-end/__tests__/components/CustomNode/__snapshots__/CustomNodeWidget.test.js.snap
new file mode 100644
index 0000000..8459425
--- /dev/null
+++ b/front-end/__tests__/components/CustomNode/__snapshots__/CustomNodeWidget.test.js.snap
@@ -0,0 +1,232 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Validate CustomNodeWidget Display CustomNodeWidget 1`] = `
+Object {
+ "asFragment": [Function],
+ "baseElement":
+
+
+
+
+
+
+ ⚙
+
+
+

+
+
+
+
+
+
+
+
+
+
+ ,
+ "container":
+
+
+
+
+
+ ⚙
+
+
+

+
+
+
+
+
+
+
+
+
+
,
+ "debug": [Function],
+ "findAllByAltText": [Function],
+ "findAllByDisplayValue": [Function],
+ "findAllByLabelText": [Function],
+ "findAllByPlaceholderText": [Function],
+ "findAllByRole": [Function],
+ "findAllByTestId": [Function],
+ "findAllByText": [Function],
+ "findAllByTitle": [Function],
+ "findByAltText": [Function],
+ "findByDisplayValue": [Function],
+ "findByLabelText": [Function],
+ "findByPlaceholderText": [Function],
+ "findByRole": [Function],
+ "findByTestId": [Function],
+ "findByText": [Function],
+ "findByTitle": [Function],
+ "getAllByAltText": [Function],
+ "getAllByDisplayValue": [Function],
+ "getAllByLabelText": [Function],
+ "getAllByPlaceholderText": [Function],
+ "getAllByRole": [Function],
+ "getAllByTestId": [Function],
+ "getAllByText": [Function],
+ "getAllByTitle": [Function],
+ "getByAltText": [Function],
+ "getByDisplayValue": [Function],
+ "getByLabelText": [Function],
+ "getByPlaceholderText": [Function],
+ "getByRole": [Function],
+ "getByTestId": [Function],
+ "getByText": [Function],
+ "getByTitle": [Function],
+ "queryAllByAltText": [Function],
+ "queryAllByDisplayValue": [Function],
+ "queryAllByLabelText": [Function],
+ "queryAllByPlaceholderText": [Function],
+ "queryAllByRole": [Function],
+ "queryAllByTestId": [Function],
+ "queryAllByText": [Function],
+ "queryAllByTitle": [Function],
+ "queryByAltText": [Function],
+ "queryByDisplayValue": [Function],
+ "queryByLabelText": [Function],
+ "queryByPlaceholderText": [Function],
+ "queryByRole": [Function],
+ "queryByTestId": [Function],
+ "queryByText": [Function],
+ "queryByTitle": [Function],
+ "rerender": [Function],
+ "unmount": [Function],
+}
+`;
diff --git a/front-end/__tests__/components/CustomNode/__snapshots__/GraphView.test.js.snap b/front-end/__tests__/components/CustomNode/__snapshots__/GraphView.test.js.snap
index 7294c1f..5689ab7 100644
--- a/front-end/__tests__/components/CustomNode/__snapshots__/GraphView.test.js.snap
+++ b/front-end/__tests__/components/CustomNode/__snapshots__/GraphView.test.js.snap
@@ -21,7 +21,7 @@ Object {
tabindex="-1"
>
+