summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master
diff options
context:
space:
mode:
authorAlexey Sandler <alexey.sandler@intl.att.com>2019-12-05 17:04:45 +0200
committerAlexey Sandler <alexey.sandler@intl.att.com>2019-12-05 17:06:06 +0200
commitf53a917032b6c71c3d2b8f536244d4ba2611c068 (patch)
tree9d3ab16f1492f3eb8ad4e07252afcef6d476016d /vid-webpack-master
parent0b62c11d045393d514d9c31dedad7d80febddd80 (diff)
Call to useTemplate create Action in order
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
Diffstat (limited to 'vid-webpack-master')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts8
-rw-r--r--vid-webpack-master/src/app/shared/services/templateService/instantiationTemplates.service.ts3
2 files changed, 6 insertions, 5 deletions
diff --git a/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
index 5f423f8c2..0b19b667c 100644
--- a/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
@@ -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);
+ });
});
});
diff --git a/vid-webpack-master/src/app/shared/services/templateService/instantiationTemplates.service.ts b/vid-webpack-master/src/app/shared/services/templateService/instantiationTemplates.service.ts
index 21cdc9296..018e0d367 100644
--- a/vid-webpack-master/src/app/shared/services/templateService/instantiationTemplates.service.ts
+++ b/vid-webpack-master/src/app/shared/services/templateService/instantiationTemplates.service.ts
@@ -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));
});
};