VSP Compliance Check for Compute Flavor

Change-Id: I04768a20413393026606a3f5b200e959e37c1410
Issue-ID: SDC-2051
Co-authored-by: rahul.ghugikar@vodafone.com, soumyarup.paul@vodafone.com
Signed-off-by: Vodafone <onap@vodafone.com>
diff --git a/openecomp-ui/test/softwareProduct/validation/SoftwareProductValidationInputView.test.js b/openecomp-ui/test/softwareProduct/validation/SoftwareProductValidationInputView.test.js
index aa00a5d..68a8cdd 100644
--- a/openecomp-ui/test/softwareProduct/validation/SoftwareProductValidationInputView.test.js
+++ b/openecomp-ui/test/softwareProduct/validation/SoftwareProductValidationInputView.test.js
@@ -19,6 +19,7 @@
 
 import VspValidationInputsView from 'sdc-app/onboarding/softwareProduct/validation/inputs/VspValidationInputsView.jsx';
 import TestUtils from 'react-dom/test-utils';
+import { storeCreator } from 'sdc-app/AppStore.js';
 
 import { VSPComplianceCheckedFactory } from 'test-utils/factories/softwareProduct/SoftwareProductValidationFactory.js';
 import { VSPCertificationCheckedFactory } from 'test-utils/factories/softwareProduct/SoftwareProductValidationFactory.js';
@@ -26,6 +27,7 @@
 import { VSPTestsMapFactory } from 'test-utils/factories/softwareProduct/SoftwareProductValidationFactory.js';
 import { VSPTestsRequestFactory } from 'test-utils/factories/softwareProduct/SoftwareProductValidationFactory.js';
 import { VSPGeneralInfoFactory } from 'test-utils/factories/softwareProduct/SoftwareProductValidationFactory.js';
+import { mapActionsToProps } from 'sdc-app/onboarding/softwareProduct/validation/SoftwareProductValidation.js';
 
 describe('SoftwareProductValidation Mapper and View Classes', () => {
     it('mapStateToProps mapper exists', () => {
@@ -76,22 +78,39 @@
         const status = 'draft';
 
         var obj = {
-            version: version,
-            softwareProductId: softwareProductId,
-            status: status,
-            softwareProductValidation: {
-                complianceChecked: complianceChecked.complianceChecked,
-                certificationChecked: certificationChecked.certificationChecked,
-                vspTestsMap: vspTestsMap.vspTestsMap,
-                vspChecks: vspChecksList,
-                testsRequest: testsRequest.testsRequest,
-                generalInfo: generalInfo.generalInfo
+            softwareProduct: {
+                version: version,
+                softwareProductId: softwareProductId,
+                status: status,
+                softwareProductValidation: {
+                    complianceChecked: complianceChecked.complianceChecked,
+                    certificationChecked:
+                        certificationChecked.certificationChecked,
+                    vspTestsMap: vspTestsMap.vspTestsMap,
+                    vspChecks: vspChecksList,
+                    testsRequest: testsRequest.testsRequest,
+                    generalInfo: generalInfo.generalInfo
+                }
             }
         };
+        const store = storeCreator();
+        let dispatch = store.dispatch;
+        let props = Object.assign(
+            {},
+            mapStateToProps(obj),
+            mapActionsToProps(dispatch)
+        );
 
         let vspValidationInputView = TestUtils.renderIntoDocument(
-            <VspValidationInputsView {...obj} />
+            <VspValidationInputsView {...props} />
         );
         expect(vspValidationInputView).toBeTruthy();
+
+        let inputForm = TestUtils.findRenderedDOMComponentWithTag(
+            vspValidationInputView,
+            'form'
+        );
+        expect(inputForm).toBeTruthy();
+        TestUtils.Simulate.submit(inputForm);
     });
 });