1 import {getTestBed, TestBed} from '@angular/core/testing';
2 import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
3 import {FormBuilder, FormGroup} from '@angular/forms';
4 import {GenericFormPopupService} from "./generic-form-popup.service";
5 import {IframeService} from "../../utils/iframe.service";
6 import {NgRedux} from "@angular-redux/store";
7 import {ServicePopupService} from "./genericFormServices/service/service.popup.service";
8 import {BasicControlGenerator} from "../genericForm/formControlsServices/basic.control.generator";
9 import {AaiService} from "../../services/aaiService/aai.service";
10 import {ServiceControlGenerator} from "../genericForm/formControlsServices/service.control.generator";
11 import {GenericFormService} from "../genericForm/generic-form.service";
12 import {LogService} from "../../utils/log/log.service";
13 import {DefaultDataGeneratorService} from "../../services/defaultDataServiceGenerator/default.data.generator.service";
14 import {BasicPopupService} from "./genericFormServices/basic.popup.service";
15 import {ActivatedRoute} from "@angular/router";
16 import {UUIDData} from "./generic-form-popup.component";
17 import {ITreeNode} from "angular-tree-component/dist/defs/api";
18 import {NetworkPopupService} from "./genericFormServices/network/network.popup.service";
19 import {NetworkControlGenerator} from "../genericForm/formControlsServices/networkGenerator/network.control.generator";
20 import {VfModulePopuopService} from "./genericFormServices/vfModule/vfModule.popuop.service";
21 import {VfModuleControlGenerator} from "../genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator";
22 import {FeatureFlagsService} from "../../services/featureFlag/feature-flags.service";
23 import {VfModuleUpgradePopupService} from "./genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service";
25 class MockAppStore<T>{
31 "FLAG_NETWORK_TO_ASYNC_INSTANTIATION": false,
32 "FLAG_SHOW_ASSIGNMENTS": true,
33 "FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS": true,
34 "FLAG_SHOW_VERIFY_SERVICE": false,
35 "FLAG_SERVICE_MODEL_CACHE": true,
36 "FLAG_ADD_MSO_TESTAPI_FIELD": true
38 "type": "[FLAGS] Update"
42 "6e59c5de-f052-46fa-aa7e-2fca9d674c44": {
44 "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
45 "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
46 "name": "ComplexService",
48 "toscaModelURL": null,
49 "category": "Emanuel",
52 "description": "ComplexService",
53 "serviceEcompNaming": "false",
54 "instantiationType": "Macro",
56 "instantiationType": "Macro"
62 "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
63 "invariantUuid": "4160458e-f648-4b30-a176-43881ffffe9e",
64 "description": "VSP_vGeraldine",
65 "name": "VF_vGeraldine",
67 "customizationUuid": "91415b44-753d-494c-926a-456a9172bbb9",
70 "serviceEcompNaming" : "true",
72 "ecomp_generated_naming": "false",
75 "gpb2_Internal2_mac": "00:11:22:EF:AC:DF",
76 "sctp-b-ipv6-egress_src_start_port": "0",
77 "sctp-a-ipv6-egress_rule_application": "any",
78 "Internal2_allow_transit": "true",
79 "sctp-b-IPv6_ethertype": "IPv6",
80 "sctp-a-egress_rule_application": "any",
81 "sctp-b-ingress_action": "pass",
82 "sctp-b-ingress_rule_protocol": "icmp",
83 "ncb2_Internal1_mac": "00:11:22:EF:AC:DF",
84 "sctp-b-ipv6-ingress-src_start_port": "0.0",
85 "ncb1_Internal2_mac": "00:11:22:EF:AC:DF",
86 "fsb_volume_size_0": "320.0",
87 "sctp-b-egress_src_addresses": "local",
88 "sctp-a-ipv6-ingress_ethertype": "IPv4",
89 "sctp-a-ipv6-ingress-dst_start_port": "0",
90 "sctp-b-ipv6-ingress_rule_application": "any",
91 "domain_name": "default-domain",
92 "sctp-a-ingress_rule_protocol": "icmp",
93 "sctp-b-egress-src_start_port": "0.0",
94 "sctp-a-egress_src_addresses": "local",
95 "sctp-b-display_name": "epc-sctp-b-ipv4v6-sec-group",
96 "sctp-a-egress-src_start_port": "0.0",
97 "sctp-a-ingress_ethertype": "IPv4",
98 "sctp-b-ipv6-ingress-dst_end_port": "65535",
99 "sctp-b-dst_subnet_prefix_v6": "::",
100 "nf_naming": "{ecomp_generated_naming=true}",
101 "sctp-a-ipv6-ingress_src_subnet_prefix": "0.0.0.0",
102 "sctp-b-egress-dst_start_port": "0.0",
103 "ncb_flavor_name": "nv.c20r64d1",
104 "gpb1_Internal1_mac": "00:11:22:EF:AC:DF",
105 "sctp-b-egress_dst_subnet_prefix_len": "0.0",
106 "Internal2_net_cidr": "10.0.0.10",
107 "sctp-a-ingress-dst_start_port": "0.0",
108 "sctp-a-egress-dst_start_port": "0.0",
109 "fsb1_Internal2_mac": "00:11:22:EF:AC:DF",
110 "sctp-a-egress_ethertype": "IPv4",
111 "vlc_st_service_mode": "in-network-nat",
112 "sctp-a-ipv6-egress_ethertype": "IPv4",
113 "sctp-a-egress-src_end_port": "65535.0",
114 "sctp-b-ipv6-egress_rule_application": "any",
115 "sctp-b-egress_action": "pass",
116 "sctp-a-ingress-src_subnet_prefix_len": "0.0",
117 "sctp-b-ipv6-ingress-src_end_port": "65535.0",
118 "sctp-b-name": "epc-sctp-b-ipv4v6-sec-group",
119 "fsb2_Internal1_mac": "00:11:22:EF:AC:DF",
120 "sctp-a-ipv6-ingress-src_start_port": "0.0",
121 "sctp-b-ipv6-egress_ethertype": "IPv4",
122 "Internal1_net_cidr": "10.0.0.10",
123 "sctp-a-egress_dst_subnet_prefix": "0.0.0.0",
124 "fsb_flavor_name": "nv.c20r64d1",
125 "sctp_rule_protocol": "132",
126 "sctp-b-ipv6-ingress_src_subnet_prefix_len": "0",
127 "sctp-a-ipv6-ingress_rule_application": "any",
128 "sctp-a-IPv6_ethertype": "IPv6",
129 "vlc2_Internal1_mac": "00:11:22:EF:AC:DF",
130 "vlc_st_virtualization_type": "virtual-machine",
131 "sctp-b-ingress-dst_start_port": "0.0",
132 "sctp-b-ingress-dst_end_port": "65535.0",
133 "sctp-a-ipv6-ingress-src_end_port": "65535.0",
134 "sctp-a-display_name": "epc-sctp-a-ipv4v6-sec-group",
135 "sctp-b-ingress_rule_application": "any",
136 "int2_sec_group_name": "int2-sec-group",
137 "vlc_flavor_name": "nd.c16r64d1",
138 "sctp-b-ipv6-egress_src_addresses": "local",
139 "vlc_st_interface_type_int1": "other1",
140 "sctp-b-egress-src_end_port": "65535.0",
141 "sctp-a-ipv6-egress-dst_start_port": "0",
142 "vlc_st_interface_type_int2": "other2",
143 "sctp-a-ipv6-egress_rule_protocol": "any",
144 "Internal2_shared": "false",
145 "sctp-a-ipv6-egress_dst_subnet_prefix_len": "0",
146 "Internal2_rpf": "disable",
147 "vlc1_Internal1_mac": "00:11:22:EF:AC:DF",
148 "sctp-b-ipv6-egress_src_end_port": "65535",
149 "sctp-a-ipv6-egress_src_addresses": "local",
150 "sctp-a-ingress-dst_end_port": "65535.0",
151 "sctp-a-ipv6-egress_src_end_port": "65535",
152 "Internal1_forwarding_mode": "l2",
153 "Internal2_dhcp": "false",
154 "sctp-a-dst_subnet_prefix_v6": "::",
155 "pxe_image_name": "MME_PXE-Boot_16ACP04_GA.qcow2",
156 "vlc_st_interface_type_gtp": "other0",
157 "ncb1_Internal1_mac": "00:11:22:EF:AC:DF",
158 "sctp-b-src_subnet_prefix_v6": "::",
159 "sctp-a-egress_dst_subnet_prefix_len": "0.0",
160 "int1_sec_group_name": "int1-sec-group",
161 "Internal1_dhcp": "false",
162 "sctp-a-ipv6-egress_dst_end_port": "65535",
163 "Internal2_forwarding_mode": "l2",
164 "fsb2_Internal2_mac": "00:11:22:EF:AC:DF",
165 "sctp-b-egress_dst_subnet_prefix": "0.0.0.0",
166 "Internal1_net_cidr_len": "17",
167 "gpb2_Internal1_mac": "00:11:22:EF:AC:DF",
168 "sctp-b-ingress-src_subnet_prefix_len": "0.0",
169 "sctp-a-ingress_dst_addresses": "local",
170 "sctp-a-egress_action": "pass",
171 "fsb_volume_type_0": "SF-Default-SSD",
172 "ncb2_Internal2_mac": "00:11:22:EF:AC:DF",
173 "vlc_st_interface_type_sctp_a": "left",
174 "vlc_st_interface_type_sctp_b": "right",
175 "sctp-a-src_subnet_prefix_v6": "::",
176 "vlc_st_version": "2",
177 "sctp-b-egress_ethertype": "IPv4",
178 "sctp-a-ingress_rule_application": "any",
179 "gpb1_Internal2_mac": "00:11:22:EF:AC:DF",
180 "instance_ip_family_v6": "v6",
181 "sctp-a-ipv6-egress_src_start_port": "0",
182 "sctp-b-ingress-src_start_port": "0.0",
183 "sctp-b-ingress_dst_addresses": "local",
184 "fsb1_Internal1_mac": "00:11:22:EF:AC:DF",
185 "vlc_st_interface_type_oam": "management",
186 "multi_stage_design": "true",
187 "oam_sec_group_name": "oam-sec-group",
188 "Internal2_net_gateway": "10.0.0.10",
189 "sctp-a-ipv6-ingress-dst_end_port": "65535",
190 "sctp-b-ipv6-egress-dst_start_port": "0",
191 "Internal1_net_gateway": "10.0.0.10",
192 "sctp-b-ipv6-egress_rule_protocol": "any",
193 "gtp_sec_group_name": "gtp-sec-group",
194 "sctp-a-ipv6-egress_dst_subnet_prefix": "0.0.0.0",
195 "sctp-b-ipv6-egress_dst_subnet_prefix_len": "0",
196 "sctp-a-ipv6-ingress_dst_addresses": "local",
197 "sctp-a-egress_rule_protocol": "icmp",
198 "sctp-b-ipv6-egress_action": "pass",
199 "sctp-a-ipv6-egress_action": "pass",
200 "Internal1_shared": "false",
201 "sctp-b-ipv6-ingress_rule_protocol": "any",
202 "Internal2_net_cidr_len": "17",
203 "sctp-a-name": "epc-sctp-a-ipv4v6-sec-group",
204 "sctp-a-ingress-src_end_port": "65535.0",
205 "sctp-b-ipv6-ingress_src_subnet_prefix": "0.0.0.0",
206 "sctp-a-egress-dst_end_port": "65535.0",
207 "sctp-a-ingress_action": "pass",
208 "sctp-b-egress_rule_protocol": "icmp",
209 "sctp-b-ipv6-ingress_action": "pass",
210 "vlc_st_service_type": "firewall",
211 "sctp-b-ipv6-egress_dst_end_port": "65535",
212 "sctp-b-ipv6-ingress-dst_start_port": "0",
213 "vlc2_Internal2_mac": "00:11:22:EF:AC:DF",
214 "vlc_st_availability_zone": "true",
215 "fsb_volume_image_name_1": "MME_FSB2_16ACP04_GA.qcow2",
216 "sctp-b-ingress-src_subnet_prefix": "0.0.0.0",
217 "sctp-a-ipv6-ingress_src_subnet_prefix_len": "0",
218 "Internal1_allow_transit": "true",
219 "gpb_flavor_name": "nv.c20r64d1",
220 "availability_zone_max_count": "1",
221 "fsb_volume_image_name_0": "MME_FSB1_16ACP04_GA.qcow2",
222 "sctp-b-ipv6-ingress_dst_addresses": "local",
223 "sctp-b-ipv6-egress_dst_subnet_prefix": "0.0.0.0",
224 "sctp-b-ipv6-ingress_ethertype": "IPv4",
225 "vlc1_Internal2_mac": "00:11:22:EF:AC:DF",
226 "sctp-a-ingress-src_subnet_prefix": "0.0.0.0",
227 "sctp-a-ipv6-ingress_action": "pass",
228 "Internal1_rpf": "disable",
229 "sctp-b-ingress_ethertype": "IPv4",
230 "sctp-b-egress_rule_application": "any",
231 "sctp-b-ingress-src_end_port": "65535.0",
232 "sctp-a-ipv6-ingress_rule_protocol": "any",
233 "sctp-a-ingress-src_start_port": "0.0",
234 "sctp-b-egress-dst_end_port": "65535.0"
237 "modelCustomizationName": "VF_vGeraldine 0",
239 "vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1": {
240 "uuid": "522159d5-d6e0-4c2a-aa44-5a542a12a830",
241 "invariantUuid": "98a7c88b-b577-476a-90e4-e25a5871e02b",
242 "customizationUuid": "55b1be94-671a-403e-a26c-667e9c47d091",
244 "name": "VfVgeraldine..vflorence_vlc..module-1",
246 "modelCustomizationName": "VfVgeraldine..vflorence_vlc..module-1",
248 "minCountInstances": 0,
249 "maxCountInstances": null,
251 "vfModuleLabel": "vflorence_vlc"
254 "volumeGroupAllowed": true
256 "vf_vgeraldine0..VfVgeraldine..vflorence_gpb..module-2": {
257 "uuid": "41708296-e443-4c71-953f-d9a010f059e1",
258 "invariantUuid": "1cca90b8-3490-495e-87da-3f3e4c57d5b9",
259 "customizationUuid": "6add59e0-7fe1-4bc4-af48-f8812422ae7c",
261 "name": "VfVgeraldine..vflorence_gpb..module-2",
263 "modelCustomizationName": "VfVgeraldine..vflorence_gpb..module-2",
265 "minCountInstances": 0,
266 "maxCountInstances": null,
268 "vfModuleLabel": "vflorence_gpb"
271 "volumeGroupAllowed": false
273 "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
274 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
275 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
276 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
278 "name": "VfVgeraldine..base_vflorence..module-0",
280 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
282 "minCountInstances": 1,
283 "maxCountInstances": 1,
285 "vfModuleLabel": "base_vflorence"
288 "volumeGroupAllowed": true
292 "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
293 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
294 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
295 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
297 "name": "VfVgeraldine..base_vflorence..module-0",
299 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
301 "minCountInstances": 1,
302 "maxCountInstances": 1,
304 "vfModuleLabel": "base_vflorence"
309 "vfcInstanceGroups": {}
314 "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986",
315 "invariantUuid": "379f816b-a7aa-422f-be30-17114ff50b7c",
316 "description": "ECOMP generic virtual link (network) base type for all other service-level and global networks",
319 "customizationUuid": "94fdd893-4a36-4d70-b16a-ec29c54c184f",
323 "ecomp_generated_naming": "false",
324 "network_assignments": "{is_external_network=false, ipv4_subnet_default_assignment={min_subnets_count=1}, ecomp_generated_network_assignment=false, ipv6_subnet_default_assignment={min_subnets_count=1}}",
325 "exVL_naming": "{ecomp_generated_naming=true}",
326 "network_flows": "{is_network_policy=false, is_bound_to_vpn=false}",
327 "network_homing": "{ecomp_selected_instance_node_target=false}"
330 "modelCustomizationName": "ExtVL 0"
333 "collectionResources": {},
335 "Port Mirroring Configuration By Policy 0": {
336 "uuid": "b4398538-e89d-4f13-b33d-ca323434ba50",
337 "invariantUuid": "6ef0ca40-f366-4897-951f-abd65d25f6f7",
338 "description": "A port mirroring configuration by policy object",
339 "name": "Port Mirroring Configuration By Policy",
341 "customizationUuid": "3c3b7b8d-8669-4b3b-8664-61970041fad2",
345 "type": "Configuration",
346 "modelCustomizationName": "Port Mirroring Configuration By Policy 0",
348 "collectorNodes": null,
349 "configurationByPolicy": false
352 "serviceProxies": {},
354 "vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1": {
355 "uuid": "522159d5-d6e0-4c2a-aa44-5a542a12a830",
356 "invariantUuid": "98a7c88b-b577-476a-90e4-e25a5871e02b",
357 "customizationUuid": "55b1be94-671a-403e-a26c-667e9c47d091",
359 "name": "VfVgeraldine..vflorence_vlc..module-1",
361 "modelCustomizationName": "VfVgeraldine..vflorence_vlc..module-1",
363 "minCountInstances": 0,
364 "maxCountInstances": null,
366 "vfModuleLabel": "vflorence_vlc"
369 "volumeGroupAllowed": true
371 "vf_vgeraldine0..VfVgeraldine..vflorence_gpb..module-2": {
372 "uuid": "41708296-e443-4c71-953f-d9a010f059e1",
373 "invariantUuid": "1cca90b8-3490-495e-87da-3f3e4c57d5b9",
374 "customizationUuid": "6add59e0-7fe1-4bc4-af48-f8812422ae7c",
376 "name": "VfVgeraldine..vflorence_gpb..module-2",
378 "modelCustomizationName": "VfVgeraldine..vflorence_gpb..module-2",
380 "minCountInstances": 0,
381 "maxCountInstances": null,
383 "vfModuleLabel": "vflorence_gpb"
386 "volumeGroupAllowed": false
388 "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
389 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
390 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
391 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
393 "name": "VfVgeraldine..base_vflorence..module-0",
395 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
397 "minCountInstances": 1,
398 "maxCountInstances": 1,
400 "vfModuleLabel": "base_vflorence"
403 "volumeGroupAllowed": true
407 "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
408 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
409 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
410 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
412 "name": "VfVgeraldine..base_vflorence..module-0",
414 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
416 "minCountInstances": 1,
417 "maxCountInstances": 1,
419 "vfModuleLabel": "base_vflorence"
428 "6e59c5de-f052-46fa-aa7e-2fca9d674c44": {
432 "rollbackOnFailure": "true",
434 "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
435 "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0vmvzo": {
436 "isMissingData": false,
437 "sdncPreReload": null,
439 "modelType": "VFmodule",
440 "modelInvariantId": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
441 "modelVersionId": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
442 "modelName": "VfVgeraldine..base_vflorence..module-0",
444 "modelCustomizationId": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
445 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0"
450 "trackById": "wmtm6sy2uj"
454 "isMissingData": true,
455 "originalName": "VF_vGeraldine 0",
456 "vnfStoreKey": "VF_vGeraldine 0",
457 "trackById": "p3wk448m5do",
458 "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
459 "productFamilyId": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
460 "lcpCloudRegionId": null,
462 "lineOfBusiness": null,
463 "platformName": null,
466 "modelInvariantId": "4160458e-f648-4b30-a176-43881ffffe9e",
467 "modelVersionId": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
468 "modelName": "VF_vGeraldine",
469 "modelVersion": "2.0",
470 "modelCustomizationName": "VF_vGeraldine 0"
477 "validationCounter": 1,
479 "existingVNFCounterMap": {
480 "d6557200-ecf2-4641-8094-5393ae3aae60": 1
482 "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
483 "subscriptionServiceType": "TYLER SILVIA",
484 "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
485 "productFamilyId": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
486 "lcpCloudRegionId": "hvf6",
487 "tenantId": "229bcdc6eaeb4ca59d55221141d01f8e",
490 "rollbackOnFailure": "true",
493 "modelInvariantId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
494 "modelVersionId": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
495 "modelName": "ComplexService",
496 "modelVersion": "1.0",
497 "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44"
500 "name": "ComplexService",
502 "description": "ComplexService",
503 "category": "Emanuel",
504 "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
505 "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
508 "isEcompGeneratedNaming": true,
509 "isMultiStepDesign": false
512 "lcpRegionsAndTenants": {
525 "lcpRegionsTenantsMap": {
528 "id": "092eb9e8e4b7412e8787dd091bc58e86",
529 "name": "USP-SIP-IC-24335-T-01",
535 "id": "bae71557c5bb4d5aac6743a4e5f1d054",
536 "name": "AIN Web Tool-15-D-testalexandria",
540 "id": "d0a3e3f2964542259d155a81c41aadc3",
541 "name": "test-hvf6-09",
545 "id": "fa45ca53c80b492fa8be5477cd84fc2b",
550 "id": "4914ab0ab3a743e58f0eefdacc1dde77",
551 "name": "DN5242-Nov21-T1",
555 "id": "d0a3e3f2964542259d155a81c41aadc3",
556 "name": "test-hvf6-09",
560 "id": "cbb99fe4ada84631b7baf046b6fd2044",
561 "name": "DN5242-Nov16-T3",
569 "id": "ebc3bc3d-62fd-4a3f-a037-f619df4ff034",
574 "id": "17cc1042-527b-11e6-beb8-9e71128cae77",
579 "id": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
584 "id": "a4f6f2ae-9bf5-4ed7-b904-06b2099c4bd7",
585 "name": "Enhanced Services",
594 "id": "323d69d9-2efe-4r45-ay0a-89ea7ard4e6f",
595 "name": "vEsmeralda",
599 "id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
604 "id": "d8a6ed93-251c-47ca-adc9-86671fd19f4c",
609 "id": "db171b8f-115c-4992-a2e3-ee04cae357e0",
629 "id": "e433710f-9217-458d-a79d-1c7aff376d89",
630 "name": "TYLER SILVIA",
634 "id": "b6a3f28c-eebf-494c-a900-055cc7c874ce",
644 "id": "0ee8c1bc-7cbd-4b0a-a1ac-e9999255abc1",
645 "name": "CARA Griffin",
649 "id": "c7611ebe-c324-48f1-8085-94aef0c6ef3d",
650 "name": "DARREN MCGEE",
654 "id": "e30755dc-5673-4b6b-9dcf-9abdd96b93d1",
660 "name": "vSalvatore",
664 "id": "d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4",
674 "id": "12a96a9d-4b4c-4349-a950-fe1159602621",
675 "name": "DARREN MCGEE",
680 "e433710f-9217-458d-a79d-1c7aff376d89": [
683 "name": "vRichardson",
688 "name": "TYLER SILVIA",
703 "name": "vVoiceMail",
738 "name": "vEsmeralda",
768 "name": "JOHANNA_SANTOS",
781 "name": "NFTJSSSS-NFT1"
785 "name": "YUDFJULP-JAG1"
789 "name": "UUUAIAAI-YYY1"
793 "name": "AVTRFLHD-AVT1"
797 "name": "ATLSANAI-ATL34"
800 "categoryParameters": {
801 "owningEntityList": [
807 "id": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
808 "name": "WayneHolland"
829 "lineOfBusinessList": [
850 "type": "[LCP_REGIONS_AND_TENANTS] Update",
854 "name": "CAR_2020_ER",
858 "id": "21014aa2-526b-11e6-beb8-9e71128cae77",
859 "name": "JULIO ERICKSON",
863 "id": "DHV1707-TestSubscriber-2",
864 "name": "DALE BRIDGES",
868 "id": "DHV1707-TestSubscriber-1",
869 "name": "LLOYD BRIDGES",
873 "id": "jimmy-example",
874 "name": "JimmyExampleCust-20161102",
878 "id": "jimmy-example2",
879 "name": "JimmyExampleCust-20161103",
883 "id": "ERICA5779-TestSub-PWT-102",
884 "name": "ERICA5779-TestSub-PWT-102",
888 "id": "ERICA5779-TestSub-PWT-101",
889 "name": "ERICA5779-TestSub-PWT-101",
893 "id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
898 "id": "ERICA5779-Subscriber-4",
899 "name": "ERICA5779-Subscriber-5",
903 "id": "ERICA5779-TestSub-PWT-103",
904 "name": "ERICA5779-TestSub-PWT-103",
908 "id": "ERICA5779-Subscriber-2",
909 "name": "ERICA5779-Subscriber-2",
913 "id": "e433710f-9217-458d-a79d-1c7aff376d89",
914 "name": "SILVIA ROBBINS",
918 "id": "ERICA5779-Subscriber-3",
919 "name": "ERICA5779-Subscriber-3",
923 "id": "31739f3e-526b-11e6-beb8-9e71128cae77",
924 "name": "CRAIG/ROBERTS",
932 class ActivatedRouteMock<T>{
935 serviceModelId : '6e59c5de-f052-46fa-aa7e-2fca9d674c44'
940 class MockFeatureFlagsService {}
942 describe('Generic Form popup Service', () => {
944 let service: GenericFormPopupService;
945 let httpMock: HttpTestingController;
946 let form : FormGroup;
947 let fb : FormBuilder;
948 let netwokPopupService : NetworkPopupService;
949 let vfModulePopupService : VfModulePopuopService;
950 let servicePopupService : ServicePopupService;
951 let _aaiService : AaiService;
952 let _activatedRoute : ActivatedRoute;
954 beforeAll(done => (async () => {
955 TestBed.configureTestingModule({
956 imports: [HttpClientTestingModule],
957 providers: [GenericFormPopupService,
961 BasicControlGenerator,
962 ServiceControlGenerator,
965 DefaultDataGeneratorService,
969 NetworkControlGenerator,
970 VfModulePopuopService,
971 VfModuleUpgradePopupService,
972 VfModuleControlGenerator,
973 {provide:FeatureFlagsService, useClass: MockFeatureFlagsService},
974 {provide: ActivatedRoute, useClass: ActivatedRouteMock},
975 {provide: NgRedux, useClass: MockAppStore}]
977 await TestBed.compileComponents();
979 injector = getTestBed();
980 service = injector.get(GenericFormPopupService);
981 httpMock = injector.get(HttpTestingController);
982 fb = injector.get(FormBuilder);
983 netwokPopupService = injector.get(NetworkPopupService);
984 vfModulePopupService = injector.get(VfModulePopuopService);
985 servicePopupService = injector.get(ServicePopupService);
986 _aaiService = injector.get(AaiService);
987 _activatedRoute = injector.get(ActivatedRoute);
989 })().then(done).catch(done.fail));
992 test('VL: getGenericFormDetails should return FormPopupDetails', () => {
993 let uuidData : UUIDData = <any>{
995 serviceId : '6e59c5de-f052-46fa-aa7e-2fca9d674c44',
996 networkId : 'ExtVL 0',
997 networkStoreKey : 'ExtVL 0',
998 popupService : netwokPopupService
1000 let node : ITreeNode = <any>{data : {} };
1002 jest.spyOn(uuidData.popupService ,'getGenericFormPopupDetails');
1003 service.getGenericFormDetails(uuidData, node,true);
1005 expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledTimes(1);
1006 expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledWith(uuidData['serviceId'],
1007 uuidData['networkId'],
1008 uuidData['networkStoreKey'],
1015 test('VFmodule: getGenericFormDetails should return FormPopupDetails', () => {
1016 let uuidData : UUIDData = <any>{
1018 serviceId : '6e59c5de-f052-46fa-aa7e-2fca9d674c44',
1019 vnfStoreKey : 'VF_vGeraldine 0',
1020 vFModuleStoreKey : 'vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1',
1021 popupService : vfModulePopupService
1023 let node : ITreeNode = <any>{data : {}};
1025 spyOn(uuidData.popupService ,'getGenericFormPopupDetails');
1026 service.getGenericFormDetails(uuidData, node,true);
1028 expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledTimes(1)
1029 expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledWith(
1030 uuidData['serviceId'],
1031 uuidData['vnfStoreKey'],
1032 uuidData['vFModuleStoreKey'],
1040 test('service: getGenericFormDetails should return FormPopupDetails', () => {
1041 let uuidData : UUIDData = <any>{
1043 serviceId : '6e59c5de-f052-46fa-aa7e-2fca9d674c44',
1044 popupService : servicePopupService
1046 let node : ITreeNode = <any>{data : {}};
1048 jest.spyOn(uuidData.popupService ,'getGenericFormPopupDetails');
1049 service.getGenericFormDetails(uuidData, node,true);
1051 expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledTimes(1);
1052 expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledWith(
1053 uuidData['serviceId'],
1063 test('initReduxOnCreateNewService',() => {
1064 jest.spyOn(_aaiService, 'getServiceModelById');
1065 service.initReduxOnCreateNewService();