add test that verify delete and upgrade of the not upgraded vfm's

add cypress test that verify delete and upgrade of the not upgraded vfm's on a single click
Issue-ID: VID-798
Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
Change-Id: I293779c3bd48215b6830a99be9a423ce7cb29a5d
Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
diff --git a/vid-app-common/src/test/resources/payload_jsons/vfmodule/delete_vfmodule_expected_bulk.json b/vid-app-common/src/test/resources/payload_jsons/vfmodule/delete_vfmodule_expected_bulk.json
index 2be0662..804f6d8 100644
--- a/vid-app-common/src/test/resources/payload_jsons/vfmodule/delete_vfmodule_expected_bulk.json
+++ b/vid-app-common/src/test/resources/payload_jsons/vfmodule/delete_vfmodule_expected_bulk.json
@@ -1,9 +1,9 @@
 {
-  "action": "None",
+  "action": "None_Upgrade",
   "isDirty": true,
   "vnfs": {
     "fa546506-b754-445c-b0d6-d36b6978de77": {
-      "action": "None",
+      "action": "None_Upgrade",
       "instanceName": "PST-Vf-Phase-1-Vnf",
       "instanceId": "fa546506-b754-445c-b0d6-d36b6978de77",
       "orchStatus": "Active",
@@ -30,6 +30,42 @@
       "platformName": null,
       "trackById": "fa546506-b754-445c-b0d6-d36b6978de77",
       "vfModules": {
+        "xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0": {
+          "b0732bed-3ddf-43cc-b193-7f18db84e476": {
+            "action": "None_Upgrade",
+            "instanceName": "PST-VfMod-Replace-5-Vfmod",
+            "instanceId": "b0732bed-3ddf-43cc-b193-7f18db84e476",
+            "orchStatus": "Active",
+            "productFamilyId": null,
+            "lcpCloudRegionId": "olson5a",
+            "tenantId": "7ff7b1a4fe954f71ab79d3160ec3eb08",
+            "cloudOwner": "irma-aic",
+            "modelInfo": {
+              "modelCustomizationName": "XbiTestModuleReplace..base_ocg..module-0",
+              "modelCustomizationId": "3f1f0fcb-8a88-4612-a794-3912613ed9e8",
+              "modelInvariantId": "d887658e-2a89-4baf-83e2-b189601a1a7c",
+              "modelVersionId": "04b21d26-9780-4956-8329-b22b049329f4",
+              "modelType": "vfModule",
+              "modelVersion": "1"
+            },
+            "instanceType": null,
+            "provStatus": null,
+            "inMaint": false,
+            "uuid": "04b21d26-9780-4956-8329-b22b049329f4",
+            "originalName": "xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0",
+            "legacyRegion": null,
+            "lineOfBusiness": null,
+            "platformName": null,
+            "trackById": "b0732bed-3ddf-43cc-b193-7f18db84e476",
+            "isBase": true,
+            "volumeGroupName": null,
+            "retainAssignments": true,
+            "sdncPreLoad": false,
+            "supplementaryFile": null,
+            "supplementaryFile_hidden": null,
+            "supplementaryFile_hidden_content": null
+          }
+        },
         "mdns012220200..Mdns01222020..dns_az_01..module-1": {
           "48b9c7ae-490c-44af-b4dc-09b133d2fb89": {
             "action": "None_Delete",
@@ -64,7 +100,8 @@
         }
       },
       "networks": {},
-      "vnfStoreKey": "fa546506-b754-445c-b0d6-d36b6978de77"
+      "vnfStoreKey": "fa546506-b754-445c-b0d6-d36b6978de77",
+      "upgradedVFMSonsCounter": 1
     }
   },
   "vrfs": {},
@@ -94,7 +131,7 @@
     "modelVersionId": "a243da28-c11e-45a8-9f26-0284a9a789bc",
     "modelName": "CHARLOTTE 01222020 Svc",
     "modelType": "service",
-    "modelVersion": "3.0"
+    "modelVersion": "1.0"
   },
   "globalSubscriberId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
   "subscriptionServiceType": "Emanuel",
diff --git a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
index b949e66..6fb6675 100644
--- a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
@@ -143,7 +143,8 @@
     afterEach(() => {
       cy.screenshot();
     });
-    it(`Delete not upgraded VFM`, () => {
+
+    it(`Delete not upgraded VFM and upgrade another in a single click`, () => {
 
       const serviceType = 'Emanuel';
       const subscriberId = 'a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb';
@@ -172,8 +173,11 @@
       ).as("newestModelVersion2");
 
       cy.openIframe(`app/ui/#/servicePlanning/EDIT?serviceModelId=${serviceModelId}&subscriberId=${subscriberId}&serviceType=${serviceType}&serviceInstanceId=${serviceInstanceId}`);
-      cy.getElementByDataTestsId(`node-c449aaf8-2467-41a9-9015-730ab48ca19b-mdns012220200..Mdns01222020..dns_az_01..module-1-menu-btn`).click()
-      .drawingBoardTreeClickOnContextMenuOptionByName("Delete");
+
+      deleteTheVfm(`node-c449aaf8-2467-41a9-9015-730ab48ca19b-mdns012220200..Mdns01222020..dns_az_01..module-1`);
+
+      upgradeTheVFM(`node-04b21d26-9780-4956-8329-b22b049329f4-xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0`, false);
+
       cy.getElementByDataTestsId('delete-status-type').contains('Delete');
 
       mockAsyncBulkResponse();
@@ -302,6 +306,11 @@
     }).as("expectLatestServiceModelUpgradeVersion");
   }
 
+  function deleteTheVfm(treeNodeId: string) {
+    cy.getElementByDataTestsId(`${treeNodeId}-menu-btn`).click()
+    .drawingBoardTreeClickOnContextMenuOptionByName("Delete");
+  }
+
   function upgradeTheVFM(treeNodeId: string, shouldVGCheckboxExist :boolean) {
     cy.getElementByDataTestsId(`${treeNodeId}-menu-btn`).click()
     .drawingBoardTreeClickOnContextMenuOptionByName("Upgrade");
diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/deleteVfModule/delete_vfmodule_model.json b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/deleteVfModule/delete_vfmodule_model.json
index 8c94df0..25a4bc8 100644
--- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/deleteVfModule/delete_vfmodule_model.json
+++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/deleteVfModule/delete_vfmodule_model.json
@@ -46,6 +46,24 @@
       "type": "VF",
       "modelCustomizationName": "CHARLOTTE 01222020 0",
       "vfModules": {
+        "xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0": {
+          "uuid": "04b21d26-9780-4956-8329-b22b049329f4",
+          "invariantUuid": "d887658e-2a89-4baf-83e2-b189601a1a7c",
+          "customizationUuid": "3f1f0fcb-8a88-4612-a794-3912613ed9e8",
+          "description": null,
+          "name": "XbiTestModuleReplace..base_ocg..module-0",
+          "version": "3",
+          "modelCustomizationName": "XbiTestModuleReplace..base_ocg..module-0",
+          "properties": {
+            "minCountInstances": 1,
+            "maxCountInstances": 1,
+            "initialCount": 1,
+            "vfModuleLabel": "base_ocg",
+            "baseModule": true
+          },
+          "inputs": {},
+          "volumeGroupAllowed": false
+        },
         "mdns012220200..Mdns01222020..dns_az_01..module-1": {
           "uuid": "c449aaf8-2467-41a9-9015-730ab48ca19b",
           "invariantUuid": "a60135d6-8e3d-47bc-87dd-f56d60d6beb0",
@@ -75,6 +93,24 @@
   "fabricConfigurations": {},
   "serviceProxies": {},
   "vfModules": {
+    "xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0": {
+      "uuid": "04b21d26-9780-4956-8329-b22b049329f4",
+      "invariantUuid": "d887658e-2a89-4baf-83e2-b189601a1a7c",
+      "customizationUuid": "3f1f0fcb-8a88-4612-a794-3912613ed9e8",
+      "description": null,
+      "name": "XbiTestModuleReplace..base_ocg..module-0",
+      "version": "3",
+      "modelCustomizationName": "XbiTestModuleReplace..base_ocg..module-0",
+      "properties": {
+        "minCountInstances": 1,
+        "maxCountInstances": 1,
+        "initialCount": 1,
+        "vfModuleLabel": "base_ocg",
+        "baseModule": true
+      },
+      "inputs": {},
+      "volumeGroupAllowed": false
+    },
     "mdns012220200..Mdns01222020..dns_az_01..module-1": {
       "uuid": "c449aaf8-2467-41a9-9015-730ab48ca19b",
       "invariantUuid": "a60135d6-8e3d-47bc-87dd-f56d60d6beb0",
diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/deleteVfModule/delete_vfmodule_service_instance.json b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/deleteVfModule/delete_vfmodule_service_instance.json
index 0b00415..ad4a1b8 100644
--- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/deleteVfModule/delete_vfmodule_service_instance.json
+++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/deleteVfModule/delete_vfmodule_service_instance.json
@@ -12,7 +12,7 @@
     "modelVersionId": "a243da28-c11e-45a8-9f26-0284a9a789bc",
     "modelName": "CHARLOTTE 01222020 Svc",
     "modelType": "service",
-    "modelVersion": "3.0"
+    "modelVersion": "1.0"
   },
   "globalSubscriberId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
   "subscriptionServiceType": "Emanuel",
@@ -53,6 +53,38 @@
       "platformName": null,
       "trackById": "fa546506-b754-445c-b0d6-d36b6978de77",
       "vfModules": {
+        "xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0": {
+          "b0732bed-3ddf-43cc-b193-7f18db84e476": {
+            "action": "None",
+            "instanceName": "PST-VfMod-Replace-5-Vfmod",
+            "instanceId": "b0732bed-3ddf-43cc-b193-7f18db84e476",
+            "orchStatus": "Active",
+            "productFamilyId": null,
+            "lcpCloudRegionId": "olson5a",
+            "tenantId": "7ff7b1a4fe954f71ab79d3160ec3eb08",
+            "cloudOwner": "irma-aic",
+            "modelInfo": {
+              "modelCustomizationName": "XbiTestModuleReplace..base_ocg..module-0",
+              "modelCustomizationId": "3f1f0fcb-8a88-4612-a794-3912613ed9e8",
+              "modelInvariantId": "d887658e-2a89-4baf-83e2-b189601a1a7c",
+              "modelVersionId": "04b21d26-9780-4956-8329-b22b049329f4",
+              "modelType": "vfModule",
+              "modelVersion": "1"
+
+            },
+            "instanceType": null,
+            "provStatus": null,
+            "inMaint": false,
+            "uuid": "04b21d26-9780-4956-8329-b22b049329f4",
+            "originalName": "xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0",
+            "legacyRegion": null,
+            "lineOfBusiness": null,
+            "platformName": null,
+            "trackById": "b0732bed-3ddf-43cc-b193-7f18db84e476",
+            "isBase": true,
+            "volumeGroupName": null
+          }
+        },
         "mdns012220200..Mdns01222020..dns_az_01..module-1": {
           "48b9c7ae-490c-44af-b4dc-09b133d2fb89": {
             "action": "None",