summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/test/licenseModel
diff options
context:
space:
mode:
authorEinav Weiss Keidar <EINAVW@amdocs.com>2018-02-14 14:00:07 +0200
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-02-15 10:38:31 +0000
commitd2f5794e8565764e71e171e77ff0a548ad206b05 (patch)
tree1b0de6b0fceb3ae4528827c8ef8422d866fa8220 /openecomp-ui/test/licenseModel
parent14592280a9791ca8e31a1581af04941fbb6f4794 (diff)
upgrade react framework
Issue-ID: SDC-894 Change-Id: Iab219b465333d88c2679b01639e8bad6232750d9 Signed-off-by: einavk <einavw@amdocs.com>
Diffstat (limited to 'openecomp-ui/test/licenseModel')
-rw-r--r--openecomp-ui/test/licenseModel/creation/LicenseModelCreation.test.js10
-rw-r--r--openecomp-ui/test/licenseModel/featureGroups/LicenseModelFeatureGroupEditor.test.js8
-rw-r--r--openecomp-ui/test/licenseModel/featureGroups/LicenseModelFeatureGroupListEditor.test.js8
-rw-r--r--openecomp-ui/test/licenseModel/licenseAgreement/test.js4
-rw-r--r--openecomp-ui/test/licenseModel/overview/listItems/EntitlementPool.test.js8
-rw-r--r--openecomp-ui/test/licenseModel/overview/listItems/FeatureGroup.test.js8
-rw-r--r--openecomp-ui/test/licenseModel/overview/listItems/LicenseAgreement.test.js8
-rw-r--r--openecomp-ui/test/licenseModel/overview/listItems/LicenseKeyGroup.test.js8
-rw-r--r--openecomp-ui/test/licenseModel/overview/summary/SummaryCountList.test.js8
-rw-r--r--openecomp-ui/test/licenseModel/overview/summary/VendorDataView.test.js8
-rw-r--r--openecomp-ui/test/licenseModel/overview/views.test.js14
11 files changed, 46 insertions, 46 deletions
diff --git a/openecomp-ui/test/licenseModel/creation/LicenseModelCreation.test.js b/openecomp-ui/test/licenseModel/creation/LicenseModelCreation.test.js
index 9537ea2e2f..a52d06baa3 100644
--- a/openecomp-ui/test/licenseModel/creation/LicenseModelCreation.test.js
+++ b/openecomp-ui/test/licenseModel/creation/LicenseModelCreation.test.js
@@ -1,12 +1,12 @@
/*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 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.
@@ -15,7 +15,7 @@
*/
import React from 'react';
-import TestUtils from 'react-addons-test-utils';
+import ShallowRenderer from 'react-test-renderer/shallow';
import {mapStateToProps } from 'sdc-app/onboarding/licenseModel/creation/LicenseModelCreation.js';
import LicenseModelCreationView from 'sdc-app/onboarding/licenseModel/creation/LicenseModelCreationView.jsx';
import {LicenseModelCreationFactory} from 'test-utils/factories/licenseModel/LicenseModelFactories.js';
@@ -66,7 +66,7 @@ describe('License Model Creation Module Tests', function() {
it('simple jsx test', () => {
let data = LicenseModelCreationFactory.build();
- var renderer = TestUtils.createRenderer();
+ const renderer = new ShallowRenderer();
renderer.render(
<LicenseModelCreationView
data={data}
diff --git a/openecomp-ui/test/licenseModel/featureGroups/LicenseModelFeatureGroupEditor.test.js b/openecomp-ui/test/licenseModel/featureGroups/LicenseModelFeatureGroupEditor.test.js
index da57b03658..f19ae0fe0c 100644
--- a/openecomp-ui/test/licenseModel/featureGroups/LicenseModelFeatureGroupEditor.test.js
+++ b/openecomp-ui/test/licenseModel/featureGroups/LicenseModelFeatureGroupEditor.test.js
@@ -1,12 +1,12 @@
/*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 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.
@@ -15,7 +15,7 @@
*/
import React from 'react';
-import TestUtils from 'react-addons-test-utils';
+import TestUtils from 'react-dom/test-utils';
import {mapStateToProps} from 'sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupEditor.js';
import FeatureGroupEditorView from 'sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupEditorView.jsx';
import {LicenseModelOverviewFactory} from 'test-utils/factories/licenseModel/LicenseModelFactories.js';
diff --git a/openecomp-ui/test/licenseModel/featureGroups/LicenseModelFeatureGroupListEditor.test.js b/openecomp-ui/test/licenseModel/featureGroups/LicenseModelFeatureGroupListEditor.test.js
index b9bb656c39..565b8a436b 100644
--- a/openecomp-ui/test/licenseModel/featureGroups/LicenseModelFeatureGroupListEditor.test.js
+++ b/openecomp-ui/test/licenseModel/featureGroups/LicenseModelFeatureGroupListEditor.test.js
@@ -1,12 +1,12 @@
/*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 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.
@@ -15,7 +15,7 @@
*/
import React from 'react';
-import TestUtils from 'react-addons-test-utils';
+import TestUtils from 'react-dom/test-utils';
import {mapStateToProps} from 'sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupListEditor.js';
import FeatureGroupsListEditorView from 'sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupListEditorView.jsx';
import { FeatureGroupStoreFactory } from 'test-utils/factories/licenseModel/FeatureGroupFactories.js';
diff --git a/openecomp-ui/test/licenseModel/licenseAgreement/test.js b/openecomp-ui/test/licenseModel/licenseAgreement/test.js
index 11dc7edde5..5a3dd17c6e 100644
--- a/openecomp-ui/test/licenseModel/licenseAgreement/test.js
+++ b/openecomp-ui/test/licenseModel/licenseAgreement/test.js
@@ -1,5 +1,5 @@
/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2016-2018 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.
@@ -122,7 +122,7 @@ describe('License Agreement Module Tests', () => {
isDirty: true
}
};
- const featureGroupsList = licenseAgreementList.featureGroupsIds;
+ const featureGroupsList = licenseAgreementList[0].featureGroupsIds;
let expectedStore = cloneAndSet(store.getState(), 'licenseModel.licenseAgreement.licenseAgreementList', [licenseAgreementAfterAdd]);
expectedStore = cloneAndSet(expectedStore, 'currentScreen.itemPermission', expectedCurrentScreenProps.itemPermission);
diff --git a/openecomp-ui/test/licenseModel/overview/listItems/EntitlementPool.test.js b/openecomp-ui/test/licenseModel/overview/listItems/EntitlementPool.test.js
index 319206f773..6d4053f749 100644
--- a/openecomp-ui/test/licenseModel/overview/listItems/EntitlementPool.test.js
+++ b/openecomp-ui/test/licenseModel/overview/listItems/EntitlementPool.test.js
@@ -1,12 +1,12 @@
/*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 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.
@@ -15,7 +15,7 @@
*/
import React from 'react';
-import TestUtils from 'react-addons-test-utils';
+import TestUtils from 'react-dom/test-utils';
import EntitlementPool from 'src/sdc-app/onboarding/licenseModel/overview/listItems/EntitlementPool.jsx';
import {EntitlementPoolListItemFactory} from 'test-utils/factories/licenseModel/EntitlementPoolFactories.js';
diff --git a/openecomp-ui/test/licenseModel/overview/listItems/FeatureGroup.test.js b/openecomp-ui/test/licenseModel/overview/listItems/FeatureGroup.test.js
index e2747e1a2b..3285f12ead 100644
--- a/openecomp-ui/test/licenseModel/overview/listItems/FeatureGroup.test.js
+++ b/openecomp-ui/test/licenseModel/overview/listItems/FeatureGroup.test.js
@@ -1,12 +1,12 @@
/*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 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.
@@ -15,7 +15,7 @@
*/
import React from 'react';
-import TestUtils from 'react-addons-test-utils';
+import TestUtils from 'react-dom/test-utils';
import FeatureGroup from 'src/sdc-app/onboarding/licenseModel/overview/listItems/FeatureGroup.jsx';
import {scryRenderedDOMComponentsWithTestId} from 'test-utils/Util.js';
import {FeatureGroupListItemFactory} from 'test-utils/factories/licenseModel/FeatureGroupFactories.js';
diff --git a/openecomp-ui/test/licenseModel/overview/listItems/LicenseAgreement.test.js b/openecomp-ui/test/licenseModel/overview/listItems/LicenseAgreement.test.js
index 84ce90f30f..edbcbeb0c0 100644
--- a/openecomp-ui/test/licenseModel/overview/listItems/LicenseAgreement.test.js
+++ b/openecomp-ui/test/licenseModel/overview/listItems/LicenseAgreement.test.js
@@ -1,12 +1,12 @@
/*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 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.
@@ -15,7 +15,7 @@
*/
import React from 'react';
-import TestUtils from 'react-addons-test-utils';
+import TestUtils from 'react-dom/test-utils';
import LicenseAgreement from 'src/sdc-app/onboarding/licenseModel/overview/listItems/LicenseAgreement.jsx';
import {scryRenderedDOMComponentsWithTestId} from 'test-utils/Util.js';
import {LicenseAgreementListItemFactory} from 'test-utils/factories/licenseModel/LicenseAgreementFactories.js';
diff --git a/openecomp-ui/test/licenseModel/overview/listItems/LicenseKeyGroup.test.js b/openecomp-ui/test/licenseModel/overview/listItems/LicenseKeyGroup.test.js
index 9f0f1513d4..a714adf269 100644
--- a/openecomp-ui/test/licenseModel/overview/listItems/LicenseKeyGroup.test.js
+++ b/openecomp-ui/test/licenseModel/overview/listItems/LicenseKeyGroup.test.js
@@ -1,12 +1,12 @@
/*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 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.
@@ -15,7 +15,7 @@
*/
import React from 'react';
-import TestUtils from 'react-addons-test-utils';
+import TestUtils from 'react-dom/test-utils';
import LicenseKeyGroup from 'src/sdc-app/onboarding/licenseModel/overview/listItems/LicenseKeyGroup.jsx';
import {LicenseKeyGroupListItemFactory} from 'test-utils/factories/licenseModel/LicenseKeyGroupFactories.js';
diff --git a/openecomp-ui/test/licenseModel/overview/summary/SummaryCountList.test.js b/openecomp-ui/test/licenseModel/overview/summary/SummaryCountList.test.js
index 03159f7ab7..903b297729 100644
--- a/openecomp-ui/test/licenseModel/overview/summary/SummaryCountList.test.js
+++ b/openecomp-ui/test/licenseModel/overview/summary/SummaryCountList.test.js
@@ -1,12 +1,12 @@
/*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 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.
@@ -15,7 +15,7 @@
*/
import React from 'react';
-import TestUtils from 'react-addons-test-utils';
+import TestUtils from 'react-dom/test-utils';
import {mapStateToProps, SummaryCountList} from 'sdc-app/onboarding/licenseModel/overview/summary/SummaryCountList.js';
import LicenseModelDescriptionEdit from 'sdc-app/onboarding/licenseModel/overview/summary/LicenseModelDescriptionEdit.jsx';
diff --git a/openecomp-ui/test/licenseModel/overview/summary/VendorDataView.test.js b/openecomp-ui/test/licenseModel/overview/summary/VendorDataView.test.js
index dd5fa5a605..2bc035ab92 100644
--- a/openecomp-ui/test/licenseModel/overview/summary/VendorDataView.test.js
+++ b/openecomp-ui/test/licenseModel/overview/summary/VendorDataView.test.js
@@ -1,12 +1,12 @@
/*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 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.
@@ -15,7 +15,7 @@
*/
import React from 'react';
-import TestUtils from 'react-addons-test-utils';
+import TestUtils from 'react-dom/test-utils';
import {mapStateToProps, VendorDataView} from 'sdc-app/onboarding/licenseModel/overview/summary/VendorDataView.js';
import {LicenseModelOverviewFactory, LicenseModelStoreFactory} from 'test-utils/factories/licenseModel/LicenseModelFactories.js';
diff --git a/openecomp-ui/test/licenseModel/overview/views.test.js b/openecomp-ui/test/licenseModel/overview/views.test.js
index 20b733d64e..ec1d81e7af 100644
--- a/openecomp-ui/test/licenseModel/overview/views.test.js
+++ b/openecomp-ui/test/licenseModel/overview/views.test.js
@@ -1,12 +1,12 @@
/*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 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.
@@ -15,8 +15,8 @@
*/
import React from 'react';
-
-import TestUtils from 'react-addons-test-utils';
+import ShallowRenderer from 'react-test-renderer/shallow';
+import TestUtils from 'react-dom/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';
@@ -38,7 +38,7 @@ describe('License Model Overview - View: ', function () {
const baseLAData = LicenseAgreementListItemFactory.build({isCollapse: false});
it('should render SummaryView', () => {
- var renderer = TestUtils.createRenderer();
+ const renderer = new ShallowRenderer();
renderer.render(
<SummaryView isReadOnly={false} />
);
@@ -61,7 +61,7 @@ describe('License Model Overview - View: ', function () {
selectedTab: selectedButton.VLM_LIST_VIEW,
onTabSelect: () => {}
};
- var renderer = TestUtils.createRenderer();
+ const renderer = new ShallowRenderer();
renderer.render(
<LicenseModelOverviewView {...params}/>
);