Add tests to Inventory module
[aai/sparky-fe.git] / test / vnfSearch / VnfSearch.test.js
1 import React from 'react';
2 import { shallow, mount } from 'enzyme';
3 import {Provider} from 'react-redux';
4 import configureStore from 'redux-mock-store';
5
6 import ConnectedVnfSearch, { vnfSearch } from 'app/vnfSearch/VnfSearch.jsx';
7
8 describe('VnfSearch - Shallow render of component', () => {
9   let wrapper;
10   const vnfFilters = {};
11   const vnfVisualizationPanelClass = 'collapsible-panel-main-panel';
12   const unifiedFilterValues = {};
13
14   beforeEach( () => {
15     wrapper = shallow(
16       <vnfSearch
17         vnfFilters={vnfFilters}
18         unifiedFilterValues={unifiedFilterValues}
19         vnfVisualizationPanelClass={vnfVisualizationPanelClass}
20       />
21     );
22   })
23
24   it('Render basic component', () => {
25     expect(wrapper.length).toEqual(1);
26   });
27 })
28 //
29 // describe('VnfSearch - Render React Component (wrapped in <Provider>)', () => {
30 //   const initialState = {
31 //     vnfSearch: {}
32 //   };
33 //   const mockStore = configureStore();
34 //   let store, wrapper;
35 //
36 //   beforeEach( () => {
37 //     store = mockStore(initialState);
38 //     wrapper = mount(<Provider store={store}><ConnectedVnfSearch /></Provider>);
39 //   })
40 //
41 //   it('Render the connected component', () => {
42 //     expect(wrapper.find(ConnectedVnfSearch).length).toEqual(1);
43 //   });
44 //
45 //   it('Validate props from store', () => {
46 //     expect(wrapper.find(VnfSearchNfRoleVisualization).props().enableBusyFeedback).toEqual(initialState.vnfSearch.enableBusyFeedback);
47 //     expect(wrapper.find(VnfSearchNfRoleVisualization).props().processedNfRoleCountChartData).toEqual(initialState.vnfSearch.processedNfRoleCountChartData);
48 //   });
49 // })

© 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