summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2019-09-04 15:49:54 +0530
committerTakamune Cho <takamune.cho@att.com>2019-09-06 17:50:59 +0000
commit24df8b02ff6c40196756c4091260827e900eb66f (patch)
treeae11c9d133e6fbea7205c92fcfb3a045ccd45b80 /src
parentb278a4c68382e5474bd5b989283f07e37c6f958f (diff)
template-configuration component spec changes
Fixed test case in this component Issue-ID: APPC-1632 Change-Id: Ic1a8d4616a0f5abe6bf90fe012b5d1af7456bbf4 Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/app/vnfs/build-artifacts/template-holder/template-configuration/template-configuration.component.spec.ts28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/app/vnfs/build-artifacts/template-holder/template-configuration/template-configuration.component.spec.ts b/src/app/vnfs/build-artifacts/template-holder/template-configuration/template-configuration.component.spec.ts
index d96519a..e4c4e42 100644
--- a/src/app/vnfs/build-artifacts/template-holder/template-configuration/template-configuration.component.spec.ts
+++ b/src/app/vnfs/build-artifacts/template-holder/template-configuration/template-configuration.component.spec.ts
@@ -134,7 +134,7 @@ describe('GoldenConfigurationComponent', () => {
});
- fit('validate initialisation of variables in ngOnit() function', inject([MappingEditorService], (mappingEditorService: MappingEditorService) => {
+ it('validate initialisation of variables in ngOnit() function', inject([MappingEditorService], (mappingEditorService: MappingEditorService) => {
fixture = TestBed.createComponent(GoldenConfigurationComponent);
component = fixture.componentInstance;
mappingEditorService.newObject = {
@@ -476,10 +476,34 @@ describe('GoldenConfigurationComponent', () => {
// End fileChange method
it('should give the correct template artifact name when multiple template identifiers are provided from reference page', inject([MappingEditorService], (mappingEditorService: MappingEditorService) => {
+ mappingEditorService.newObject = {
+ "action": "Configure",
+ "action-level": "vnf",
+ "scope": { "vnf-type": "testVnf", "vnfc-type": "" },
+ "template": "Y",
+ "vm": [],
+ "device-protocol":
+ "CHEF",
+ "user-name": "",
+ "port-number": "",
+ "artifact-list": [{
+ "artifact-name": "template_ConfigScaleOut_test_0.0.1V_id1.json",
+ "artifact-type": "config_template"
+ },
+ {
+ "artifact-name": "pd_Configure_test_0.0.1V.yaml",
+ "artifact-type": "parameter_definitions"
+ }],
+ "scopeType": "vnf-type",
+ "vnf": "testVnf",
+ "vnfc": "",
+ "protocol": "CHEF",
+ "template_artifact": "template_ConfigScaleOut_test_0.0.1V_id1.json"
+ }
fixture = TestBed.createComponent(GoldenConfigurationComponent);
component = fixture.componentInstance;
+ fixture.detectChanges();
mappingEditorService.identifier = "id1";
- mappingEditorService.latestAction = { "action": "ConfigScaleOut", "action-level": "vnf", "scope": { "vnf-type": "test", "vnfc-type": "" }, "template": "Y", "vm": [], "device-protocol": "CHEF", "user-name": "", "port-number": "", "artifact-list": [{ "artifact-name": "template_ConfigScaleOut_test_0.0.1V_id1.json", "artifact-type": "config_template" }, { "artifact-name": "pd_ConfigScaleOut_test_0.0.1V_id1.yaml", "artifact-type": "parameter_definitions" }, { "artifact-name": "template_ConfigScaleOut_test_0.0.1V_id2.json", "artifact-type": "config_template" }, { "artifact-name": "pd_ConfigScaleOut_test_0.0.1V_id2.yaml", "artifact-type": "parameter_definitions" }], "template-id-list": ["id1", "id2"], "scopeType": "vnf-type" };
component.ngAfterViewInit();
expect(component.artifactName).toBe("template_ConfigScaleOut_test_0.0.1V_id1.json");
}));