summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/test/softwareProduct/components/monitoring
diff options
context:
space:
mode:
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();