aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/test/nfvo-components
diff options
context:
space:
mode:
authorEinav Weiss Keidar <einavw@amdocs.com>2018-08-13 16:19:46 +0300
committerAvi Gaffa <avi.gaffa@amdocs.com>2019-02-11 13:50:22 +0000
commit1801b24389baa8e3f7298ff2c41e2512b19c1290 (patch)
treed3d2a15f53aa28698280d609548298d177f9280d /openecomp-ui/test/nfvo-components
parentaf8e36eb7f43803bd9cf40e9b46a0c0c8f47c781 (diff)
react 16 upgrade
Issue-ID: SDC-1762 Change-Id: I7701f12fc63bb09f8c985c7c893b984701dcbfab Signed-off-by: Einav Keidar <einavw@amdocs.com>
Diffstat (limited to 'openecomp-ui/test/nfvo-components')
-rw-r--r--openecomp-ui/test/nfvo-components/editor/TabulatedEditor.test.js76
1 files changed, 44 insertions, 32 deletions
diff --git a/openecomp-ui/test/nfvo-components/editor/TabulatedEditor.test.js b/openecomp-ui/test/nfvo-components/editor/TabulatedEditor.test.js
index 0738bbb03d..cc694398ec 100644
--- a/openecomp-ui/test/nfvo-components/editor/TabulatedEditor.test.js
+++ b/openecomp-ui/test/nfvo-components/editor/TabulatedEditor.test.js
@@ -14,43 +14,55 @@
* limitations under the License.
*/
-
import React from 'react';
import ShallowRenderer from 'react-test-renderer/shallow';
import TestUtils from 'react-dom/test-utils';
import TabulatedEditor from 'nfvo-components/editor/TabulatedEditor.jsx';
import { Provider } from 'react-redux';
-import {storeCreator} from 'sdc-app/AppStore.js';
-
-describe('Tabulated Editor test: ', function () {
- const store = storeCreator();
- it('basic view test', () => {
- const renderer = new ShallowRenderer();
- renderer.render(
- <Provider store={store}><TabulatedEditor><button>test</button></TabulatedEditor></Provider>
- );
- let renderedOutput = renderer.getRenderOutput();
- expect(renderedOutput).toBeTruthy();
-
- });
+import { storeCreator } from 'sdc-app/AppStore.js';
- it('handle func test', () => {
- let props = {
- navigationBarProps: {
- groups: [],
- onNavigationItemClick: ()=>{}
- },
- versionControllerProps: {
- isCheckedOut: false,
- version: {id: '0.1', label: '0.1'},
- viewableVersions: [{id: '0.1', label: '0.1'}],
- itemPermission: {isCertified: false, isCollaborator: true, isDirty: false},
- onSubmit: ()=>{},
- onRevert: ()=>{}
- }
- };
- const view = TestUtils.renderIntoDocument(<Provider store={store}><TabulatedEditor {...props}><button>test</button></TabulatedEditor></Provider>);
- expect(view).toBeTruthy();
- });
+describe('Tabulated Editor test: ', function() {
+ const store = storeCreator();
+ it('basic view test', () => {
+ const renderer = new ShallowRenderer();
+ renderer.render(
+ <Provider store={store}>
+ <TabulatedEditor>
+ <button>test</button>
+ </TabulatedEditor>
+ </Provider>
+ );
+ let renderedOutput = renderer.getRenderOutput();
+ expect(renderedOutput).toBeTruthy();
+ });
+ it('handle func test', () => {
+ let props = {
+ navigationBarProps: {
+ groups: [],
+ onNavigationItemClick: () => {},
+ activeItemId: 'test'
+ },
+ versionControllerProps: {
+ isCheckedOut: false,
+ version: { id: '0.1', label: '0.1' },
+ viewableVersions: [{ id: '0.1', label: '0.1' }],
+ itemPermission: {
+ isCertified: false,
+ isCollaborator: true,
+ isDirty: false
+ },
+ onSubmit: () => {},
+ onRevert: () => {}
+ }
+ };
+ const view = TestUtils.renderIntoDocument(
+ <Provider store={store}>
+ <TabulatedEditor {...props}>
+ <button>test</button>
+ </TabulatedEditor>
+ </Provider>
+ );
+ expect(view).toBeTruthy();
+ });
});