1 import React from 'react';
2 import { shallow, mount } from 'enzyme';
3 import {Provider} from 'react-redux';
4 import configureStore from 'redux-mock-store';
6 import ConnectedVnfSearch, { vnfSearch } from 'app/vnfSearch/VnfSearch.jsx';
8 describe('VnfSearch - Shallow render of component', () => {
10 const vnfFilters = {};
11 const vnfVisualizationPanelClass = 'collapsible-panel-main-panel';
12 const unifiedFilterValues = {};
17 vnfFilters={vnfFilters}
18 unifiedFilterValues={unifiedFilterValues}
19 vnfVisualizationPanelClass={vnfVisualizationPanelClass}
24 it('Render basic component', () => {
25 expect(wrapper.length).toEqual(1);
29 // describe('VnfSearch - Render React Component (wrapped in <Provider>)', () => {
30 // const initialState = {
33 // const mockStore = configureStore();
34 // let store, wrapper;
36 // beforeEach( () => {
37 // store = mockStore(initialState);
38 // wrapper = mount(<Provider store={store}><ConnectedVnfSearch /></Provider>);
41 // it('Render the connected component', () => {
42 // expect(wrapper.find(ConnectedVnfSearch).length).toEqual(1);
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);