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nt
jw1Tn0YuzxR3xQmFsfcXGCD5S540uQiwINZgk+NE2qzTJylShPnjUW6DvHnzdayy
oKJmlKasZ8NCpv9lHAu+eggAMCbV1MH1mZVJqiED0gaenQAFGRAjyL7507CW9iCX
jBEEWOITpBQXQAC8TsOTQB1cHqIHFOi0rmSoDKlnGXjmofD1u3r5PChLaz4PkvGu
6CSYkOojbNYUcL4ghbFgY+dsDReN9v7nF8TQa2Vgx5cBYqqYHlBXfT1p9PP581Q8
nWiSumRfQCwZzXdr7iUEKM3521GYKHLXfbs/aRtWAnd1ziHBpCuf
-----END CERTIFICATE-----
eight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*!
 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */

import React from 'react';
import TestUtils from 'react-addons-test-utils';
import {scryRenderedDOMComponentsWithTestId} from 'test-utils/Util.js';
import SummaryView from 'sdc-app/onboarding/licenseModel/overview/SummaryView.jsx';
import LicenseModelOverviewView from 'sdc-app/onboarding/licenseModel/overview/LicenseModelOverviewView.jsx';
import VLMListView from 'sdc-app/onboarding/licenseModel/overview/VLMListView.jsx';
import {selectedButton} from 'sdc-app/onboarding/licenseModel/overview/LicenseModelOverviewConstants.js';

import {FeatureGroupListItemFactory} from 'test-utils/factories/licenseModel/FeatureGroupFactories.js';
import {EntitlementPoolListItemFactory} from 'test-utils/factories/licenseModel/EntitlementPoolFactories.js';
import {LicenseKeyGroupListItemFactory} from 'test-utils/factories/licenseModel/LicenseKeyGroupFactories.js';
import {LicenseAgreementListItemFactory} from 'test-utils/factories/licenseModel/LicenseAgreementFactories.js';

describe('License Model Overview - View: ', function () {

	const lkgChild = LicenseKeyGroupListItemFactory.build();

	const epChild = EntitlementPoolListItemFactory.build();

	const baseFGData =  FeatureGroupListItemFactory.build({isCollapsed: false});
	const baseLAData =  LicenseAgreementListItemFactory.build({isCollapse: false});

	it('should render SummaryView', () => {
		var renderer = TestUtils.createRenderer();
		renderer.render(
			<SummaryView isReadOnly={false} />
		);
		let renderedOutput = renderer.getRenderOutput();
		expect(renderedOutput).toBeTruthy();
	});

	it('should render LicenseModelOverviewView', () => {
		let fgData = {...baseFGData};
		fgData.children = Array.of(epChild, lkgChild);
		let laData = {...baseLAData};
		laData.children = [fgData];

		const params = {
			licenseModelId: 'VLM1',
			isDisplayModal: false,
			modalHeader: undefined,
			licensingDataList: [laData],
			orphanDataList: [],
			selectedTab: selectedButton.VLM_LIST_VIEW,
			onTabSelect: () => {}
		};
		var renderer = TestUtils.createRenderer();
		renderer.render(
			<LicenseModelOverviewView {...params}/>
		);
		let renderedOutput = renderer.getRenderOutput();
		expect(renderedOutput).toBeTruthy();
	});


	it('should render empty VLMListView', () => {
		const listview = TestUtils.renderIntoDocument( <VLMListView /> );
		expect(listview).toBeTruthy();
		const elem = scryRenderedDOMComponentsWithTestId(listview,'vlm-list');
		expect(elem).toBeTruthy();
		expect(elem[0].children.length).toBe(0);
	});

	it('should render VLMListView with licenseAgreement', () => {
		const listview = TestUtils.renderIntoDocument( <VLMListView licensingDataList={[baseLAData]}/> );
		expect(listview).toBeTruthy();
		let elem = scryRenderedDOMComponentsWithTestId(listview,'vlm-list');
		expect(elem).toBeTruthy();
		expect(elem[0].children.length).toBe(1);
		elem = scryRenderedDOMComponentsWithTestId(listview,'vlm-list-la-item');
		expect(elem).toBeTruthy();
		expect(elem.length).toBe(1);
	});

	it('should render VLMListView with Feature Group', () => {
		let laData = {...baseLAData};
		laData.children = [baseFGData];
		const listview = TestUtils.renderIntoDocument( <VLMListView licensingDataList={[laData]}/> );
		expect(listview).toBeTruthy();
		const elem = scryRenderedDOMComponentsWithTestId(listview,'vlm-list-item-fg');
		expect(elem).toBeTruthy();
		expect(elem.length).toBe(1);
	});

	it('should render VLMListView with Entitlement Pool', () => {
		let fgData = {...baseFGData};
		fgData.children = [epChild];
		let laData = {...baseLAData};
		laData.children = [fgData];

		const listview = TestUtils.renderIntoDocument( <VLMListView licensingDataList={[laData]} showInUse={true} /> );
		expect(listview).toBeTruthy();
		const elem = scryRenderedDOMComponentsWithTestId(listview,'vlm-list-item-ep');
		expect(elem).toBeTruthy();
		expect(elem.length).toBe(1);
	});

	it('should render VLMListView with LicenseKeyGroup', () => {
		let fgData = {...baseFGData};
		fgData.children = [lkgChild];
		let laData = {...baseLAData};
		laData.children = [fgData];

		const listview = TestUtils.renderIntoDocument( <VLMListView licensingDataList={[laData]} showInUse={true} /> );
		expect(listview).toBeTruthy();
		const elem = scryRenderedDOMComponentsWithTestId(listview,'vlm-list-item-lkg');
		expect(elem).toBeTruthy();
		expect(elem.length).toBe(1);
	});

	it('should render VLMListView with all items', () => {
		let fgData = {...baseFGData};
		fgData.children = Array.of(epChild, lkgChild);
		let laData = {...baseLAData};
		laData.children = [fgData];

		const listview = TestUtils.renderIntoDocument( <VLMListView licensingDataList={[laData]} showInUse={true} /> );
		expect(listview).toBeTruthy();
		let elem = scryRenderedDOMComponentsWithTestId(listview,'vlm-list-item-fg');
		expect(elem).toBeTruthy();
		expect(elem.length).toBe(1);
		elem = scryRenderedDOMComponentsWithTestId(listview,'vlm-list-item-lkg');
		expect(elem).toBeTruthy();
		expect(elem.length).toBe(1);
		elem = scryRenderedDOMComponentsWithTestId(listview,'vlm-list-item-ep');
		expect(elem).toBeTruthy();
		expect(elem.length).toBe(1);
	});

	it('should update collapsing item', () => {
		let fgData = {...baseFGData};
		fgData.children = Array.of(epChild, lkgChild);
		let laData = {...baseLAData};
		laData.children = [fgData];

		var renderer = TestUtils.renderIntoDocument(
			<VLMListView licensingDataList={[laData]} showInUse={true}/>
		);
		expect(renderer).toBeTruthy();

		renderer.updateCollapsable(new Event('click'), 'LA1');
		expect(renderer.state['LA1']).toEqual(true);
	});
});