Shallow render generic components 45/85045/1
authorAdam Wudzinski <adam.wudzinski@nokia.com>
Thu, 11 Apr 2019 11:58:51 +0000 (13:58 +0200)
committerawudzins <adam.wudzinski@nokia.com>
Thu, 11 Apr 2019 11:58:51 +0000 (13:58 +0200)
Add tests that check if generic components render

Change-Id: I32960dfa1519a13483b6a4ec9e2eebe48c03cdbc
Issue-ID: AAI-1618
Signed-off-by: awudzins <adam.wudzinski@nokia.com>
test/generic-components/graph/ForceDirectedGraph.test.js [new file with mode: 0644]
test/generic-components/graph/Link.test.js [new file with mode: 0644]
test/generic-components/graph/Node.test.js [new file with mode: 0644]
test/generic-components/inlineMessage/InlineMessage.test.js [new file with mode: 0644]
test/generic-components/paginatedTable/PaginatedTable.test.js [new file with mode: 0644]
test/generic-components/titledContainer/TitledContainer.test.js [new file with mode: 0644]

diff --git a/test/generic-components/graph/ForceDirectedGraph.test.js b/test/generic-components/graph/ForceDirectedGraph.test.js
new file mode 100644 (file)
index 0000000..d73a6cc
--- /dev/null
@@ -0,0 +1,11 @@
+import React from 'react';
+import ForceDirectedGraph from 'generic-components/graph/ForceDirectedGraph.jsx';
+import {shallow} from 'enzyme';
+
+describe('ForceDirectedGraph component', () => {
+  it('should be rendered', () => {
+    const component = shallow(<ForceDirectedGraph dataOverlayButtons="Test"/>);
+
+    expect(component).toHaveLength(1);
+  });
+});
diff --git a/test/generic-components/graph/Link.test.js b/test/generic-components/graph/Link.test.js
new file mode 100644 (file)
index 0000000..c030ef3
--- /dev/null
@@ -0,0 +1,11 @@
+import React from 'react';
+import Link from 'generic-components/graph/Link.jsx';
+import {shallow} from 'enzyme';
+
+describe('Link component', () => {
+  it('should be rendered', () => {
+    const component = shallow(<Link/>);
+
+    expect(component).toHaveLength(1);
+  });
+});
diff --git a/test/generic-components/graph/Node.test.js b/test/generic-components/graph/Node.test.js
new file mode 100644 (file)
index 0000000..ed0c84e
--- /dev/null
@@ -0,0 +1,11 @@
+import React from 'react';
+import Node from 'generic-components/graph/Node.jsx';
+import {shallow} from 'enzyme';
+
+describe('Node component', () => {
+  it('should be rendered', () => {
+    const component = shallow(<Node/>);
+
+    expect(component).toHaveLength(1);
+  });
+});
diff --git a/test/generic-components/inlineMessage/InlineMessage.test.js b/test/generic-components/inlineMessage/InlineMessage.test.js
new file mode 100644 (file)
index 0000000..42c28a4
--- /dev/null
@@ -0,0 +1,11 @@
+import React from 'react';
+import InlineMessage from 'generic-components/InlineMessage/InlineMessage.jsx';
+import {shallow} from 'enzyme';
+
+describe('InlineMessage component', () => {
+  it('should be rendered', () => {
+    const component = shallow(<InlineMessage/>);
+
+    expect(component).toHaveLength(1);
+  });
+});
diff --git a/test/generic-components/paginatedTable/PaginatedTable.test.js b/test/generic-components/paginatedTable/PaginatedTable.test.js
new file mode 100644 (file)
index 0000000..d3a32b5
--- /dev/null
@@ -0,0 +1,11 @@
+import React from 'react';
+import PaginatedTable from 'generic-components/paginatedTable/PaginatedTable.jsx';
+import {shallow} from 'enzyme';
+
+describe('PaginatedTable component', () => {
+  it('should be rendered', () => {
+    const component = shallow(<PaginatedTable tableHeaders={{}}/>);
+
+    expect(component).toHaveLength(1);
+  });
+});
diff --git a/test/generic-components/titledContainer/TitledContainer.test.js b/test/generic-components/titledContainer/TitledContainer.test.js
new file mode 100644 (file)
index 0000000..a0290b2
--- /dev/null
@@ -0,0 +1,11 @@
+import React from 'react';
+import TitledContainer from 'generic-components/titledContainer/TitledContainer.jsx';
+import {shallow} from 'enzyme';
+
+describe('TitledContainer component', () => {
+  it('should be rendered', () => {
+    const component = shallow(<TitledContainer/>);
+
+    expect(component).toHaveLength(1);
+  });
+});

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use