From aa2eece0e8559be66454b757cae4bbccb59ea828 Mon Sep 17 00:00:00 2001 From: svishnev Date: Thu, 18 Jan 2018 17:52:06 +0200 Subject: react-version-downgrade Issue-ID: SDC-943 Change-Id: Ief0b0cf4f21a8c739521ecd869b48f8ad69fcb0f Signed-off-by: svishnev --- dox-sequence-diagram-ui/package.json | 12 ++++++------ openecomp-ui/.babelrc | 10 ++++------ openecomp-ui/package.json | 20 ++++++++++---------- openecomp-ui/pom.xml | 4 ++-- openecomp-ui/test-utils/Util.js | 2 +- openecomp-ui/test/flows/FlowsListEditor.test.js | 8 ++++---- openecomp-ui/test/flows/flowsEditorModal.test.js | 6 +++--- .../creation/LicenseModelCreation.test.js | 4 ++-- .../LicenseModelFeatureGroupEditor.test.js | 2 +- .../LicenseModelFeatureGroupListEditor.test.js | 2 +- .../overview/listItems/EntitlementPool.test.js | 2 +- .../overview/listItems/FeatureGroup.test.js | 2 +- .../overview/listItems/LicenseAgreement.test.js | 2 +- .../overview/listItems/LicenseKeyGroup.test.js | 2 +- .../overview/summary/SummaryCountList.test.js | 2 +- .../overview/summary/VendorDataView.test.js | 2 +- .../test/licenseModel/overview/views.test.js | 8 ++++---- .../test/nfvo-components/SubmitErrorResponse.test.js | 2 +- .../nfvo-components/editor/TabulatedEditor.test.js | 6 +++--- .../input/dualListBox/dualListbox.test.js | 6 +++--- .../nfvo-components/input/validation/input.test.js | 2 +- .../nfvo-components/listEditor/listEditor.test.js | 2 +- .../test/nfvo-components/modal/globalModal.test.js | 8 ++++---- .../VersionController/versionController.test.js | 6 +++--- .../test/onboard/onboardingCatalog/views.test.js | 2 +- .../test/permissions/permissionsManaager.test.js | 2 +- openecomp-ui/test/revisions/revisions.test.js | 4 ++-- .../SoftwareProductAttachmentsView.test.js | 6 +++--- .../attachments/setup/heatSetup.test.js | 2 +- .../validation/HeatValidationView.test.js | 4 ++-- .../SoftwareProductComponentComputeEditor.test.js | 4 ++-- .../SoftwareProductComponentsComputes.test.js | 4 ++-- .../general/SoftwareProductComponentsGeneral.test.js | 4 ++-- .../softwareProductComponentLoadbalancing.test.js | 4 ++-- .../SoftwareProductComponentsMonitoring.test.js | 8 ++++---- .../SoftwareProductComponentsNICEditor.test.js | 6 +++--- .../network/SoftwareProductComponentsNetwork.test.js | 4 ++-- .../SoftwareProductComponentsProcessesEditor.test.js | 2 +- .../SoftwareProductComponentsProcessesView.test.js | 4 ++-- .../creation/SoftwareProductCreation.test.js | 6 +++--- .../SoftwareProductDeploymentEditor.test.js | 6 +++--- .../deployment/SoftwareProductDeploymentView.test.js | 4 ++-- .../test/softwareProduct/details/detailsView.test.js | 6 +++--- .../softwareProduct/landingPage/landingPage.test.js | 2 +- .../networks/SoftwareProductNetworksView.test.js | 4 ++-- .../processes/SoftwareProductEditor.test.js | 2 +- .../processes/SoftwareProductProcessesView.test.js | 4 ++-- openecomp-ui/test/versionsPage/VersionsPage.test.js | 4 ++-- .../creation/VersionsPageCreation.test.js | 4 ++-- 49 files changed, 111 insertions(+), 113 deletions(-) diff --git a/dox-sequence-diagram-ui/package.json b/dox-sequence-diagram-ui/package.json index 3aeb057ea3..d469310e25 100644 --- a/dox-sequence-diagram-ui/package.json +++ b/dox-sequence-diagram-ui/package.json @@ -15,10 +15,10 @@ "d3": "^3.5.16", "lodash": "^4.12.0", "prop-types": "^15.6.0", - "react": "^15.6.2", - "react-dnd": "^2.5.4", - "react-dnd-html5-backend": "^2.5.4", - "react-dom": "^15.6.2", + "react": "^15.1.0", + "react-dnd": "^2.1.2", + "react-dnd-html5-backend": "^2.1.2", + "react-dom": "^15.1.0", "react-redux": "^4.4.5", "react-select": "1.0.0-rc.5", "redux": "^3.5.2" @@ -45,11 +45,11 @@ "file-loader": "^0.8.5", "json-loader": "^0.5.4", "node-http-proxy": "^0.2.3", - "node-sass": "^4.5.3", + "node-sass": "^3.7.0", "path": "^0.12.7", "raw-loader": "^0.5.1", "redux-devtools": "^3.3.1", - "sass-loader": "^6.0.6", + "sass-loader": "^3.2.0", "style-loader": "^0.13.1", "svg-sprite-loader": "0.0.19", "url-loader": "^0.5.7", diff --git a/openecomp-ui/.babelrc b/openecomp-ui/.babelrc index 378bcda37d..1545202a4a 100644 --- a/openecomp-ui/.babelrc +++ b/openecomp-ui/.babelrc @@ -1,15 +1,13 @@ { - "presets": [["env", { - "targets": { - "browsers": ["last 2 versions", "Firefox >= 47"] - } - }],"react"], + "presets": [["es2015", { "modules": false }],"stage-0", "react"], "plugins": [ + "transform-es2015-modules-commonjs", + "transform-es2015-destructuring", + "transform-es2015-spread", "transform-object-rest-spread", "transform-class-properties", "transform-runtime", "transform-decorators-legacy", - "transform-runtime", "react-hot-loader/babel" ], "sourceMap": "inline" diff --git a/openecomp-ui/package.json b/openecomp-ui/package.json index 4b7fa6141c..acf7d6faad 100644 --- a/openecomp-ui/package.json +++ b/openecomp-ui/package.json @@ -34,16 +34,16 @@ "md5": "^2.1.0", "prop-types": "^15.6.0", "randomstring": "^1.1.5", - "react": "^15.6.2", - "react-bootstrap": "^0.31.5", + "react": "~15.3.2", + "react-bootstrap": "^0.30.1", "react-click-outside": "^2.3.1", - "react-datepicker": "^0.61.0", + "react-datepicker": "^0.48.0", "react-dnd": "^2.5.4", "react-dnd-html5-backend": "^2.5.4", - "react-dom": "^15.6.2", - "react-dropzone": "4.2.3", + "react-dom": "~15.3.2", + "react-dropzone": "3.7.3", "react-input-autosize": "^2.2.0", - "react-redux": "^4.4.5", + "react-redux": "^4.4.1", "react-select": "1.0.0-rc.5", "react-show-more": "^1.1.1", "react-sortable": "^1.2.0", @@ -67,7 +67,7 @@ "babel-plugin-transform-es2015-spread": "^6.8.0", "babel-plugin-transform-object-rest-spread": "^6.8.0", "babel-plugin-transform-runtime": "^6.22.0", - "babel-preset-env": "^1.6.1", + "babel-preset-es2015": "^6.24.0", "babel-preset-react": "^6.23.0", "babel-preset-stage-0": "^6.22.0", "css-loader": "^0.23.1", @@ -89,7 +89,7 @@ "http-proxy-middleware": "^0.17.4", "ignore-loader": "^0.1.1", "jasmine-core": "^2.5.2", - "jest": "^21.2.1", + "jest": "^19.0.2", "jshint": "^2.9.4", "json-loader": "^0.5.4", "jsx-loader": "^0.13.2", @@ -98,10 +98,10 @@ "node-watch": "^0.3.5", "prompt": "^0.2.14", "react-addons-test-utils": "~15.3.2", - "react-datepicker": "^0.61.0", + "react-click-outside": "^2.3.1", "react-hot-loader": "^3.1.3", "rosie": "^1.6.0", - "sass-loader": "^6.0.6", + "sass-loader": "^3.2.3", "source-map-loader": "^0.1.5", "storyshots": "^3.2.2", "style-loader": "^0.13.0", diff --git a/openecomp-ui/pom.xml b/openecomp-ui/pom.xml index 39193c1dee..311403eade 100644 --- a/openecomp-ui/pom.xml +++ b/openecomp-ui/pom.xml @@ -76,8 +76,8 @@ install-node-and-npm - v8.9.2 - 5.5.1 + v6.9.5 + 3.10.10 diff --git a/openecomp-ui/test-utils/Util.js b/openecomp-ui/test-utils/Util.js index ee05f13bd9..1614c1ef51 100644 --- a/openecomp-ui/test-utils/Util.js +++ b/openecomp-ui/test-utils/Util.js @@ -17,7 +17,7 @@ import deepFreeze from 'deep-freeze'; import times from 'lodash/times'; import pick from 'lodash/pick'; import intersection from 'lodash/intersection'; -import ReactTestUtils from 'react-dom/test-utils'; +import ReactTestUtils from 'react-addons-test-utils'; export const buildListFromFactory = (factory, quantity = 3, overrides) => { let list = []; diff --git a/openecomp-ui/test/flows/FlowsListEditor.test.js b/openecomp-ui/test/flows/FlowsListEditor.test.js index 5b57e8b2c1..8cdea7bc89 100644 --- a/openecomp-ui/test/flows/FlowsListEditor.test.js +++ b/openecomp-ui/test/flows/FlowsListEditor.test.js @@ -15,7 +15,7 @@ */ import React from 'react'; -import ShallowRenderer from 'react-test-renderer/shallow'; +import TestUtils from 'react-addons-test-utils'; 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', () => { - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); 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(); - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render(); let renderedOutput = renderer.getRenderOutput(); expect(renderedOutput).toBeTruthy(); }); it('basic view component run with empty flowList and should show popup modal', () => { - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); 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 cc6525fd46..53506b8c3c 100644 --- a/openecomp-ui/test/flows/flowsEditorModal.test.js +++ b/openecomp-ui/test/flows/flowsEditorModal.test.js @@ -15,10 +15,10 @@ */ import React from 'react'; -import TestUtils from 'react-dom/test-utils'; +import TestUtils from 'react-addons-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', () => { - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render( {}} diff --git a/openecomp-ui/test/licenseModel/creation/LicenseModelCreation.test.js b/openecomp-ui/test/licenseModel/creation/LicenseModelCreation.test.js index 9c8043b943..9537ea2e2f 100644 --- a/openecomp-ui/test/licenseModel/creation/LicenseModelCreation.test.js +++ b/openecomp-ui/test/licenseModel/creation/LicenseModelCreation.test.js @@ -15,7 +15,7 @@ */ import React from 'react'; -import ShallowRenderer from 'react-test-renderer/shallow'; +import TestUtils from 'react-addons-test-utils'; 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(); - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render( { - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render( ); @@ -61,7 +61,7 @@ describe('License Model Overview - View: ', function () { selectedTab: selectedButton.VLM_LIST_VIEW, onTabSelect: () => {} }; - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render( ); diff --git a/openecomp-ui/test/nfvo-components/SubmitErrorResponse.test.js b/openecomp-ui/test/nfvo-components/SubmitErrorResponse.test.js index ecb7159ee5..27be13bc02 100644 --- a/openecomp-ui/test/nfvo-components/SubmitErrorResponse.test.js +++ b/openecomp-ui/test/nfvo-components/SubmitErrorResponse.test.js @@ -16,7 +16,7 @@ import React from 'react'; -import TestUtils from 'react-dom/test-utils'; +import TestUtils from 'react-addons-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 505bc91636..7a86933770 100644 --- a/openecomp-ui/test/nfvo-components/editor/TabulatedEditor.test.js +++ b/openecomp-ui/test/nfvo-components/editor/TabulatedEditor.test.js @@ -16,8 +16,8 @@ import React from 'react'; -import ShallowRenderer from 'react-test-renderer/shallow'; -import TestUtils from 'react-dom/test-utils'; + +import TestUtils from 'react-addons-test-utils'; import TabulatedEditor from 'nfvo-components/editor/TabulatedEditor.jsx'; import { Provider } from 'react-redux'; import {storeCreator} from 'sdc-app/AppStore.js'; @@ -25,7 +25,7 @@ import {storeCreator} from 'sdc-app/AppStore.js'; describe('Tabulated Editor test: ', function () { const store = storeCreator(); it('basic view test', () => { - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); 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 2df15c61b1..1af7e44a46 100644 --- a/openecomp-ui/test/nfvo-components/input/dualListBox/dualListbox.test.js +++ b/openecomp-ui/test/nfvo-components/input/dualListBox/dualListbox.test.js @@ -15,9 +15,9 @@ */ import React from 'react'; -import TestUtils from 'react-dom/test-utils'; +import TestUtils from 'react-addons-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'}]; @@ -25,7 +25,7 @@ describe('dualListBox Module Tests', function () { it('should render basically', () => { - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); 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 719e01fb97..f27e206093 100644 --- a/openecomp-ui/test/nfvo-components/input/validation/input.test.js +++ b/openecomp-ui/test/nfvo-components/input/validation/input.test.js @@ -15,7 +15,7 @@ */ import React from 'react'; -import TestUtils from 'react-dom/test-utils'; +import TestUtils from 'react-addons-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'; diff --git a/openecomp-ui/test/nfvo-components/listEditor/listEditor.test.js b/openecomp-ui/test/nfvo-components/listEditor/listEditor.test.js index a0c1c9978c..bcc72e3059 100644 --- a/openecomp-ui/test/nfvo-components/listEditor/listEditor.test.js +++ b/openecomp-ui/test/nfvo-components/listEditor/listEditor.test.js @@ -16,7 +16,7 @@ import React from 'react'; import {mount} from 'enzyme'; -import TestUtils from 'react-dom/test-utils'; +import TestUtils from 'react-addons-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 0636aed6e1..a67f02ce0c 100644 --- a/openecomp-ui/test/nfvo-components/modal/globalModal.test.js +++ b/openecomp-ui/test/nfvo-components/modal/globalModal.test.js @@ -16,7 +16,7 @@ import GlobalModal, {GlobalModalView, mapStateToProps} from 'src/nfvo-components/modal/GlobalModal.js'; import React from 'react'; -import ShallowRenderer from 'react-test-renderer/shallow'; +import TestUtils from 'react-addons-test-utils'; import store from 'sdc-app/AppStore.js'; import {actionTypes, typeEnum} from 'src/nfvo-components/modal/GlobalModalConstants.js'; @@ -57,7 +57,7 @@ describe('Global Modal tests: ', function () { expect(store.getState().modal).toBeTruthy(); - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render(); let renderedOutput = renderer.getRenderOutput(); expect(renderedOutput).toBeTruthy(); @@ -69,7 +69,7 @@ describe('Global Modal tests: ', function () { store.dispatch({type: actionTypes.GLOBAL_MODAL_SHOW, data: {title, msg}}); expect(store.getState().modal).toBeTruthy(); - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render(); let renderedOutput = renderer.getRenderOutput(); expect(renderedOutput).toBeTruthy(); @@ -81,7 +81,7 @@ describe('Global Modal tests: ', function () { it('checking component default render', ()=> { expect(window.document).toBeTruthy(); - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render({}} />); 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 73dd6b6977..5b68319a9f 100644 --- a/openecomp-ui/test/nfvo-components/panel/VersionController/versionController.test.js +++ b/openecomp-ui/test/nfvo-components/panel/VersionController/versionController.test.js @@ -16,8 +16,8 @@ import React from 'react'; -import ShallowRenderer from 'react-test-renderer/shallow'; -import TestUtils from 'react-dom/test-utils'; + +import TestUtils from 'react-addons-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', () => { - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); 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 9b9a0b7301..f8cff418e0 100644 --- a/openecomp-ui/test/onboard/onboardingCatalog/views.test.js +++ b/openecomp-ui/test/onboard/onboardingCatalog/views.test.js @@ -15,7 +15,7 @@ */ import React from 'react'; -import TestUtils from 'react-dom/test-utils'; +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'; diff --git a/openecomp-ui/test/permissions/permissionsManaager.test.js b/openecomp-ui/test/permissions/permissionsManaager.test.js index d835276fd1..abae39d917 100644 --- a/openecomp-ui/test/permissions/permissionsManaager.test.js +++ b/openecomp-ui/test/permissions/permissionsManaager.test.js @@ -15,7 +15,7 @@ */ import React from 'react'; -import TestUtils from 'react-dom/test-utils'; +import TestUtils from 'react-addons-test-utils'; import {UserFactory} from 'test-utils/factories/users/UsersFactories.js'; import {mapStateToProps} from 'sdc-app/onboarding/permissions/PermissionsManager.js'; diff --git a/openecomp-ui/test/revisions/revisions.test.js b/openecomp-ui/test/revisions/revisions.test.js index 73650f2635..d47c2d2963 100644 --- a/openecomp-ui/test/revisions/revisions.test.js +++ b/openecomp-ui/test/revisions/revisions.test.js @@ -15,7 +15,7 @@ */ import React from 'react'; -import TestUtils from 'react-dom/test-utils'; +import TestUtils from 'react-addons-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-dom/test-utils'; +import ReactTestUtils from 'react-addons-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 f610f6d298..cebd1ee362 100644 --- a/openecomp-ui/test/softwareProduct/attachments/SoftwareProductAttachmentsView.test.js +++ b/openecomp-ui/test/softwareProduct/attachments/SoftwareProductAttachmentsView.test.js @@ -15,8 +15,8 @@ */ import React from 'react'; -import ShallowRenderer from 'react-test-renderer/shallow'; -import TestUtils from 'react-dom/test-utils'; + +import TestUtils from 'react-addons-test-utils'; import {VSPAttachmentTreeNodeWithChildrenFactory, VSPAttachmentDetailedError} from 'test-utils/factories/softwareProduct/SoftwareProductAttachmentsFactories.js'; import {defaultStoreFactory} from 'test-utils/factories/onboard/OnboardingCatalogFactories.js'; @@ -69,7 +69,7 @@ describe('SoftwareProduct Attachments - View: ', function () { let data = defaultStoreFactory.build({softwareProduct: {softwareProductAttachments, softwareProductEditor: {data: {...versionControllerData}}}}); var params = mapStateToProps(data); - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); 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 97df10f4aa..9d80e58d2f 100644 --- a/openecomp-ui/test/softwareProduct/attachments/setup/heatSetup.test.js +++ b/openecomp-ui/test/softwareProduct/attachments/setup/heatSetup.test.js @@ -15,7 +15,7 @@ */ import React from 'react'; -import TestUtils from 'react-dom/test-utils'; +import TestUtils from 'react-addons-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 8dee07d77b..3b7c3b7edb 100644 --- a/openecomp-ui/test/softwareProduct/attachments/validation/HeatValidationView.test.js +++ b/openecomp-ui/test/softwareProduct/attachments/validation/HeatValidationView.test.js @@ -15,7 +15,7 @@ */ import React from 'react'; -import ShallowRenderer from 'react-test-renderer/shallow'; +import TestUtils from 'react-addons-test-utils'; 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; } ; - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render( {} }; - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); 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 f48a19af18..f3801beb40 100644 --- a/openecomp-ui/test/softwareProduct/components/compute/SoftwareProductComponentsComputes.test.js +++ b/openecomp-ui/test/softwareProduct/components/compute/SoftwareProductComponentsComputes.test.js @@ -16,7 +16,7 @@ import deepFreeze from 'deep-freeze'; import React from 'react'; -import ShallowRenderer from 'react-test-renderer/shallow'; +import TestUtils from 'react-addons-test-utils'; 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); - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render( { name: '' }; - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render( const versionControllerData = VSPComponentsVersionControllerFactory.build(); - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render( ); let renderedOutput = renderer.getRenderOutput(); expect(renderedOutput).toBeTruthy(); @@ -80,7 +80,7 @@ describe('SoftwareProductComponentsMonitoring Module Tests', function () { expect(results.filenames[trap]).toEqual(monitoring[trap]); expect(results.filenames[ves]).toEqual(monitoring[ves]); - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); 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 ff0371ab4f..1a1aacf677 100644 --- a/openecomp-ui/test/softwareProduct/components/network/SoftwareProductComponentsNICEditor.test.js +++ b/openecomp-ui/test/softwareProduct/components/network/SoftwareProductComponentsNICEditor.test.js @@ -15,8 +15,8 @@ */ import React from 'react'; -import ShallowRenderer from 'react-test-renderer/shallow'; -import TestUtils from 'react-dom/test-utils'; + +import TestUtils from 'react-addons-test-utils'; import {mapStateToProps} from 'sdc-app/onboarding/softwareProduct/components/network/SoftwareProductComponentsNICEditor.js'; import SoftwareProductComponentsNICEditorView from 'sdc-app/onboarding/softwareProduct/components/network/SoftwareProductComponentsNICEditorView.jsx'; @@ -82,7 +82,7 @@ describe('Software Product Component Network NIC Editor and View Classes', () => protocols: [] }; - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); 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 129bd42f23..816f6150ff 100644 --- a/openecomp-ui/test/softwareProduct/components/network/SoftwareProductComponentsNetwork.test.js +++ b/openecomp-ui/test/softwareProduct/components/network/SoftwareProductComponentsNetwork.test.js @@ -15,7 +15,7 @@ */ import React from 'react'; -import ShallowRenderer from 'react-test-renderer/shallow'; +import TestUtils from 'react-addons-test-utils'; 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); - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render( { const currentSoftwareProductComponent = VSPComponentsFactory.build(); const processesList = VSPProcessStoreFactory.buildList(2); - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render( ); @@ -107,7 +107,7 @@ describe('Software Product Creation Module Tests', function() { } }; let props = Object.assign({}, mapStateToProps(state), mapActionsToProps(dispatch)); - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render( ); diff --git a/openecomp-ui/test/softwareProduct/deployment/SoftwareProductDeploymentEditor.test.js b/openecomp-ui/test/softwareProduct/deployment/SoftwareProductDeploymentEditor.test.js index 79b041cc2d..3d0f7fca2d 100644 --- a/openecomp-ui/test/softwareProduct/deployment/SoftwareProductDeploymentEditor.test.js +++ b/openecomp-ui/test/softwareProduct/deployment/SoftwareProductDeploymentEditor.test.js @@ -14,8 +14,8 @@ * limitations under the License. */ import React from 'react'; -import ShallowRenderer from 'react-test-renderer/shallow'; -import TestUtils from 'react-dom/test-utils'; + +import TestUtils from 'react-addons-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'; @@ -67,7 +67,7 @@ describe('Software Product Deployment Editor Module Tests', function () { it('jsx view test', () => { const componentsList = VSPComponentsFactory.buildList(1); - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render( { const deploymentFlavors = VSPDeploymentStoreFactory.buildList(2); - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render( { const networksList = VSPNetworkFactory.buildList(2); const versionControllerData = VSPComponentsVersionControllerFactory.build(); - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); 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 3ff092d2e8..e61f2673a3 100644 --- a/openecomp-ui/test/softwareProduct/processes/SoftwareProductEditor.test.js +++ b/openecomp-ui/test/softwareProduct/processes/SoftwareProductEditor.test.js @@ -15,7 +15,7 @@ */ import React from 'react'; -import TestUtils from 'react-dom/test-utils'; +import TestUtils from 'react-addons-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 7e8ff903f5..345c46999b 100644 --- a/openecomp-ui/test/softwareProduct/processes/SoftwareProductProcessesView.test.js +++ b/openecomp-ui/test/softwareProduct/processes/SoftwareProductProcessesView.test.js @@ -15,7 +15,7 @@ */ import React from 'react'; -import ShallowRenderer from 'react-test-renderer/shallow'; +import TestUtils from 'react-addons-test-utils'; import {mapStateToProps} from 'sdc-app/onboarding/softwareProduct/processes/SoftwareProductProcesses.js'; import SoftwareProductProcessesView from 'sdc-app/onboarding/softwareProduct/processes/SoftwareProductProcessesView.jsx'; @@ -56,7 +56,7 @@ describe('SoftwareProductProcesses Mapper and View Classes', () => { const versionControllerData = VSPComponentsVersionControllerFactory.build(); - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render( { const additionalProps = VersionsPageAdditionalPropsFactory.build(); const props = Object.assign({}, mapStateToProps(state), mapActionsToProps(dispatch, additionalProps)); - const renderer = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); 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 b6c7b0919a..78e8124f74 100644 --- a/openecomp-ui/test/versionsPage/creation/VersionsPageCreation.test.js +++ b/openecomp-ui/test/versionsPage/creation/VersionsPageCreation.test.js @@ -15,7 +15,7 @@ */ import React from 'react'; -import ShallowRenderer from 'react-test-renderer/shallow'; +import TestUtils from 'react-addons-test-utils'; 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 = new ShallowRenderer(); + var renderer = TestUtils.createRenderer(); renderer.render(); const renderedOutput = renderer.getRenderOutput(); -- cgit 1.2.3-korg