From d2f5794e8565764e71e171e77ff0a548ad206b05 Mon Sep 17 00:00:00 2001 From: Einav Weiss Keidar Date: Wed, 14 Feb 2018 14:00:07 +0200 Subject: upgrade react framework Issue-ID: SDC-894 Change-Id: Iab219b465333d88c2679b01639e8bad6232750d9 Signed-off-by: einavk --- .../licenseModel/creation/LicenseModelCreation.test.js | 10 +++++----- .../featureGroups/LicenseModelFeatureGroupEditor.test.js | 8 ++++---- .../LicenseModelFeatureGroupListEditor.test.js | 8 ++++---- openecomp-ui/test/licenseModel/licenseAgreement/test.js | 4 ++-- .../overview/listItems/EntitlementPool.test.js | 8 ++++---- .../licenseModel/overview/listItems/FeatureGroup.test.js | 8 ++++---- .../overview/listItems/LicenseAgreement.test.js | 8 ++++---- .../overview/listItems/LicenseKeyGroup.test.js | 8 ++++---- .../licenseModel/overview/summary/SummaryCountList.test.js | 8 ++++---- .../licenseModel/overview/summary/VendorDataView.test.js | 8 ++++---- openecomp-ui/test/licenseModel/overview/views.test.js | 14 +++++++------- 11 files changed, 46 insertions(+), 46 deletions(-) (limited to 'openecomp-ui/test/licenseModel') 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( { 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( ); @@ -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( ); -- cgit 1.2.3-korg