summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/test/softwareProduct/components/monitoring
diff options
context:
space:
mode:
authortalig <talig@amdocs.com>2017-12-20 14:30:43 +0200
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2017-12-21 11:12:33 +0000
commit8e9c0653dd6c6862123c9609ae34e1206d86456e (patch)
tree5eeef00ec0677133baa439ca8d7ffd7aca4804b6 /openecomp-ui/test/softwareProduct/components/monitoring
parent785ebcc95de3e064e843bec04ba7a209d854fc7c (diff)
Add collaboration feature
Issue-ID: SDC-767 Change-Id: I14fb4c1f54086ed03a56a7ff7fab9ecd40381795 Signed-off-by: talig <talig@amdocs.com>
Diffstat (limited to 'openecomp-ui/test/softwareProduct/components/monitoring')
-rw-r--r--openecomp-ui/test/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoring.test.js14
-rw-r--r--openecomp-ui/test/softwareProduct/components/monitoring/test.js8
2 files changed, 7 insertions, 15 deletions
diff --git a/openecomp-ui/test/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoring.test.js b/openecomp-ui/test/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoring.test.js
index 423a7b39f6..21e58057e9 100644
--- a/openecomp-ui/test/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoring.test.js
+++ b/openecomp-ui/test/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoring.test.js
@@ -85,24 +85,18 @@ describe('SoftwareProductComponentsMonitoring Module Tests', function () {
expect(renderedOutput).toBeTruthy();
});
- it('should change state to dragging', done => {
+ it('should change state to dragging', () => {
var view = TestUtils.renderIntoDocument(<SoftwareProductComponentsMonitoringView />);
expect(view.state.dragging).toBe(false);
view.handleOnDragEnter(false);
- setTimeout(()=> {
- expect(view.state.dragging).toBe(true);
- done();
- }, 100);
+ expect(view.state.dragging).toBe(true);
});
- it('should not change state to dragging', done => {
+ it('should not change state to dragging', () => {
var view = TestUtils.renderIntoDocument(<SoftwareProductComponentsMonitoringView />);
expect(view.state.dragging).toBe(false);
view.handleOnDragEnter(true);
- setTimeout(()=> {
- expect(view.state.dragging).toBe(false);
- done();
- }, 0);
+ expect(view.state.dragging).toBe(false);
});
});
diff --git a/openecomp-ui/test/softwareProduct/components/monitoring/test.js b/openecomp-ui/test/softwareProduct/components/monitoring/test.js
index 8fafcdb968..50fda91871 100644
--- a/openecomp-ui/test/softwareProduct/components/monitoring/test.js
+++ b/openecomp-ui/test/softwareProduct/components/monitoring/test.js
@@ -16,16 +16,14 @@
import mockRest from 'test-utils/MockRest.js';
import {storeCreator} from 'sdc-app/AppStore.js';
-import SoftwareProductComponentsMonitoringConstants from 'sdc-app/onboarding/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoringConstants.js';
import SoftwareProductComponentsMonitoringActionHelper from 'sdc-app/onboarding/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoringActionHelper.js';
import {fileTypes} from 'sdc-app/onboarding/softwareProduct/components/monitoring/SoftwareProductComponentsMonitoringConstants.js';
-
+import VersionFactory from 'test-utils/factories/common/VersionFactory.js';
import {VSPComponentsMonitoringRestFactory, trap, poll, ves} from 'test-utils/factories/softwareProduct/SoftwareProductComponentsMonitoringFactories.js';
-import VersionControllerUtilsFactory from 'test-utils/factories/softwareProduct/VersionControllerUtilsFactory.js';
const softwareProductId = '123';
const componentId = '123';
-const version = VersionControllerUtilsFactory.build().version;
+const version = VersionFactory.build();
describe('Software Product Components Monitoring Module Tests', function () {
@@ -132,7 +130,7 @@ describe('Software Product Components Monitoring Module Tests', function () {
version,
componentId,
type: fileTypes.SNMP_TRAP
- }).then((dispatch) => {
+ }).then(() => {
var {softwareProduct: {softwareProductComponents: {monitoring}}} = store.getState();
expect(monitoring[trap]).toEqual(undefined);
done();