2 * Copyright © 2016-2017 European Support Limited
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 import React from 'react';
18 import TestUtils from 'react-dom/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';
23 describe('Heat Setup View test: ', function () {
24 it('should mapper exist', () => {
25 expect(mapStateToProps).toBeTruthy();
28 it('should mapper return basic data', () => {
30 const store = storeCreator();
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);
40 it('view test', () => {
42 const store = storeCreator();
44 var params = mapStateToProps(store.getState());
46 let heatSetupView = TestUtils.renderIntoDocument(<HeatSetupView {...params}/>);
47 expect(heatSetupView).toBeTruthy();