aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/test/softwareProduct/components
diff options
context:
space:
mode:
authorEinav Weiss Keidar <EINAVW@amdocs.com>2018-02-14 14:00:07 +0200
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-02-15 10:38:31 +0000
commitd2f5794e8565764e71e171e77ff0a548ad206b05 (patch)
tree1b0de6b0fceb3ae4528827c8ef8422d866fa8220 /openecomp-ui/test/softwareProduct/components
parent14592280a9791ca8e31a1581af04941fbb6f4794 (diff)
upgrade react framework
Issue-ID: SDC-894 Change-Id: Iab219b465333d88c2679b01639e8bad6232750d9 Signed-off-by: einavk <einavw@amdocs.com>
Diffstat (limited to 'openecomp-ui/test/softwareProduct/components')
-rw-r--r--openecomp-ui/test/softwareProduct/components/compute/SoftwareProductComponentComputeEditor.test.js10
-rw-r--r--openecomp-ui/test/softwareProduct/components/compute/SoftwareProductComponentsComputes.test.js10
-rw-r--r--openecomp-ui/test/softwareProduct/components/general/SoftwareProductComponentsGeneral.test.js10
-rw-r--r--openecomp-ui/test/softwareProduct/components/loadBalancing/softwareProductComponentLoadbalancing.test.js10
-rw-r--r--openecomp-ui/test/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoring.test.js14
-rw-r--r--openecomp-ui/test/softwareProduct/components/network/SoftwareProductComponentsNICEditor.test.js12
-rw-r--r--openecomp-ui/test/softwareProduct/components/network/SoftwareProductComponentsNetwork.test.js10
-rw-r--r--openecomp-ui/test/softwareProduct/components/processes/SoftwareProductComponentsProcessesEditor.test.js8
-rw-r--r--openecomp-ui/test/softwareProduct/components/processes/SoftwareProductComponentsProcessesView.test.js16
9 files changed, 50 insertions, 50 deletions
diff --git a/openecomp-ui/test/softwareProduct/components/compute/SoftwareProductComponentComputeEditor.test.js b/openecomp-ui/test/softwareProduct/components/compute/SoftwareProductComponentComputeEditor.test.js
index f7ffcf98fc..459b984718 100644
--- a/openecomp-ui/test/softwareProduct/components/compute/SoftwareProductComponentComputeEditor.test.js
+++ b/openecomp-ui/test/softwareProduct/components/compute/SoftwareProductComponentComputeEditor.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.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import React from 'react';
-import TestUtils from 'react-addons-test-utils';
+import ShallowRenderer from 'react-test-renderer/shallow';
import {mapStateToProps as computeEditorMapStateToProps} from 'sdc-app/onboarding/softwareProduct/components/compute/computeComponents/computeFlavor/ComputeFlavorEditor.js';
import ComputeEditorView from 'sdc-app/onboarding/softwareProduct/components/compute/computeComponents/computeFlavor/ComputeFlavorEditorView.jsx';
@@ -77,7 +77,7 @@ describe('Software Product Component Compute-Editor Mapper and View Classes.', (
onCancel: () => {}
};
- var renderer = TestUtils.createRenderer();
+ const renderer = new ShallowRenderer();
renderer.render(<ComputeEditorView {...props}/>);
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 f3801beb40..37109c87db 100644
--- a/openecomp-ui/test/softwareProduct/components/compute/SoftwareProductComponentsComputes.test.js
+++ b/openecomp-ui/test/softwareProduct/components/compute/SoftwareProductComponentsComputes.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.
@@ -16,7 +16,7 @@
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(
<ComputeFlavors
store={store}
diff --git a/openecomp-ui/test/softwareProduct/components/general/SoftwareProductComponentsGeneral.test.js b/openecomp-ui/test/softwareProduct/components/general/SoftwareProductComponentsGeneral.test.js
index 5029f6a77a..ab489789d5 100644
--- a/openecomp-ui/test/softwareProduct/components/general/SoftwareProductComponentsGeneral.test.js
+++ b/openecomp-ui/test/softwareProduct/components/general/SoftwareProductComponentsGeneral.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/softwareProduct/components/general/SoftwareProductComponentsGeneral.js';
import SoftwareProductComponentsGeneralView from 'sdc-app/onboarding/softwareProduct/components/general/SoftwareProductComponentsGeneralView.jsx';
//import {statusEnum as versionStatusEnum} from 'nfvo-components/panel/versionController/VersionControllerConstants.js';
@@ -73,7 +73,7 @@ describe('SoftwareProductComponentsGeneral Mapper and View Classes', () => {
name: ''
};
- var renderer = TestUtils.createRenderer();
+ const renderer = new ShallowRenderer();
renderer.render(
<SoftwareProductComponentsGeneralView
componentData={componentData}
diff --git a/openecomp-ui/test/softwareProduct/components/loadBalancing/softwareProductComponentLoadbalancing.test.js b/openecomp-ui/test/softwareProduct/components/loadBalancing/softwareProductComponentLoadbalancing.test.js
index 5ccee32ab6..51eed37c78 100644
--- a/openecomp-ui/test/softwareProduct/components/loadBalancing/softwareProductComponentLoadbalancing.test.js
+++ b/openecomp-ui/test/softwareProduct/components/loadBalancing/softwareProductComponentLoadbalancing.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/softwareProduct/components/loadBalancing/SoftwareProductComponentLoadBalancing.js';
import SoftwareProductComponentLoadBalancingView from 'sdc-app/onboarding/softwareProduct/components/loadBalancing/SoftwareProductComponentLoadBalancingRefView.jsx';
@@ -65,7 +65,7 @@ describe('SoftwareProductComponentLoadBalancing Mapper and View Classes', () =>
const versionControllerData = VSPComponentsVersionControllerFactory.build();
- var renderer = TestUtils.createRenderer();
+ const renderer = new ShallowRenderer();
renderer.render(
<SoftwareProductComponentLoadBalancingView
softwareProductComponents={softwareProductComponents}
diff --git a/openecomp-ui/test/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoring.test.js b/openecomp-ui/test/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoring.test.js
index 2428f2a8a8..0dc2b7bb8d 100644
--- a/openecomp-ui/test/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoring.test.js
+++ b/openecomp-ui/test/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoring.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 {mapStateToProps} from 'sdc-app/onboarding/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoring.js';
import SoftwareProductComponentsMonitoringView from 'sdc-app/onboarding/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoringView.jsx';
@@ -66,7 +66,7 @@ describe('SoftwareProductComponentsMonitoring Module Tests', function () {
expect(results.filenames[trap]).toEqual(undefined);
expect(results.filenames[ves]).toEqual(undefined);
- var renderer = TestUtils.createRenderer();
+ const renderer = new ShallowRenderer();
renderer.render(<SoftwareProductComponentsMonitoringView {...results} />);
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]);
- var renderer = TestUtils.createRenderer();
+ const renderer = new ShallowRenderer();
renderer.render(<SoftwareProductComponentsMonitoringView {...results} />);
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 1a1aacf677..4e71dc6fa7 100644
--- a/openecomp-ui/test/softwareProduct/components/network/SoftwareProductComponentsNICEditor.test.js
+++ b/openecomp-ui/test/softwareProduct/components/network/SoftwareProductComponentsNICEditor.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 {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: []
};
- var renderer = TestUtils.createRenderer();
+ const renderer = new ShallowRenderer();
renderer.render(<SoftwareProductComponentsNICEditorView {...props}/>);
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 816f6150ff..91512913f4 100644
--- a/openecomp-ui/test/softwareProduct/components/network/SoftwareProductComponentsNetwork.test.js
+++ b/openecomp-ui/test/softwareProduct/components/network/SoftwareProductComponentsNetwork.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/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(
<SoftwareProductComponentsNetworkListView
versionControllerData={versionControllerData}
diff --git a/openecomp-ui/test/softwareProduct/components/processes/SoftwareProductComponentsProcessesEditor.test.js b/openecomp-ui/test/softwareProduct/components/processes/SoftwareProductComponentsProcessesEditor.test.js
index a59c62978a..299305d9f9 100644
--- a/openecomp-ui/test/softwareProduct/components/processes/SoftwareProductComponentsProcessesEditor.test.js
+++ b/openecomp-ui/test/softwareProduct/components/processes/SoftwareProductComponentsProcessesEditor.test.js
@@ -1,12 +1,12 @@
/*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -15,7 +15,7 @@
*/
import React from 'react';
-import TestUtils from 'react-addons-test-utils';
+import TestUtils from 'react-dom/test-utils';
import {mapStateToProps} from 'sdc-app/onboarding/softwareProduct/components/processes/SoftwareProductComponentProcessesEditor.js';
import SoftwareProductComponentProcessesEditorView from 'sdc-app/onboarding/softwareProduct/components/processes/SoftwareProductComponentProcessesEditorView.jsx';
diff --git a/openecomp-ui/test/softwareProduct/components/processes/SoftwareProductComponentsProcessesView.test.js b/openecomp-ui/test/softwareProduct/components/processes/SoftwareProductComponentsProcessesView.test.js
index 8396f7914b..f64f5ba931 100644
--- a/openecomp-ui/test/softwareProduct/components/processes/SoftwareProductComponentsProcessesView.test.js
+++ b/openecomp-ui/test/softwareProduct/components/processes/SoftwareProductComponentsProcessesView.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/softwareProduct/components/processes/SoftwareProductComponentProcessesList.js';
import SoftwareProductComponentsProcessesView from 'sdc-app/onboarding/softwareProduct/components/processes/SoftwareProductComponentsProcessesListView.jsx';
@@ -24,11 +24,11 @@ import {VSPEditorFactory} from 'test-utils/factories/softwareProduct/SoftwarePro
import {VSPComponentsFactory} from 'test-utils/factories/softwareProduct/SoftwareProductComponentsFactories.js';
describe('SoftwareProductComponetsProcesses 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);
@@ -52,12 +52,12 @@ describe('SoftwareProductComponetsProcesses Mapper and View Classes', () => {
expect(results.processesList.length).toBe(2);
});
- it('view simple test', () => {
+ it('view simple test', () => {
const currentSoftwareProduct = VSPEditorFactory.build();
const currentSoftwareProductComponent = VSPComponentsFactory.build();
const processesList = VSPProcessStoreFactory.buildList(2);
- var renderer = TestUtils.createRenderer();
+ const renderer = new ShallowRenderer();
renderer.render(
<SoftwareProductComponentsProcessesView
processesList={processesList}