summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArul.Nambi <arul.nambi@amdocs.com>2018-07-11 14:19:41 -0400
committerArul.Nambi <arul.nambi@amdocs.com>2018-07-16 10:04:10 -0400
commit75597ac2b51ba62bee33f72a7b55a549cf43a16f (patch)
tree9e9b6826a51abbdd011e5449c4812e8cca6d58a1
parent4cbfb73eebc578c62ff38c82f969782e229ce969 (diff)
Refactoring test scripts
Moving the test scripts under one folder and restucting them so that the clutter can be avoided in the src folder. Issue-ID: AAI-1371 Change-Id: I41b34acbe79a7a3409f2990f11492614f7ef9c5a Signed-off-by: Arul.Nambi <arul.nambi@amdocs.com>
-rw-r--r--package.json6
-rw-r--r--scripts/test/fileMock.js (renamed from test/fileMock.js)0
-rw-r--r--scripts/test/setupTests.js (renamed from test/setupTests.js)0
-rw-r--r--scripts/test/styleMock.js (renamed from test/styleMock.js)0
-rw-r--r--test/tierSupport/SelectedNodeDetails.test.js (renamed from src/app/tierSupport/selectedNodeDetails/SelectedNodeDetails.test.js)6
-rw-r--r--test/tierSupport/SelectedNodeDetailsReducer.test.js (renamed from src/app/tierSupport/selectedNodeDetails/SelectedNodeDetailsReducer.test.js)2
-rw-r--r--test/utils/DateTimeChartUtil.test.js (renamed from src/utils/DateTimeChartUtil.test.js)2
-rw-r--r--test/utils/SpinnerContainer.test.js (renamed from src/utils/SpinnerContainer.test.js)4
-rw-r--r--test/vnfSearch/VnfSearch.test.js (renamed from src/app/vnfSearch/VnfSearch.test.js)4
-rw-r--r--test/vnfSearch/VnfSearchActions.test.js (renamed from src/app/vnfSearch/VnfSearchActions.test.js)2
-rw-r--r--test/vnfSearch/VnfSearchNfRoleVisualization.test.js (renamed from src/app/vnfSearch/VnfSearchNfRoleVisualization.test.js)4
-rw-r--r--test/vnfSearch/VnfSearchNfTypeVisualization.test.js (renamed from src/app/vnfSearch/VnfSearchNfTypeVisualization.test.js)6
-rw-r--r--test/vnfSearch/VnfSearchOrchestratedStatusVisualization.test.js (renamed from src/app/vnfSearch/VnfSearchOrchestratedStatusVisualization.test.js)6
-rw-r--r--test/vnfSearch/VnfSearchProvStatusVisualization.test.js (renamed from src/app/vnfSearch/VnfSearchProvStatusVisualization.test.js)6
-rw-r--r--test/vnfSearch/VnfSearchReducer.test.js (renamed from src/app/vnfSearch/VnfSearchReducer.test.js)6
-rw-r--r--test/vnfSearch/VnfSearchTotalCountVisualization.test.js (renamed from src/app/vnfSearch/VnfSearchTotalCountVisualization.test.js)6
16 files changed, 30 insertions, 30 deletions
diff --git a/package.json b/package.json
index 55e7652..8401a11 100644
--- a/package.json
+++ b/package.json
@@ -105,11 +105,11 @@
},
"jest": {
"verbose": true,
- "setupTestFrameworkScriptFile": "./test/setupTests.js",
+ "setupTestFrameworkScriptFile": "./scripts/test/setupTests.js",
"automock": false,
"moduleNameMapper": {
- "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/test/fileMock.js",
- "\\.(css|scss)$": "<rootDir>/test/styleMock.js"
+ "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/scripts/test/fileMock.js",
+ "\\.(css|scss)$": "<rootDir>/scripts/test/styleMock.js"
},
"moduleFileExtensions": [
"js",
diff --git a/test/fileMock.js b/scripts/test/fileMock.js
index 86059f3..86059f3 100644
--- a/test/fileMock.js
+++ b/scripts/test/fileMock.js
diff --git a/test/setupTests.js b/scripts/test/setupTests.js
index 7237dc9..7237dc9 100644
--- a/test/setupTests.js
+++ b/scripts/test/setupTests.js
diff --git a/test/styleMock.js b/scripts/test/styleMock.js
index f053ebf..f053ebf 100644
--- a/test/styleMock.js
+++ b/scripts/test/styleMock.js
diff --git a/src/app/tierSupport/selectedNodeDetails/SelectedNodeDetails.test.js b/test/tierSupport/SelectedNodeDetails.test.js
index 60f5530..5f97626 100644
--- a/src/app/tierSupport/selectedNodeDetails/SelectedNodeDetails.test.js
+++ b/test/tierSupport/SelectedNodeDetails.test.js
@@ -4,9 +4,9 @@ import {Provider} from 'react-redux'
import configureStore from 'redux-mock-store';
import Table from 'react-bootstrap/lib/Table';
-import ConnectedSelectedNodeDetails, { SelectedNodeDetails } from './SelectedNodeDetails.jsx';
-import { SELECTED_NODE_TABLE_COLUMN_NAMES } from './SelectedNodeDetailsConstants.js';
-import LaunchInContext from '../launchExternalResource/LaunchExternalResource.jsx';
+import ConnectedSelectedNodeDetails, { SelectedNodeDetails } from 'app/tierSupport/selectedNodeDetails/SelectedNodeDetails.jsx';
+import { SELECTED_NODE_TABLE_COLUMN_NAMES } from 'app/tierSupport/selectedNodeDetails/SelectedNodeDetailsConstants.js';
+import LaunchInContext from 'app/tierSupport/launchExternalResource/LaunchExternalResource.jsx';
describe('SelectedNodeDetails - Shallow render of component', () => {
let wrapper;
diff --git a/src/app/tierSupport/selectedNodeDetails/SelectedNodeDetailsReducer.test.js b/test/tierSupport/SelectedNodeDetailsReducer.test.js
index 2544a80..238d21c 100644
--- a/src/app/tierSupport/selectedNodeDetails/SelectedNodeDetailsReducer.test.js
+++ b/test/tierSupport/SelectedNodeDetailsReducer.test.js
@@ -1,4 +1,4 @@
-import SelectedNodeDetailsReducer from './SelectedNodeDetailsReducer.js';
+import SelectedNodeDetailsReducer from 'app/tierSupport/selectedNodeDetails/SelectedNodeDetailsReducer.js';
import {tierSupportActionTypes} from 'app/tierSupport/TierSupportConstants.js';
import {
globalAutoCompleteSearchBarActionTypes
diff --git a/src/utils/DateTimeChartUtil.test.js b/test/utils/DateTimeChartUtil.test.js
index b1e9d69..3f7be00 100644
--- a/src/utils/DateTimeChartUtil.test.js
+++ b/test/utils/DateTimeChartUtil.test.js
@@ -4,7 +4,7 @@ import {
dateFormatLocalTimeZoneYYYYMMDD,
getTicks,
getTicksData
-} from './DateTimeChartUtil.js';
+} from 'utils/DateTimeChartUtil.js';
describe('DateTimeChartUtil Tests', () => {
it('sortDataByField', () => {
diff --git a/src/utils/SpinnerContainer.test.js b/test/utils/SpinnerContainer.test.js
index a217b8a..088ad2a 100644
--- a/src/utils/SpinnerContainer.test.js
+++ b/test/utils/SpinnerContainer.test.js
@@ -2,8 +2,8 @@ import React from 'react';
import { ClipLoader } from 'react-spinners';
import { mount } from 'enzyme';
-import SpinnerContainer from './SpinnerContainer.jsx';
-import {COLOR_BLUE} from 'utils/GlobalConstants.js';
+import SpinnerContainer from 'utils/SpinnerContainer.jsx';
+import {COLOR_BLUE} from 'utils/GlobalConstants';
describe('SpinnerContainer', () => {
it('render spinner - visible', () => {
diff --git a/src/app/vnfSearch/VnfSearch.test.js b/test/vnfSearch/VnfSearch.test.js
index c6c63fc..3875543 100644
--- a/src/app/vnfSearch/VnfSearch.test.js
+++ b/test/vnfSearch/VnfSearch.test.js
@@ -1,9 +1,9 @@
import React from 'react';
import { shallow, mount } from 'enzyme';
-import {Provider} from 'react-redux'
+import {Provider} from 'react-redux';
import configureStore from 'redux-mock-store';
-import ConnectedVnfSearch, { vnfSearch } from './VnfSearch.jsx';
+import ConnectedVnfSearch, { vnfSearch } from 'app/vnfSearch/VnfSearch.jsx';
describe('VnfSearch - Shallow render of component', () => {
let wrapper;
diff --git a/src/app/vnfSearch/VnfSearchActions.test.js b/test/vnfSearch/VnfSearchActions.test.js
index 927e6ab..e1c3733 100644
--- a/src/app/vnfSearch/VnfSearchActions.test.js
+++ b/test/vnfSearch/VnfSearchActions.test.js
@@ -7,7 +7,7 @@ import {
clearVnfSearchData,
setNotificationText,
processVnfVisualizationsOnFilterChange
-} from './VnfSearchActions.js';
+} from 'app/vnfSearch/VnfSearchActions.js';
import {
vnfActionTypes,
CHART_PROV_STATUS,
diff --git a/src/app/vnfSearch/VnfSearchNfRoleVisualization.test.js b/test/vnfSearch/VnfSearchNfRoleVisualization.test.js
index cf94925..2265e6e 100644
--- a/src/app/vnfSearch/VnfSearchNfRoleVisualization.test.js
+++ b/test/vnfSearch/VnfSearchNfRoleVisualization.test.js
@@ -5,8 +5,8 @@ import configureStore from 'redux-mock-store';
import { BarChart } from 'recharts';
import ConnectedVnfSearchNfRoleVisualization,
- { VnfSearchNfRoleVisualization } from './VnfSearchNfRoleVisualization.jsx';
-import { CHART_NF_ROLE } from './VnfSearchConstants.js';
+ { VnfSearchNfRoleVisualization } from 'app/vnfSearch/VnfSearchNfRoleVisualization.jsx';
+import { CHART_NF_ROLE } from 'app/vnfSearch/VnfSearchConstants.js';
import Spinner from 'utils/SpinnerContainer.jsx';
describe('VnfSearchNfRoleVisualization - Shallow render of component', () => {
diff --git a/src/app/vnfSearch/VnfSearchNfTypeVisualization.test.js b/test/vnfSearch/VnfSearchNfTypeVisualization.test.js
index bbb2907..485a822 100644
--- a/src/app/vnfSearch/VnfSearchNfTypeVisualization.test.js
+++ b/test/vnfSearch/VnfSearchNfTypeVisualization.test.js
@@ -5,9 +5,9 @@ import configureStore from 'redux-mock-store';
import { BarChart } from 'recharts';
import ConnectedVnfSearchNfTypeVisualization,
- { VnfSearchNfTypeVisualization } from './VnfSearchNfTypeVisualization.jsx';
-import { CHART_NF_TYPE } from './VnfSearchConstants.js';
-import Spinner from 'utils/SpinnerContainer.jsx';
+ { VnfSearchNfTypeVisualization } from 'app/vnfSearch/VnfSearchNfTypeVisualization.jsx';
+import { CHART_NF_TYPE } from 'app/vnfSearch/VnfSearchConstants.js';
+import Spinner from 'utils/SpinnerContainer';
describe('VnfSearchNfTypeVisualization - Shallow render of component', () => {
let wrapper;
diff --git a/src/app/vnfSearch/VnfSearchOrchestratedStatusVisualization.test.js b/test/vnfSearch/VnfSearchOrchestratedStatusVisualization.test.js
index 1257f3a..2586079 100644
--- a/src/app/vnfSearch/VnfSearchOrchestratedStatusVisualization.test.js
+++ b/test/vnfSearch/VnfSearchOrchestratedStatusVisualization.test.js
@@ -5,9 +5,9 @@ import configureStore from 'redux-mock-store';
import { BarChart } from 'recharts';
import ConnectedVnfSearchOrchStatusVisualizations,
- { VnfSearchOrchStatusVisualizations } from './VnfSearchOrchestratedStatusVisualization.jsx';
-import { CHART_ORCH_STATUS } from './VnfSearchConstants.js';
-import Spinner from 'utils/SpinnerContainer.jsx';
+ { VnfSearchOrchStatusVisualizations } from 'app/vnfSearch/VnfSearchOrchestratedStatusVisualization.jsx';
+import { CHART_ORCH_STATUS } from 'app/vnfSearch/VnfSearchConstants.js';
+import Spinner from 'utils/SpinnerContainer';
describe('VnfSearchOrchStatusVisualizations - Shallow render of component', () => {
let wrapper;
diff --git a/src/app/vnfSearch/VnfSearchProvStatusVisualization.test.js b/test/vnfSearch/VnfSearchProvStatusVisualization.test.js
index 4812834..f3e7279 100644
--- a/src/app/vnfSearch/VnfSearchProvStatusVisualization.test.js
+++ b/test/vnfSearch/VnfSearchProvStatusVisualization.test.js
@@ -5,9 +5,9 @@ import configureStore from 'redux-mock-store';
import { BarChart } from 'recharts';
import ConnectedVnfSearchProvStatusVisualization,
- { VnfSearchProvStatusVisualization } from './VnfSearchProvStatusVisualization.jsx';
-import { CHART_PROV_STATUS } from './VnfSearchConstants.js';
-import Spinner from 'utils/SpinnerContainer.jsx';
+ { VnfSearchProvStatusVisualization } from 'app/vnfSearch/VnfSearchProvStatusVisualization.jsx';
+import { CHART_PROV_STATUS } from 'app/vnfSearch/VnfSearchConstants.js';
+import Spinner from 'utils/SpinnerContainer';
describe('VnfSearchProvStatusVisualization - Shallow render of component', () => {
let wrapper;
diff --git a/src/app/vnfSearch/VnfSearchReducer.test.js b/test/vnfSearch/VnfSearchReducer.test.js
index ff06770..381a696 100644
--- a/src/app/vnfSearch/VnfSearchReducer.test.js
+++ b/test/vnfSearch/VnfSearchReducer.test.js
@@ -1,4 +1,4 @@
-import VnfSearchReducer from './VnfSearchReducer.js';
+import VnfSearchReducer from 'app/vnfSearch/VnfSearchReducer.js';
import {
vnfActionTypes,
CHART_ORCH_STATUS,
@@ -6,12 +6,12 @@ import {
CHART_NF_ROLE,
CHART_NF_TYPE,
TOTAL_VNF_COUNT
-} from './VnfSearchConstants.js';
+} from 'app/vnfSearch/VnfSearchConstants.js';
import {ERROR_RETRIEVING_DATA} from 'app/networking/NetworkConstants.js';
import {
filterBarActionTypes,
MESSAGE_LEVEL_DANGER
-} from 'utils/GlobalConstants.js';
+} from 'utils/GlobalConstants';
import {
globalAutoCompleteSearchBarActionTypes
} from 'app/globalAutoCompleteSearchBar/GlobalAutoCompleteSearchBarConstants.js';
diff --git a/src/app/vnfSearch/VnfSearchTotalCountVisualization.test.js b/test/vnfSearch/VnfSearchTotalCountVisualization.test.js
index e891c12..a397ff2 100644
--- a/src/app/vnfSearch/VnfSearchTotalCountVisualization.test.js
+++ b/test/vnfSearch/VnfSearchTotalCountVisualization.test.js
@@ -4,9 +4,9 @@ import {Provider} from 'react-redux'
import configureStore from 'redux-mock-store';
import ConnectedVnfSearchTotalCountVisualization,
- { VnfSearchTotalCountVisualization } from './VnfSearchTotalCountVisualization.jsx';
-import { TOTAL_VNF_COUNT } from './VnfSearchConstants.js';
-import Spinner from 'utils/SpinnerContainer.jsx';
+ { VnfSearchTotalCountVisualization } from 'app/vnfSearch/VnfSearchTotalCountVisualization.jsx';
+import { TOTAL_VNF_COUNT } from 'app/vnfSearch/VnfSearchConstants.js';
+import Spinner from 'utils/SpinnerContainer';
describe('VnfSearchTotalCountVisualization - Shallow render of component', () => {
let wrapper;