Call to useTemplate create Action in order 14/99214/1
authorAlexey Sandler <alexey.sandler@intl.att.com>
Thu, 5 Dec 2019 15:04:45 +0000 (17:04 +0200)
committerAlexey Sandler <alexey.sandler@intl.att.com>
Thu, 5 Dec 2019 15:06:06 +0000 (17:06 +0200)
to update state with template which was called from back end.

Issue-ID: VID-724
Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
Change-Id: I0726d54324e523d60bcd41116ee44b01a88d9c7b

vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
vid-webpack-master/src/app/shared/services/templateService/instantiationTemplates.service.ts

index 5f423f8..0b19b66 100644 (file)
@@ -47,10 +47,10 @@ describe('Drawing Board: Instantiation Templates', function () {
       // Then...
 
       cy.wait('@expectedPostAsyncInstantiation').then(xhr => {
-        //  cy.readFile('cypress/support/jsonBuilders/mocks/jsons/instantiationTemplates/templates__instance_template.json').then((expectedResult) => {
-        //    convertRollbackOnFailureValueFromStringToBoolean(expectedResult);
-        //     cy.deepCompare(xhr.request.body, expectedResult);
-        // });
+         cy.readFile('cypress/support/jsonBuilders/mocks/jsons/instantiationTemplates/templates__instance_template.json').then((expectedResult) => {
+           convertRollbackOnFailureValueFromStringToBoolean(expectedResult);
+            cy.deepCompare(xhr.request.body, expectedResult);
+        });
       });
 
     });
index 21cdc92..018e0d3 100644 (file)
@@ -6,6 +6,7 @@ import {Observable} from "rxjs";
 import {ServiceInstance} from "../../models/serviceInstance";
 import {Constants} from "../../utils/constants";
 import {createServiceInstance} from "../../storeUtil/utils/service/service.actions";
+import {createServiceInstanceFromTemplate} from "../../storeUtil/utils/useTemplate/useTemplate.action";
 
 @Injectable()
 export class InstantiationTemplatesService {
@@ -19,7 +20,7 @@ export class InstantiationTemplatesService {
 
   public retrieveAndStoreInstantiationTemplateTopology(jobId: string, serviceModelId: string): Observable<ServiceInstance> {
     return this.retrieveInstantiationTemplateTopology(jobId).do((instantiationTemplate: ServiceInstance) => {
-      this.store.dispatch(createServiceInstance(instantiationTemplate, serviceModelId));
+      this.store.dispatch(createServiceInstanceFromTemplate(instantiationTemplate, serviceModelId));
     });
   };