diff options
author | Arul.Nambi <arul.nambi@amdocs.com> | 2018-07-11 14:19:41 -0400 |
---|---|---|
committer | Arul.Nambi <arul.nambi@amdocs.com> | 2018-07-16 10:04:10 -0400 |
commit | 75597ac2b51ba62bee33f72a7b55a549cf43a16f (patch) | |
tree | 9e9b6826a51abbdd011e5449c4812e8cca6d58a1 /test/vnfSearch/VnfSearch.test.js | |
parent | 4cbfb73eebc578c62ff38c82f969782e229ce969 (diff) |
Refactoring test scripts
Moving the test scripts under one folder and restucting them so that the
clutter can be avoided in the src folder.
Issue-ID: AAI-1371
Change-Id: I41b34acbe79a7a3409f2990f11492614f7ef9c5a
Signed-off-by: Arul.Nambi <arul.nambi@amdocs.com>
Diffstat (limited to 'test/vnfSearch/VnfSearch.test.js')
-rw-r--r-- | test/vnfSearch/VnfSearch.test.js | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/test/vnfSearch/VnfSearch.test.js b/test/vnfSearch/VnfSearch.test.js new file mode 100644 index 0000000..3875543 --- /dev/null +++ b/test/vnfSearch/VnfSearch.test.js @@ -0,0 +1,49 @@ +import React from 'react'; +import { shallow, mount } from 'enzyme'; +import {Provider} from 'react-redux'; +import configureStore from 'redux-mock-store'; + +import ConnectedVnfSearch, { vnfSearch } from 'app/vnfSearch/VnfSearch.jsx'; + +describe('VnfSearch - Shallow render of component', () => { + let wrapper; + const vnfFilters = {}; + const vnfVisualizationPanelClass = 'collapsible-panel-main-panel'; + const unifiedFilterValues = {}; + + beforeEach( () => { + wrapper = shallow( + <vnfSearch + vnfFilters={vnfFilters} + unifiedFilterValues={unifiedFilterValues} + vnfVisualizationPanelClass={vnfVisualizationPanelClass} + /> + ); + }) + + it('Render basic component', () => { + expect(wrapper.length).toEqual(1); + }); +}) +// +// describe('VnfSearch - Render React Component (wrapped in <Provider>)', () => { +// const initialState = { +// vnfSearch: {} +// }; +// const mockStore = configureStore(); +// let store, wrapper; +// +// beforeEach( () => { +// store = mockStore(initialState); +// wrapper = mount(<Provider store={store}><ConnectedVnfSearch /></Provider>); +// }) +// +// it('Render the connected component', () => { +// expect(wrapper.find(ConnectedVnfSearch).length).toEqual(1); +// }); +// +// it('Validate props from store', () => { +// expect(wrapper.find(VnfSearchNfRoleVisualization).props().enableBusyFeedback).toEqual(initialState.vnfSearch.enableBusyFeedback); +// expect(wrapper.find(VnfSearchNfRoleVisualization).props().processedNfRoleCountChartData).toEqual(initialState.vnfSearch.processedNfRoleCountChartData); +// }); +// }) |