aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-model-lib/pom.xml.versionsBackup
diff options
context:
space:
mode:
authorAvi Ziv <AVIZI@amdocs.com>2017-07-26 17:37:57 +0300
committerAvi Ziv <avi.ziv@amdocs.com>2017-07-26 18:27:22 +0300
commit61070c9c6b665fdea79b3ccdfeafc3a6b50d262e (patch)
treedfe9c169cfac91d6c72ac9ff23375f2aafac6405 /openecomp-be/lib/openecomp-sdc-model-lib/pom.xml.versionsBackup
parentb824a997e19f6ee9627cb1b1e124c756bd8183fc (diff)
[SDC] Full OnBoard health-check and NFoD support
Change-Id: I606f8a52c7e6d2bd5558f824957d890e552c5423 Signed-off-by: Avi Ziv <avi.ziv@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-model-lib/pom.xml.versionsBackup')
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/pom.xml.versionsBackup44
1 files changed, 0 insertions, 44 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/pom.xml.versionsBackup b/openecomp-be/lib/openecomp-sdc-model-lib/pom.xml.versionsBackup
deleted file mode 100644
index d49cbd7069..0000000000
--- a/openecomp-be/lib/openecomp-sdc-model-lib/pom.xml.versionsBackup
+++ /dev/null
@@ -1,44 +0,0 @@
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://maven.apache.org/POM/4.0.0"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <name>openecomp-sdc-model-lib</name>
- <artifactId>openecomp-sdc-model-lib</artifactId>
-
- <packaging>pom</packaging>
- <parent>
- <artifactId>openecomp-sdc-lib</artifactId>
- <groupId>org.openecomp.sdc</groupId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <modules>
- <module>openecomp-sdc-model-api</module>
- <module>openecomp-sdc-model-core</module>
- <module>openecomp-sdc-model-impl</module>
- </modules>
-
- <dependencies>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-model-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-model-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-model-impl</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!--dependency>
- <groupId>org.openecomp.core</groupId>
- <artifactId>openecomp-common-lib</artifactId>
- <version>${project.version}</version>
- </dependency-->
- </dependencies>
-</project> \ No newline at end of file
lor: #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 © 2016-2017 European Support Limited
 *
 * 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 {defaultStoreFactory} from 'test-utils/factories/onboard/OnboardingCatalogFactories.js';
import {FinalizedLicenseModelFactory} from 'test-utils/factories/licenseModel/LicenseModelFactories.js';
import {VSPEditorFactory} from 'test-utils/factories/softwareProduct/SoftwareProductEditorFactories.js';
import {mapStateToProps} from 'sdc-app/onboarding/onboard/Onboard.js';
import {catalogItemTypes} from 'sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogConstants.js';
import OnboardingCatalogView from 'sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx';
import VendorItem from 'sdc-app/onboarding/onboard/onboardingCatalog/VendorItem.jsx';
import VSPOverlay from 'sdc-app/onboarding/onboard/onboardingCatalog/VSPOverlay.jsx';
import CatalogItemDetails from 'sdc-app/onboarding/onboard/CatalogItemDetails.jsx';
import DetailsCatalogView from 'sdc-app/onboarding/onboard/DetailsCatalogView.jsx';

describe('OnBoarding Catalog test - View: ', function () {


	it('mapStateToProps mapper exists', () => {
		expect(mapStateToProps).toBeTruthy();
	});

	it('mapStateToProps data test', () => {

		const licenseModelList = FinalizedLicenseModelFactory.buildList(3);
		const softwareProductList = VSPEditorFactory.buildList(4);
		const data = defaultStoreFactory.build({licenseModelList, softwareProductList});

		var results = mapStateToProps(data);
		expect(results.softwareProductList).toBeTruthy();
		expect(results.licenseModelList).toBeTruthy();
		expect(results.activeTab).toBeTruthy();
		expect(results.licenseModelList.length).toEqual(3);
	});

	it('licenseModelList creating algorithm test', () => {

		const finalizedLicenseModelList = FinalizedLicenseModelFactory.buildList(3);
		const licenseModelList = FinalizedLicenseModelFactory.buildList(3);
		const finalizedSoftwareProductList = VSPEditorFactory.buildList(4, {vendorId: finalizedLicenseModelList[0].id});
		const softwareProductList = VSPEditorFactory.buildList(4, {vendorId: finalizedLicenseModelList[1].id});
		const data = defaultStoreFactory.build({licenseModelList, finalizedLicenseModelList, softwareProductList, finalizedSoftwareProductList});

		var results = mapStateToProps(data);
		expect(results.finalizedLicenseModelList[0].softwareProductList.length).toEqual(finalizedSoftwareProductList.length);
	});


	it('Catalog view test', () => {

		const dummyFunc = () => {};
		const licenseModelList = FinalizedLicenseModelFactory.buildList(3);
		const softwareProductList = VSPEditorFactory.buildList(4, {vendorId: licenseModelList[0].id});
		const data = defaultStoreFactory.build({licenseModelList, softwareProductList});

		const func = {
			onAddLicenseModelClick: dummyFunc,
			onAddSoftwareProductClick: dummyFunc,
			closeVspOverlay: dummyFunc,
			onVspOverlayChange: dummyFunc,
			onTabClick: dummyFunc,
			onSearch: dummyFunc,
			onSelectLicenseModel: dummyFunc,
			onSelectSoftwareProduct: dummyFunc,
			resetOnboardingCatalogStore: ''
		};

		let params = {...func, ...mapStateToProps(data)};
		let CatalogView = TestUtils.renderIntoDocument(<OnboardingCatalogView
			{...params}/>);
		expect(CatalogView).toBeTruthy();
	});

	it('VendorItem view test', () => {
		let vendor = FinalizedLicenseModelFactory.build();
		const dummyFunc = () => {};
		let params = {
			softwareProductList: VSPEditorFactory.buildList(4 ,{vendorId: vendor.id}),
			vendor,
			onSelectVSP: dummyFunc,
			shouldShowOverlay: false,
			onVendorSelect: dummyFunc,
			onAddVSP: dummyFunc,
			onVSPIconClick: dummyFunc,
		};

		let VendorItemView = TestUtils.renderIntoDocument(<VendorItem{...params}/>);
		expect(VendorItemView).toBeTruthy();
	});


	it('VSPOverlay view test', () => {

		let params = {
			VSPList: VSPEditorFactory.buildList(10 ,{vendorId: '1'}),
			onSelectVSP: () => {}
		};

		let VSPOverlayView = TestUtils.renderIntoDocument(<div><VSPOverlay {...params}/></div>);
		expect(VSPOverlayView).toBeTruthy();
	});

	it('CatalogItemDetails view test', () => {

		let params = {
			catalogItemData: FinalizedLicenseModelFactory.build(),
			onSelect: () => {},
			catalogItemTypeClass: catalogItemTypes.LICENSE_MODEL
		};

		let CatalogItemDetailsView = TestUtils.renderIntoDocument(<div><CatalogItemDetails {...params}/></div>);
		expect(CatalogItemDetailsView).toBeTruthy();
	});

	it('DetailsCatalogView view test', () => {

		let params = {
			VLMList: FinalizedLicenseModelFactory.buildList(3),
			VSPList:  VSPEditorFactory.buildList(4),
			onSelectVLM: () => {},
			onSelectVSP: () => {},
			onAddVLM: () => {},
			onAddVSP: () => {},
			filter: ''
		};

		let AllCatalog = TestUtils.renderIntoDocument(<DetailsCatalogView {...params}/>);
		expect(AllCatalog).toBeTruthy();
	});
});