react-version-downgrade
[sdc.git] / openecomp-ui / test / softwareProduct / attachments / setup / heatSetup.test.js
1 /*
2  * Copyright © 2016-2017 European Support Limited
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  * 
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  * 
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 import React from 'react';
17
18 import TestUtils from 'react-addons-test-utils';
19 import {mapStateToProps} from 'sdc-app/onboarding/softwareProduct/attachments/setup/HeatSetup.js';
20 import HeatSetupView from 'sdc-app/onboarding/softwareProduct/attachments/setup/HeatSetupView.jsx';
21 import {storeCreator} from 'sdc-app/AppStore.js';
22
23 describe('Heat Setup View test: ', function () {
24         it('should mapper exist', () => {
25                 expect(mapStateToProps).toBeTruthy();
26         });
27
28         it('should mapper return basic data', () => {
29
30                 const store = storeCreator();
31
32                 var result = mapStateToProps(store.getState());
33                 expect(result).toBeTruthy();
34                 expect(result.modules.length).toEqual(0);
35                 expect(result.unassigned.length).toEqual(0);
36                 expect(result.artifacts.length).toEqual(0);
37                 expect(result.nested.length).toEqual(0);
38         });
39
40         it('view test', () => {
41
42                 const store = storeCreator();
43
44                 var params = mapStateToProps(store.getState());
45
46                 let heatSetupView = TestUtils.renderIntoDocument(<HeatSetupView {...params}/>);
47                 expect(heatSetupView).toBeTruthy();
48         });
49 });