summaryrefslogtreecommitdiffstats
path: root/test/vnfSearch/VnfSearch.test.js
blob: 38755436506a0c3758e30d7634cbf39770b7839c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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);
//   });
// })