Merge "Fix intermittent test failure"
[vid.git] / vid-webpack-master / cypress / integration / iFrames / vnf.update.e2e.ts
index 7c942ea..a81270c 100644 (file)
@@ -9,15 +9,13 @@ describe('Delete vnf instance', function () {
   let jsonBuilderInstantiationBuilder: JsonBuilder<AsyncInstantiationModel> = new JsonBuilder<AsyncInstantiationModel>();
 
   beforeEach(() => {
-    cy.window().then((win) => {
-      win.sessionStorage.clear();
+      cy.clearSessionStorage();
       cy.preventErrorsOnLoading();
       cy.initAAIMock();
       cy.initVidMock();
       cy.initZones();
       cy.permissionVidMock();
       cy.login();
-    });
   });
 
   afterEach(() => {
@@ -54,10 +52,12 @@ describe('Delete vnf instance', function () {
       res.instanceId = "f8791436-8d55-4fde-b4d5-72dd2cf13cfb";
 
       const vnf = res.vnfs['2017-488_PASQUALE-vPE 0'];
+
       vnf.instanceId = "VNF_INSTANCE_ID";
       vnf.vfModules['2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0']['2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0uvfot'].instanceId = "VF_MODULE_BASE_INSTANCE_ID";
       vnf.vfModules['2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1']['2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1fshmc'].instanceId = "VF_MODULE_INSTANCE_ID";
 
+
       jsonBuilderAndMock.basicJson(
         res,
         Cypress.config('baseUrl') + "/aai_get_service_instance_topology/e433710f-9217-458d-a79d-1c7aff376d89/TYLER SILVIA/f8791436-8d55-4fde-b4d5-72dd2cf13cfb",
@@ -85,6 +85,7 @@ describe('Delete vnf instance', function () {
       cy.wait('@expectedPostAsyncInstantiation').then(xhr => {
         cy.readFile('../vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Vnf.json').then((expectedResult) => {
           expectedResult.vnfs["2017-388_PASQUALE-vPE 0_1"].trackById = vnf.trackById;
+          expectedResult.vnfs["2017-388_PASQUALE-vPE 0_1"].instanceName = '2017-388_PASQUALE-vPE';
           cy.deepCompare(expectedResult, xhr.request.body);
         });
       });