From 1eb66b78d3b1f1fc60a82ce6dbd16b12f2845e9a Mon Sep 17 00:00:00 2001 From: svishnev Date: Thu, 11 Jan 2018 14:39:45 +0200 Subject: React version upgrade Issue-ID: SDC-894 Change-Id: I7c200a4b0b1d09a8fec638906db4258cafe252b5 Signed-off-by: svishnev --- openecomp-ui/test/flows/FlowsListEditor.test.js | 24 +++++++------- openecomp-ui/test/flows/flowsEditorModal.test.js | 22 ++++++------- .../creation/LicenseModelCreation.test.js | 20 ++++++------ .../LicenseModelFeatureGroupEditor.test.js | 18 +++++------ .../LicenseModelFeatureGroupListEditor.test.js | 18 +++++------ .../overview/listItems/EntitlementPool.test.js | 18 +++++------ .../overview/listItems/FeatureGroup.test.js | 18 +++++------ .../overview/listItems/LicenseAgreement.test.js | 18 +++++------ .../overview/listItems/LicenseKeyGroup.test.js | 18 +++++------ .../overview/summary/SummaryCountList.test.js | 18 +++++------ .../overview/summary/VendorDataView.test.js | 18 +++++------ .../test/licenseModel/overview/views.test.js | 23 +++++++------- .../nfvo-components/SubmitErrorResponse.test.js | 18 +++++------ .../nfvo-components/editor/TabulatedEditor.test.js | 21 ++++++------ .../input/dualListBox/dualListbox.test.js | 21 ++++++------ .../nfvo-components/input/validation/input.test.js | 26 ++++++++------- .../nfvo-components/listEditor/listEditor.test.js | 18 +++++------ .../test/nfvo-components/modal/globalModal.test.js | 37 +++++++++++----------- .../VersionController/versionController.test.js | 22 ++++++------- .../test/onboard/onboardingCatalog/views.test.js | 18 +++++------ .../test/permissions/permissionsManaager.test.js | 20 ++++++------ openecomp-ui/test/revisions/revisions.test.js | 20 ++++++------ .../SoftwareProductAttachmentsView.test.js | 21 ++++++------ .../attachments/setup/heatSetup.test.js | 18 +++++------ .../validation/HeatValidationView.test.js | 20 ++++++------ .../SoftwareProductComponentComputeEditor.test.js | 20 ++++++------ .../SoftwareProductComponentsComputes.test.js | 20 ++++++------ .../SoftwareProductComponentsGeneral.test.js | 20 ++++++------ .../softwareProductComponentLoadbalancing.test.js | 20 ++++++------ .../SoftwareProductComponentsMonitoring.test.js | 23 +++++++------- .../SoftwareProductComponentsNICEditor.test.js | 22 +++++++------ .../SoftwareProductComponentsNetwork.test.js | 20 ++++++------ ...oftwareProductComponentsProcessesEditor.test.js | 18 +++++------ .../SoftwareProductComponentsProcessesView.test.js | 35 ++++++++++---------- .../creation/SoftwareProductCreation.test.js | 22 ++++++------- .../SoftwareProductDeploymentEditor.test.js | 21 ++++++------ .../SoftwareProductDeploymentView.test.js | 20 ++++++------ .../softwareProduct/details/detailsView.test.js | 21 ++++++------ .../landingPage/landingPage.test.js | 24 +++++++------- .../networks/SoftwareProductNetworksView.test.js | 20 ++++++------ .../processes/SoftwareProductEditor.test.js | 18 +++++------ .../processes/SoftwareProductProcessesView.test.js | 34 ++++++++++---------- .../test/versionsPage/VersionsPage.test.js | 20 ++++++------ .../creation/VersionsPageCreation.test.js | 22 ++++++------- 44 files changed, 470 insertions(+), 463 deletions(-) (limited to 'openecomp-ui/test') diff --git a/openecomp-ui/test/flows/FlowsListEditor.test.js b/openecomp-ui/test/flows/FlowsListEditor.test.js index 007b137ab0..5b57e8b2c1 100644 --- a/openecomp-ui/test/flows/FlowsListEditor.test.js +++ b/openecomp-ui/test/flows/FlowsListEditor.test.js @@ -1,21 +1,21 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 ShallowRenderer from 'react-test-renderer/shallow'; import {mapStateToProps} from 'sdc-app/flows/FlowsListEditor.js'; import FlowsListEditorView from 'sdc-app/flows/FlowsListEditorView.jsx'; @@ -113,7 +113,7 @@ describe('Flows List Editor Mapper and View Classes: ', function () { }); it('basic view component run with empty flowList and should show the list', () => { - let renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); let currentFlow = FlowBasicFactory.build(); renderer.render(); let renderedOutput = renderer.getRenderOutput(); @@ -122,14 +122,14 @@ describe('Flows List Editor Mapper and View Classes: ', function () { it('basic view component run with empty flowList and should show the diagram', () => { const flow = FlowUpdateRequestFactory.build(); - let renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render(); let renderedOutput = renderer.getRenderOutput(); expect(renderedOutput).toBeTruthy(); }); it('basic view component run with empty flowList and should show popup modal', () => { - let renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); let currentFlow = FlowBasicFactory.build(); renderer.render(); let renderedOutput = renderer.getRenderOutput(); diff --git a/openecomp-ui/test/flows/flowsEditorModal.test.js b/openecomp-ui/test/flows/flowsEditorModal.test.js index 8371432032..cc6525fd46 100644 --- a/openecomp-ui/test/flows/flowsEditorModal.test.js +++ b/openecomp-ui/test/flows/flowsEditorModal.test.js @@ -1,24 +1,24 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 TestUtils from 'react-dom/test-utils'; import {mapStateToProps} from 'sdc-app/flows/FlowsEditorModal.js'; import FlowsEditorModalView from 'sdc-app/flows/FlowsEditorModalView.jsx'; - +import ShallowRenderer from 'react-test-renderer/shallow'; import {FlowBasicFactory} from 'test-utils/factories/flows/FlowsFactories.js'; describe('Flows Editor Modal Mapper and View Classes: ', function () { @@ -54,7 +54,7 @@ describe('Flows Editor Modal Mapper and View Classes: ', function () { }); it('basic modal view component run with empty artifact', () => { - let renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render( {}} diff --git a/openecomp-ui/test/licenseModel/creation/LicenseModelCreation.test.js b/openecomp-ui/test/licenseModel/creation/LicenseModelCreation.test.js index 935360b04b..9c8043b943 100644 --- a/openecomp-ui/test/licenseModel/creation/LicenseModelCreation.test.js +++ b/openecomp-ui/test/licenseModel/creation/LicenseModelCreation.test.js @@ -1,21 +1,21 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 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( { - var renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render( ); @@ -60,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( ); diff --git a/openecomp-ui/test/nfvo-components/SubmitErrorResponse.test.js b/openecomp-ui/test/nfvo-components/SubmitErrorResponse.test.js index 7231fe4abc..ecb7159ee5 100644 --- a/openecomp-ui/test/nfvo-components/SubmitErrorResponse.test.js +++ b/openecomp-ui/test/nfvo-components/SubmitErrorResponse.test.js @@ -1,22 +1,22 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 TestUtils from 'react-dom/test-utils'; import SubmitErrorResponse from 'nfvo-components/SubmitErrorResponse.jsx'; import {SubmitErrorMessageFactory} from 'test-utils/factories/SubnitErrorMessageFactorie.js'; diff --git a/openecomp-ui/test/nfvo-components/editor/TabulatedEditor.test.js b/openecomp-ui/test/nfvo-components/editor/TabulatedEditor.test.js index 5f9f06b714..505bc91636 100644 --- a/openecomp-ui/test/nfvo-components/editor/TabulatedEditor.test.js +++ b/openecomp-ui/test/nfvo-components/editor/TabulatedEditor.test.js @@ -1,22 +1,23 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 ShallowRenderer from 'react-test-renderer/shallow'; +import TestUtils from 'react-dom/test-utils'; import TabulatedEditor from 'nfvo-components/editor/TabulatedEditor.jsx'; import { Provider } from 'react-redux'; import {storeCreator} from 'sdc-app/AppStore.js'; @@ -24,7 +25,7 @@ import {storeCreator} from 'sdc-app/AppStore.js'; describe('Tabulated Editor test: ', function () { const store = storeCreator(); it('basic view test', () => { - let renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render( ); diff --git a/openecomp-ui/test/nfvo-components/input/dualListBox/dualListbox.test.js b/openecomp-ui/test/nfvo-components/input/dualListBox/dualListbox.test.js index c578178d35..2df15c61b1 100644 --- a/openecomp-ui/test/nfvo-components/input/dualListBox/dualListbox.test.js +++ b/openecomp-ui/test/nfvo-components/input/dualListBox/dualListbox.test.js @@ -1,22 +1,23 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 TestUtils from 'react-dom/test-utils'; import DualListboxView from 'nfvo-components/input/dualListbox/DualListboxView.jsx'; +import ShallowRenderer from 'react-test-renderer/shallow'; const ITEMS = [{id: '1', name: 'aaa'}, {id: '2', name: 'bbb'}, {id: '3', name: 'ccc'}]; @@ -24,7 +25,7 @@ describe('dualListBox Module Tests', function () { it('should render basically', () => { - var renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render({}}/>); var renderedOutput = renderer.getRenderOutput(); expect(renderedOutput).toBeTruthy(); diff --git a/openecomp-ui/test/nfvo-components/input/validation/input.test.js b/openecomp-ui/test/nfvo-components/input/validation/input.test.js index 7743483603..719e01fb97 100644 --- a/openecomp-ui/test/nfvo-components/input/validation/input.test.js +++ b/openecomp-ui/test/nfvo-components/input/validation/input.test.js @@ -1,24 +1,25 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 TestUtils from 'react-dom/test-utils'; import {scryRenderedDOMComponentsWithTestId} from 'test-utils/Util.js'; import Input from 'nfvo-components/input/validation/Input.jsx'; import Overlay from 'react-bootstrap/lib/Overlay.js'; +import {shallow} from 'enzyme'; describe('Input', function () { it('should render with type text', () => { @@ -72,10 +73,11 @@ describe('Input', function () { }); it('should render error overlay when invalid', () => { - let renderedOutput = TestUtils.renderIntoDocument(); - const elem = TestUtils.findRenderedComponentWithType(renderedOutput,Overlay); + const elem = shallow(); expect(elem).toBeTruthy(); - expect(elem.props.show).toBe(true); + const overlay = elem.find(Overlay); + expect(overlay).toBeTruthy(); + expect(overlay.props().show).toBe(true); }); it('should not render error overlay when valid', () => { diff --git a/openecomp-ui/test/nfvo-components/listEditor/listEditor.test.js b/openecomp-ui/test/nfvo-components/listEditor/listEditor.test.js index b1127386f7..a0c1c9978c 100644 --- a/openecomp-ui/test/nfvo-components/listEditor/listEditor.test.js +++ b/openecomp-ui/test/nfvo-components/listEditor/listEditor.test.js @@ -1,22 +1,22 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 {mount} from 'enzyme'; -import TestUtils from 'react-addons-test-utils'; +import TestUtils from 'react-dom/test-utils'; import ListEditorView from 'src/nfvo-components/listEditor/ListEditorView.jsx'; import ListEditorItemView from 'src/nfvo-components/listEditor/ListEditorItemView.jsx'; diff --git a/openecomp-ui/test/nfvo-components/modal/globalModal.test.js b/openecomp-ui/test/nfvo-components/modal/globalModal.test.js index f27b1359f8..0636aed6e1 100644 --- a/openecomp-ui/test/nfvo-components/modal/globalModal.test.js +++ b/openecomp-ui/test/nfvo-components/modal/globalModal.test.js @@ -1,22 +1,22 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 GlobalModal, {GlobalModalView, mapStateToProps} from 'src/nfvo-components/modal/GlobalModal.js'; import React from 'react'; -import TestUtils from 'react-addons-test-utils'; +import ShallowRenderer from 'react-test-renderer/shallow'; import store from 'sdc-app/AppStore.js'; import {actionTypes, typeEnum} from 'src/nfvo-components/modal/GlobalModalConstants.js'; @@ -31,7 +31,7 @@ describe('Global Modal tests: ', function () { it ('mapStateToProps should return show as true', () => { let state = { modal: { - type: '' + type: '' } }; let props = mapStateToProps(state); @@ -49,15 +49,15 @@ describe('Global Modal tests: ', function () { const modal = store.getState().modal; expect(modal).toBeTruthy(); expect(modal.title).toBe(title); - expect(modal.msg).toBe(msg); + expect(modal.msg).toBe(msg); }); it('global modal should show with type success with connected component', () => { store.dispatch({type: actionTypes.GLOBAL_MODAL_SHOW, data: {title, msg}}); expect(store.getState().modal).toBeTruthy(); - - let renderer = TestUtils.createRenderer(); + + const renderer = new ShallowRenderer(); renderer.render(); let renderedOutput = renderer.getRenderOutput(); expect(renderedOutput).toBeTruthy(); @@ -67,10 +67,9 @@ describe('Global Modal tests: ', function () { it('global modal should show with type success with connected component and closed after', () => { store.dispatch({type: actionTypes.GLOBAL_MODAL_SHOW, data: {title, msg}}); - + expect(store.getState().modal).toBeTruthy(); - - let renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render(); let renderedOutput = renderer.getRenderOutput(); expect(renderedOutput).toBeTruthy(); @@ -82,11 +81,11 @@ describe('Global Modal tests: ', function () { it('checking component default render', ()=> { expect(window.document).toBeTruthy(); - let renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render({}} />); - let globalModalView = renderer.getRenderOutput(); + const globalModalView = renderer.getRenderOutput(); expect(globalModalView).toBeTruthy(); - }); +}); }); diff --git a/openecomp-ui/test/nfvo-components/panel/VersionController/versionController.test.js b/openecomp-ui/test/nfvo-components/panel/VersionController/versionController.test.js index f2db01f3f1..64304ab9de 100644 --- a/openecomp-ui/test/nfvo-components/panel/VersionController/versionController.test.js +++ b/openecomp-ui/test/nfvo-components/panel/VersionController/versionController.test.js @@ -1,23 +1,23 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 ShallowRenderer from 'react-test-renderer/shallow'; +import TestUtils from 'react-dom/test-utils'; import VersionController from 'nfvo-components/panel/versionController/VersionController.jsx'; import {actionsEnum} from 'nfvo-components/panel/versionController/VersionControllerConstants.js'; import {scryRenderedDOMComponentsWithTestId} from 'test-utils/Util.js'; @@ -36,7 +36,7 @@ describe('versionController UI Component', () => { const store = storeCreator(); it('function does exist', () => { - var renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render(); var renderedOutput = renderer.getRenderOutput(); diff --git a/openecomp-ui/test/onboard/onboardingCatalog/views.test.js b/openecomp-ui/test/onboard/onboardingCatalog/views.test.js index fedd25b160..9b9a0b7301 100644 --- a/openecomp-ui/test/onboard/onboardingCatalog/views.test.js +++ b/openecomp-ui/test/onboard/onboardingCatalog/views.test.js @@ -1,21 +1,21 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 TestUtils from 'react-dom/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'; diff --git a/openecomp-ui/test/permissions/permissionsManaager.test.js b/openecomp-ui/test/permissions/permissionsManaager.test.js index 2d880c7ce0..d835276fd1 100644 --- a/openecomp-ui/test/permissions/permissionsManaager.test.js +++ b/openecomp-ui/test/permissions/permissionsManaager.test.js @@ -1,21 +1,21 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 TestUtils from 'react-dom/test-utils'; import {UserFactory} from 'test-utils/factories/users/UsersFactories.js'; import {mapStateToProps} from 'sdc-app/onboarding/permissions/PermissionsManager.js'; @@ -107,4 +107,4 @@ describe('Manage Permissions: ', function () { -}); \ No newline at end of file +}); diff --git a/openecomp-ui/test/revisions/revisions.test.js b/openecomp-ui/test/revisions/revisions.test.js index 1b5f35c9db..73650f2635 100644 --- a/openecomp-ui/test/revisions/revisions.test.js +++ b/openecomp-ui/test/revisions/revisions.test.js @@ -1,21 +1,21 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 TestUtils from 'react-dom/test-utils'; import {scryRenderedDOMComponentsWithTestId} from 'test-utils/Util.js'; import deepFreeze from 'deep-freeze'; import mockRest from 'test-utils/MockRest.js'; @@ -31,7 +31,7 @@ import {RevisionsPagePropsFactory} from 'test-utils/factories/revisions/Revision import {UserFactory} from 'test-utils/factories/users/UsersFactories.js'; import VersionFactory from 'test-utils/factories/common/VersionFactory.js'; import {screenTypes} from 'sdc-app/onboarding/OnboardingConstants.js'; -import ReactTestUtils from 'react-addons-test-utils'; +import ReactTestUtils from 'react-dom/test-utils'; import {enums} from 'sdc-app/onboarding/OnboardingConstants.js'; const state = {}; diff --git a/openecomp-ui/test/softwareProduct/attachments/SoftwareProductAttachmentsView.test.js b/openecomp-ui/test/softwareProduct/attachments/SoftwareProductAttachmentsView.test.js index 355a3162b1..f610f6d298 100644 --- a/openecomp-ui/test/softwareProduct/attachments/SoftwareProductAttachmentsView.test.js +++ b/openecomp-ui/test/softwareProduct/attachments/SoftwareProductAttachmentsView.test.js @@ -1,21 +1,22 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 ShallowRenderer from 'react-test-renderer/shallow'; +import TestUtils from 'react-dom/test-utils'; import {VSPAttachmentTreeNodeWithChildrenFactory, VSPAttachmentDetailedError} from 'test-utils/factories/softwareProduct/SoftwareProductAttachmentsFactories.js'; import {defaultStoreFactory} from 'test-utils/factories/onboard/OnboardingCatalogFactories.js'; @@ -68,7 +69,7 @@ describe('SoftwareProduct Attachments - View: ', function () { let data = defaultStoreFactory.build({softwareProduct: {softwareProductAttachments, softwareProductEditor: {data: {...versionControllerData}}}}); var params = mapStateToProps(data); - var renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render(); var renderedOutput = renderer.getRenderOutput(); expect(renderedOutput).toBeTruthy(); diff --git a/openecomp-ui/test/softwareProduct/attachments/setup/heatSetup.test.js b/openecomp-ui/test/softwareProduct/attachments/setup/heatSetup.test.js index 80e9401f1a..97df10f4aa 100644 --- a/openecomp-ui/test/softwareProduct/attachments/setup/heatSetup.test.js +++ b/openecomp-ui/test/softwareProduct/attachments/setup/heatSetup.test.js @@ -1,21 +1,21 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 TestUtils from 'react-dom/test-utils'; import {mapStateToProps} from 'sdc-app/onboarding/softwareProduct/attachments/setup/HeatSetup.js'; import HeatSetupView from 'sdc-app/onboarding/softwareProduct/attachments/setup/HeatSetupView.jsx'; import {storeCreator} from 'sdc-app/AppStore.js'; diff --git a/openecomp-ui/test/softwareProduct/attachments/validation/HeatValidationView.test.js b/openecomp-ui/test/softwareProduct/attachments/validation/HeatValidationView.test.js index a0a8a42660..8dee07d77b 100644 --- a/openecomp-ui/test/softwareProduct/attachments/validation/HeatValidationView.test.js +++ b/openecomp-ui/test/softwareProduct/attachments/validation/HeatValidationView.test.js @@ -1,21 +1,21 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 ShallowRenderer from 'react-test-renderer/shallow'; import {mapStateToProps} from 'sdc-app/onboarding/softwareProduct/attachments/validation/HeatValidation.js'; import HeatValidationView from 'sdc-app/onboarding/softwareProduct/attachments/validation/HeatValidationView.jsx'; @@ -165,7 +165,7 @@ describe('SoftwareProductAttachments Modal Mapper and View Classes', () => { var onDeSelect = () => { return null; } ; var onToggle = () => { return null; } ; - var renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render( {} }; - var renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render(); var renderedOutput = renderer.getRenderOutput(); expect(renderedOutput).toBeTruthy(); diff --git a/openecomp-ui/test/softwareProduct/components/compute/SoftwareProductComponentsComputes.test.js b/openecomp-ui/test/softwareProduct/components/compute/SoftwareProductComponentsComputes.test.js index 6d2361b20d..f48a19af18 100644 --- a/openecomp-ui/test/softwareProduct/components/compute/SoftwareProductComponentsComputes.test.js +++ b/openecomp-ui/test/softwareProduct/components/compute/SoftwareProductComponentsComputes.test.js @@ -1,22 +1,22 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 deepFreeze from 'deep-freeze'; import React from 'react'; -import TestUtils from 'react-addons-test-utils'; +import ShallowRenderer from 'react-test-renderer/shallow'; import {storeCreator} from 'sdc-app/AppStore.js'; import ComputeFlavors from 'sdc-app/onboarding/softwareProduct/components/compute/computeComponents/ComputeFlavors.js'; import {ComputeFlavorBaseData} from 'test-utils/factories/softwareProduct/SoftwareProductComponentsComputeFactory.js'; @@ -32,7 +32,7 @@ describe('Software Product Component ComputeFlavors - View Classes.', () => { const ComputeFlavorsList = ComputeFlavorBaseData.buildList(1); - var renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render( { name: '' }; - var renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render( const versionControllerData = VSPComponentsVersionControllerFactory.build(); - var renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render( ); let renderedOutput = renderer.getRenderOutput(); expect(renderedOutput).toBeTruthy(); @@ -79,7 +80,7 @@ describe('SoftwareProductComponentsMonitoring Module Tests', function () { expect(results.filenames[trap]).toEqual(monitoring[trap]); expect(results.filenames[ves]).toEqual(monitoring[ves]); - let renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render(); let renderedOutput = renderer.getRenderOutput(); expect(renderedOutput).toBeTruthy(); diff --git a/openecomp-ui/test/softwareProduct/components/network/SoftwareProductComponentsNICEditor.test.js b/openecomp-ui/test/softwareProduct/components/network/SoftwareProductComponentsNICEditor.test.js index 78d88b008a..ff0371ab4f 100644 --- a/openecomp-ui/test/softwareProduct/components/network/SoftwareProductComponentsNICEditor.test.js +++ b/openecomp-ui/test/softwareProduct/components/network/SoftwareProductComponentsNICEditor.test.js @@ -1,21 +1,22 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 ShallowRenderer from 'react-test-renderer/shallow'; +import TestUtils from 'react-dom/test-utils'; import {mapStateToProps} from 'sdc-app/onboarding/softwareProduct/components/network/SoftwareProductComponentsNICEditor.js'; import SoftwareProductComponentsNICEditorView from 'sdc-app/onboarding/softwareProduct/components/network/SoftwareProductComponentsNICEditorView.jsx'; @@ -25,6 +26,7 @@ import {VSPComponentsNicFactory, VSPComponentsNetworkQDataFactory, VSPComponents VSPComponentsNicFactoryGenericFieldInfo, VSPComponentsNetworkDataMapFactory} from 'test-utils/factories/softwareProduct/SoftwareProductComponentsNetworkFactories.js'; import CurrentScreenFactory from 'test-utils/factories/common/CurrentScreenFactory.js'; + describe('Software Product Component Network NIC Editor and View Classes', () => { it('mapStateToProps mapper exists', () => { expect(mapStateToProps).toBeTruthy(); @@ -80,7 +82,7 @@ describe('Software Product Component Network NIC Editor and View Classes', () => protocols: [] }; - var renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render(); var renderedOutput = renderer.getRenderOutput(); expect(renderedOutput).toBeTruthy(); diff --git a/openecomp-ui/test/softwareProduct/components/network/SoftwareProductComponentsNetwork.test.js b/openecomp-ui/test/softwareProduct/components/network/SoftwareProductComponentsNetwork.test.js index d35659c93b..129bd42f23 100644 --- a/openecomp-ui/test/softwareProduct/components/network/SoftwareProductComponentsNetwork.test.js +++ b/openecomp-ui/test/softwareProduct/components/network/SoftwareProductComponentsNetwork.test.js @@ -1,21 +1,21 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 ShallowRenderer from 'react-test-renderer/shallow'; import {mapStateToProps} from 'sdc-app/onboarding/softwareProduct/components/network/SoftwareProductComponentsNetworkList.js'; import SoftwareProductComponentsNetworkListView from 'sdc-app/onboarding/softwareProduct/components/network/SoftwareProductComponentsNetworkListView.jsx'; @@ -71,7 +71,7 @@ describe('Software Product Component Network Mapper and View Classes', () => { const nicList = VSPComponentsNicWithIdFactory.buildList(1); - var renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render( { const currentSoftwareProductComponent = VSPComponentsFactory.build(); const processesList = VSPProcessStoreFactory.buildList(2); - var renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render( ); @@ -107,7 +107,7 @@ describe('Software Product Creation Module Tests', function() { } }; let props = Object.assign({}, mapStateToProps(state), mapActionsToProps(dispatch)); - let renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render( ); diff --git a/openecomp-ui/test/softwareProduct/deployment/SoftwareProductDeploymentEditor.test.js b/openecomp-ui/test/softwareProduct/deployment/SoftwareProductDeploymentEditor.test.js index c355d9d273..79b041cc2d 100644 --- a/openecomp-ui/test/softwareProduct/deployment/SoftwareProductDeploymentEditor.test.js +++ b/openecomp-ui/test/softwareProduct/deployment/SoftwareProductDeploymentEditor.test.js @@ -1,20 +1,21 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 ShallowRenderer from 'react-test-renderer/shallow'; +import TestUtils from 'react-dom/test-utils'; import { mapStateToProps } from 'sdc-app/onboarding/softwareProduct/deployment/editor/SoftwareProductDeploymentEditor.js'; import SoftwareProductDeploymentEditorView from 'sdc-app/onboarding/softwareProduct/deployment/editor/SoftwareProductDeploymentEditorView.jsx'; import { VSPComponentsFactory } from 'test-utils/factories/softwareProduct/SoftwareProductComponentsFactories.js'; @@ -66,7 +67,7 @@ describe('Software Product Deployment Editor Module Tests', function () { it('jsx view test', () => { const componentsList = VSPComponentsFactory.buildList(1); - var renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render( { const deploymentFlavors = VSPDeploymentStoreFactory.buildList(2); - var renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render( { const networksList = VSPNetworkFactory.buildList(2); const versionControllerData = VSPComponentsVersionControllerFactory.build(); - var renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render(); var renderedOutput = renderer.getRenderOutput(); expect(renderedOutput).toBeTruthy(); diff --git a/openecomp-ui/test/softwareProduct/processes/SoftwareProductEditor.test.js b/openecomp-ui/test/softwareProduct/processes/SoftwareProductEditor.test.js index b4df9bebd9..3ff092d2e8 100644 --- a/openecomp-ui/test/softwareProduct/processes/SoftwareProductEditor.test.js +++ b/openecomp-ui/test/softwareProduct/processes/SoftwareProductEditor.test.js @@ -1,21 +1,21 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 TestUtils from 'react-dom/test-utils'; import {mapStateToProps} from 'sdc-app/onboarding/softwareProduct/processes/SoftwareProductProcessesEditor.js'; import SoftwareProductProcessesEditorView from 'sdc-app/onboarding/softwareProduct/processes/SoftwareProductProcessesEditorView.jsx'; import {VSPEditorFactory} from 'test-utils/factories/softwareProduct/SoftwareProductEditorFactories.js'; diff --git a/openecomp-ui/test/softwareProduct/processes/SoftwareProductProcessesView.test.js b/openecomp-ui/test/softwareProduct/processes/SoftwareProductProcessesView.test.js index 2d7da91cbb..7e8ff903f5 100644 --- a/openecomp-ui/test/softwareProduct/processes/SoftwareProductProcessesView.test.js +++ b/openecomp-ui/test/softwareProduct/processes/SoftwareProductProcessesView.test.js @@ -1,21 +1,21 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 ShallowRenderer from 'react-test-renderer/shallow'; import {mapStateToProps} from 'sdc-app/onboarding/softwareProduct/processes/SoftwareProductProcesses.js'; import SoftwareProductProcessesView from 'sdc-app/onboarding/softwareProduct/processes/SoftwareProductProcessesView.jsx'; @@ -24,11 +24,11 @@ import {VSPEditorFactory} from 'test-utils/factories/softwareProduct/SoftwarePro import {VSPComponentsVersionControllerFactory} from 'test-utils/factories/softwareProduct/SoftwareProductComponentsNetworkFactories.js'; describe('SoftwareProductProcesses Mapper and View Classes', () => { - it ('mapStateToProps mapper exists', () => { + it ('mapStateToProps mapper exists', () => { expect(mapStateToProps).toBeTruthy(); }); - it ('mapStateToProps data test', () => { + it ('mapStateToProps data test', () => { const currentSoftwareProduct = VSPEditorFactory.build(); const processesList = VSPProcessStoreFactory.buildList(2); @@ -49,19 +49,19 @@ describe('SoftwareProductProcesses Mapper and View Classes', () => { expect(results.processesList).toBeTruthy(); }); - it ('view simple test', () => { - const currentSoftwareProduct = VSPEditorFactory.build(); + it ('view simple test', () => { + const currentSoftwareProduct = VSPEditorFactory.build(); const processesList = VSPProcessStoreFactory.buildList(2); const versionControllerData = VSPComponentsVersionControllerFactory.build(); - - - var renderer = TestUtils.createRenderer(); + + + const renderer = new ShallowRenderer(); renderer.render( {}} onEditProcess={() => {}} onDeleteProcess={() => {}} diff --git a/openecomp-ui/test/versionsPage/VersionsPage.test.js b/openecomp-ui/test/versionsPage/VersionsPage.test.js index 7265ebf0a9..e066b37dfc 100644 --- a/openecomp-ui/test/versionsPage/VersionsPage.test.js +++ b/openecomp-ui/test/versionsPage/VersionsPage.test.js @@ -1,21 +1,21 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 ShallowRenderer from 'react-test-renderer/shallow'; import deepFreeze from 'deep-freeze'; import mockRest from 'test-utils/MockRest.js'; import Configuration from 'sdc-app/config/Configuration.js'; @@ -72,7 +72,7 @@ describe('Versions Page Module Tests', () => { const additionalProps = VersionsPageAdditionalPropsFactory.build(); const props = Object.assign({}, mapStateToProps(state), mapActionsToProps(dispatch, additionalProps)); - const renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render(); const renderedOutput = renderer.getRenderOutput(); diff --git a/openecomp-ui/test/versionsPage/creation/VersionsPageCreation.test.js b/openecomp-ui/test/versionsPage/creation/VersionsPageCreation.test.js index d490111178..b6c7b0919a 100644 --- a/openecomp-ui/test/versionsPage/creation/VersionsPageCreation.test.js +++ b/openecomp-ui/test/versionsPage/creation/VersionsPageCreation.test.js @@ -1,21 +1,21 @@ -/*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +/* + * 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 - * + * + * 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. + * 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 ShallowRenderer from 'react-test-renderer/shallow'; import {mapStateToProps, mapActionsToProps} from 'sdc-app/onboarding/versionsPage/creation/VersionsPageCreation.js'; import {VERSION_CREATION_FORM_NAME} from 'sdc-app/onboarding/versionsPage/creation/VersionsPageCreationConstants.js'; import VersionsPageCreationActionHelper from 'sdc-app/onboarding/versionsPage/creation/VersionsPageCreationActionHelper.js'; @@ -92,7 +92,7 @@ describe('Versions Page Creation Module Tests', function() { }; const props = Object.assign({}, mapStateToProps(state), mapActionsToProps(dispatch, additionalProps), additionalProps); - const renderer = TestUtils.createRenderer(); + const renderer = new ShallowRenderer(); renderer.render(); const renderedOutput = renderer.getRenderOutput(); @@ -110,4 +110,4 @@ describe('Versions Page Creation Module Tests', function() { }); -}); \ No newline at end of file +}); -- cgit 1.2.3-korg