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_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
37 "FLAG_ADD_MSO_TESTAPI_FIELD": true
39 "type": "[FLAGS] Update"
43 "6e59c5de-f052-46fa-aa7e-2fca9d674c44": {
45 "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
46 "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
47 "name": "ComplexService",
49 "toscaModelURL": null,
50 "category": "Emanuel",
53 "description": "ComplexService",
54 "serviceEcompNaming": "false",
55 "instantiationType": "Macro",
57 "instantiationType": "Macro"
63 "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
64 "invariantUuid": "4160458e-f648-4b30-a176-43881ffffe9e",
65 "description": "VSP_vGeraldine",
66 "name": "VF_vGeraldine",
68 "customizationUuid": "91415b44-753d-494c-926a-456a9172bbb9",
71 "serviceEcompNaming" : "true",
73 "ecomp_generated_naming": "false",
76 "gpb2_Internal2_mac": "00:11:22:EF:AC:DF",
77 "sctp-b-ipv6-egress_src_start_port": "0",
78 "sctp-a-ipv6-egress_rule_application": "any",
79 "Internal2_allow_transit": "true",
80 "sctp-b-IPv6_ethertype": "IPv6",
81 "sctp-a-egress_rule_application": "any",
82 "sctp-b-ingress_action": "pass",
83 "sctp-b-ingress_rule_protocol": "icmp",
84 "ncb2_Internal1_mac": "00:11:22:EF:AC:DF",
85 "sctp-b-ipv6-ingress-src_start_port": "0.0",
86 "ncb1_Internal2_mac": "00:11:22:EF:AC:DF",
87 "fsb_volume_size_0": "320.0",
88 "sctp-b-egress_src_addresses": "local",
89 "sctp-a-ipv6-ingress_ethertype": "IPv4",
90 "sctp-a-ipv6-ingress-dst_start_port": "0",
91 "sctp-b-ipv6-ingress_rule_application": "any",
92 "domain_name": "default-domain",
93 "sctp-a-ingress_rule_protocol": "icmp",
94 "sctp-b-egress-src_start_port": "0.0",
95 "sctp-a-egress_src_addresses": "local",
96 "sctp-b-display_name": "epc-sctp-b-ipv4v6-sec-group",
97 "sctp-a-egress-src_start_port": "0.0",
98 "sctp-a-ingress_ethertype": "IPv4",
99 "sctp-b-ipv6-ingress-dst_end_port": "65535",
100 "sctp-b-dst_subnet_prefix_v6": "::",
101 "nf_naming": "{ecomp_generated_naming=true}",
102 "sctp-a-ipv6-ingress_src_subnet_prefix": "0.0.0.0",
103 "sctp-b-egress-dst_start_port": "0.0",
104 "ncb_flavor_name": "nv.c20r64d1",
105 "gpb1_Internal1_mac": "00:11:22:EF:AC:DF",
106 "sctp-b-egress_dst_subnet_prefix_len": "0.0",
107 "Internal2_net_cidr": "10.0.0.10",
108 "sctp-a-ingress-dst_start_port": "0.0",
109 "sctp-a-egress-dst_start_port": "0.0",
110 "fsb1_Internal2_mac": "00:11:22:EF:AC:DF",
111 "sctp-a-egress_ethertype": "IPv4",
112 "vlc_st_service_mode": "in-network-nat",
113 "sctp-a-ipv6-egress_ethertype": "IPv4",
114 "sctp-a-egress-src_end_port": "65535.0",
115 "sctp-b-ipv6-egress_rule_application": "any",
116 "sctp-b-egress_action": "pass",
117 "sctp-a-ingress-src_subnet_prefix_len": "0.0",
118 "sctp-b-ipv6-ingress-src_end_port": "65535.0",
119 "sctp-b-name": "epc-sctp-b-ipv4v6-sec-group",
120 "fsb2_Internal1_mac": "00:11:22:EF:AC:DF",
121 "sctp-a-ipv6-ingress-src_start_port": "0.0",
122 "sctp-b-ipv6-egress_ethertype": "IPv4",
123 "Internal1_net_cidr": "10.0.0.10",
124 "sctp-a-egress_dst_subnet_prefix": "0.0.0.0",
125 "fsb_flavor_name": "nv.c20r64d1",
126 "sctp_rule_protocol": "132",
127 "sctp-b-ipv6-ingress_src_subnet_prefix_len": "0",
128 "sctp-a-ipv6-ingress_rule_application": "any",
129 "sctp-a-IPv6_ethertype": "IPv6",
130 "vlc2_Internal1_mac": "00:11:22:EF:AC:DF",
131 "vlc_st_virtualization_type": "virtual-machine",
132 "sctp-b-ingress-dst_start_port": "0.0",
133 "sctp-b-ingress-dst_end_port": "65535.0",
134 "sctp-a-ipv6-ingress-src_end_port": "65535.0",
135 "sctp-a-display_name": "epc-sctp-a-ipv4v6-sec-group",
136 "sctp-b-ingress_rule_application": "any",
137 "int2_sec_group_name": "int2-sec-group",
138 "vlc_flavor_name": "nd.c16r64d1",
139 "sctp-b-ipv6-egress_src_addresses": "local",
140 "vlc_st_interface_type_int1": "other1",
141 "sctp-b-egress-src_end_port": "65535.0",
142 "sctp-a-ipv6-egress-dst_start_port": "0",
143 "vlc_st_interface_type_int2": "other2",
144 "sctp-a-ipv6-egress_rule_protocol": "any",
145 "Internal2_shared": "false",
146 "sctp-a-ipv6-egress_dst_subnet_prefix_len": "0",
147 "Internal2_rpf": "disable",
148 "vlc1_Internal1_mac": "00:11:22:EF:AC:DF",
149 "sctp-b-ipv6-egress_src_end_port": "65535",
150 "sctp-a-ipv6-egress_src_addresses": "local",
151 "sctp-a-ingress-dst_end_port": "65535.0",
152 "sctp-a-ipv6-egress_src_end_port": "65535",
153 "Internal1_forwarding_mode": "l2",
154 "Internal2_dhcp": "false",
155 "sctp-a-dst_subnet_prefix_v6": "::",
156 "pxe_image_name": "MME_PXE-Boot_16ACP04_GA.qcow2",
157 "vlc_st_interface_type_gtp": "other0",
158 "ncb1_Internal1_mac": "00:11:22:EF:AC:DF",
159 "sctp-b-src_subnet_prefix_v6": "::",
160 "sctp-a-egress_dst_subnet_prefix_len": "0.0",
161 "int1_sec_group_name": "int1-sec-group",
162 "Internal1_dhcp": "false",
163 "sctp-a-ipv6-egress_dst_end_port": "65535",
164 "Internal2_forwarding_mode": "l2",
165 "fsb2_Internal2_mac": "00:11:22:EF:AC:DF",
166 "sctp-b-egress_dst_subnet_prefix": "0.0.0.0",
167 "Internal1_net_cidr_len": "17",
168 "gpb2_Internal1_mac": "00:11:22:EF:AC:DF",
169 "sctp-b-ingress-src_subnet_prefix_len": "0.0",
170 "sctp-a-ingress_dst_addresses": "local",
171 "sctp-a-egress_action": "pass",
172 "fsb_volume_type_0": "SF-Default-SSD",
173 "ncb2_Internal2_mac": "00:11:22:EF:AC:DF",
174 "vlc_st_interface_type_sctp_a": "left",
175 "vlc_st_interface_type_sctp_b": "right",
176 "sctp-a-src_subnet_prefix_v6": "::",
177 "vlc_st_version": "2",
178 "sctp-b-egress_ethertype": "IPv4",
179 "sctp-a-ingress_rule_application": "any",
180 "gpb1_Internal2_mac": "00:11:22:EF:AC:DF",
181 "instance_ip_family_v6": "v6",
182 "sctp-a-ipv6-egress_src_start_port": "0",
183 "sctp-b-ingress-src_start_port": "0.0",
184 "sctp-b-ingress_dst_addresses": "local",
185 "fsb1_Internal1_mac": "00:11:22:EF:AC:DF",
186 "vlc_st_interface_type_oam": "management",
187 "multi_stage_design": "true",
188 "oam_sec_group_name": "oam-sec-group",
189 "Internal2_net_gateway": "10.0.0.10",
190 "sctp-a-ipv6-ingress-dst_end_port": "65535",
191 "sctp-b-ipv6-egress-dst_start_port": "0",
192 "Internal1_net_gateway": "10.0.0.10",
193 "sctp-b-ipv6-egress_rule_protocol": "any",
194 "gtp_sec_group_name": "gtp-sec-group",
195 "sctp-a-ipv6-egress_dst_subnet_prefix": "0.0.0.0",
196 "sctp-b-ipv6-egress_dst_subnet_prefix_len": "0",
197 "sctp-a-ipv6-ingress_dst_addresses": "local",
198 "sctp-a-egress_rule_protocol": "icmp",
199 "sctp-b-ipv6-egress_action": "pass",
200 "sctp-a-ipv6-egress_action": "pass",
201 "Internal1_shared": "false",
202 "sctp-b-ipv6-ingress_rule_protocol": "any",
203 "Internal2_net_cidr_len": "17",
204 "sctp-a-name": "epc-sctp-a-ipv4v6-sec-group",
205 "sctp-a-ingress-src_end_port": "65535.0",
206 "sctp-b-ipv6-ingress_src_subnet_prefix": "0.0.0.0",
207 "sctp-a-egress-dst_end_port": "65535.0",
208 "sctp-a-ingress_action": "pass",
209 "sctp-b-egress_rule_protocol": "icmp",
210 "sctp-b-ipv6-ingress_action": "pass",
211 "vlc_st_service_type": "firewall",
212 "sctp-b-ipv6-egress_dst_end_port": "65535",
213 "sctp-b-ipv6-ingress-dst_start_port": "0",
214 "vlc2_Internal2_mac": "00:11:22:EF:AC:DF",
215 "vlc_st_availability_zone": "true",
216 "fsb_volume_image_name_1": "MME_FSB2_16ACP04_GA.qcow2",
217 "sctp-b-ingress-src_subnet_prefix": "0.0.0.0",
218 "sctp-a-ipv6-ingress_src_subnet_prefix_len": "0",
219 "Internal1_allow_transit": "true",
220 "gpb_flavor_name": "nv.c20r64d1",
221 "availability_zone_max_count": "1",
222 "fsb_volume_image_name_0": "MME_FSB1_16ACP04_GA.qcow2",
223 "sctp-b-ipv6-ingress_dst_addresses": "local",
224 "sctp-b-ipv6-egress_dst_subnet_prefix": "0.0.0.0",
225 "sctp-b-ipv6-ingress_ethertype": "IPv4",
226 "vlc1_Internal2_mac": "00:11:22:EF:AC:DF",
227 "sctp-a-ingress-src_subnet_prefix": "0.0.0.0",
228 "sctp-a-ipv6-ingress_action": "pass",
229 "Internal1_rpf": "disable",
230 "sctp-b-ingress_ethertype": "IPv4",
231 "sctp-b-egress_rule_application": "any",
232 "sctp-b-ingress-src_end_port": "65535.0",
233 "sctp-a-ipv6-ingress_rule_protocol": "any",
234 "sctp-a-ingress-src_start_port": "0.0",
235 "sctp-b-egress-dst_end_port": "65535.0"
238 "modelCustomizationName": "VF_vGeraldine 0",
240 "vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1": {
241 "uuid": "522159d5-d6e0-4c2a-aa44-5a542a12a830",
242 "invariantUuid": "98a7c88b-b577-476a-90e4-e25a5871e02b",
243 "customizationUuid": "55b1be94-671a-403e-a26c-667e9c47d091",
245 "name": "VfVgeraldine..vflorence_vlc..module-1",
247 "modelCustomizationName": "VfVgeraldine..vflorence_vlc..module-1",
249 "minCountInstances": 0,
250 "maxCountInstances": null,
252 "vfModuleLabel": "vflorence_vlc"
255 "volumeGroupAllowed": true
257 "vf_vgeraldine0..VfVgeraldine..vflorence_gpb..module-2": {
258 "uuid": "41708296-e443-4c71-953f-d9a010f059e1",
259 "invariantUuid": "1cca90b8-3490-495e-87da-3f3e4c57d5b9",
260 "customizationUuid": "6add59e0-7fe1-4bc4-af48-f8812422ae7c",
262 "name": "VfVgeraldine..vflorence_gpb..module-2",
264 "modelCustomizationName": "VfVgeraldine..vflorence_gpb..module-2",
266 "minCountInstances": 0,
267 "maxCountInstances": null,
269 "vfModuleLabel": "vflorence_gpb"
272 "volumeGroupAllowed": false
274 "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
275 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
276 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
277 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
279 "name": "VfVgeraldine..base_vflorence..module-0",
281 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
283 "minCountInstances": 1,
284 "maxCountInstances": 1,
286 "vfModuleLabel": "base_vflorence"
289 "volumeGroupAllowed": true
293 "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
294 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
295 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
296 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
298 "name": "VfVgeraldine..base_vflorence..module-0",
300 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
302 "minCountInstances": 1,
303 "maxCountInstances": 1,
305 "vfModuleLabel": "base_vflorence"
310 "vfcInstanceGroups": {}
315 "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986",
316 "invariantUuid": "379f816b-a7aa-422f-be30-17114ff50b7c",
317 "description": "ECOMP generic virtual link (network) base type for all other service-level and global networks",
320 "customizationUuid": "94fdd893-4a36-4d70-b16a-ec29c54c184f",
324 "ecomp_generated_naming": "false",
325 "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}}",
326 "exVL_naming": "{ecomp_generated_naming=true}",
327 "network_flows": "{is_network_policy=false, is_bound_to_vpn=false}",
328 "network_homing": "{ecomp_selected_instance_node_target=false}"
331 "modelCustomizationName": "ExtVL 0"
334 "collectionResources": {},
336 "Port Mirroring Configuration By Policy 0": {
337 "uuid": "b4398538-e89d-4f13-b33d-ca323434ba50",
338 "invariantUuid": "6ef0ca40-f366-4897-951f-abd65d25f6f7",
339 "description": "A port mirroring configuration by policy object",
340 "name": "Port Mirroring Configuration By Policy",
342 "customizationUuid": "3c3b7b8d-8669-4b3b-8664-61970041fad2",
346 "type": "Configuration",
347 "modelCustomizationName": "Port Mirroring Configuration By Policy 0",
349 "collectorNodes": null,
350 "configurationByPolicy": false
353 "serviceProxies": {},
355 "vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1": {
356 "uuid": "522159d5-d6e0-4c2a-aa44-5a542a12a830",
357 "invariantUuid": "98a7c88b-b577-476a-90e4-e25a5871e02b",
358 "customizationUuid": "55b1be94-671a-403e-a26c-667e9c47d091",
360 "name": "VfVgeraldine..vflorence_vlc..module-1",
362 "modelCustomizationName": "VfVgeraldine..vflorence_vlc..module-1",
364 "minCountInstances": 0,
365 "maxCountInstances": null,
367 "vfModuleLabel": "vflorence_vlc"
370 "volumeGroupAllowed": true
372 "vf_vgeraldine0..VfVgeraldine..vflorence_gpb..module-2": {
373 "uuid": "41708296-e443-4c71-953f-d9a010f059e1",
374 "invariantUuid": "1cca90b8-3490-495e-87da-3f3e4c57d5b9",
375 "customizationUuid": "6add59e0-7fe1-4bc4-af48-f8812422ae7c",
377 "name": "VfVgeraldine..vflorence_gpb..module-2",
379 "modelCustomizationName": "VfVgeraldine..vflorence_gpb..module-2",
381 "minCountInstances": 0,
382 "maxCountInstances": null,
384 "vfModuleLabel": "vflorence_gpb"
387 "volumeGroupAllowed": false
389 "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
390 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
391 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
392 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
394 "name": "VfVgeraldine..base_vflorence..module-0",
396 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
398 "minCountInstances": 1,
399 "maxCountInstances": 1,
401 "vfModuleLabel": "base_vflorence"
404 "volumeGroupAllowed": true
408 "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
409 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
410 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
411 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
413 "name": "VfVgeraldine..base_vflorence..module-0",
415 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
417 "minCountInstances": 1,
418 "maxCountInstances": 1,
420 "vfModuleLabel": "base_vflorence"
429 "6e59c5de-f052-46fa-aa7e-2fca9d674c44": {
433 "rollbackOnFailure": "true",
435 "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
436 "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0vmvzo": {
437 "isMissingData": false,
438 "sdncPreReload": null,
440 "modelType": "VFmodule",
441 "modelInvariantId": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
442 "modelVersionId": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
443 "modelName": "VfVgeraldine..base_vflorence..module-0",
445 "modelCustomizationId": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
446 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0"
451 "trackById": "wmtm6sy2uj"
455 "isMissingData": true,
456 "originalName": "VF_vGeraldine 0",
457 "vnfStoreKey": "VF_vGeraldine 0",
458 "trackById": "p3wk448m5do",
459 "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
460 "productFamilyId": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
461 "lcpCloudRegionId": null,
463 "lineOfBusiness": null,
464 "platformName": null,
467 "modelInvariantId": "4160458e-f648-4b30-a176-43881ffffe9e",
468 "modelVersionId": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
469 "modelName": "VF_vGeraldine",
470 "modelVersion": "2.0",
471 "modelCustomizationName": "VF_vGeraldine 0"
478 "validationCounter": 1,
480 "existingVNFCounterMap": {
481 "d6557200-ecf2-4641-8094-5393ae3aae60": 1
483 "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
484 "subscriptionServiceType": "TYLER SILVIA",
485 "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
486 "productFamilyId": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
487 "lcpCloudRegionId": "hvf6",
488 "tenantId": "229bcdc6eaeb4ca59d55221141d01f8e",
491 "rollbackOnFailure": "true",
494 "modelInvariantId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
495 "modelVersionId": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
496 "modelName": "ComplexService",
497 "modelVersion": "1.0",
498 "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44"
501 "name": "ComplexService",
503 "description": "ComplexService",
504 "category": "Emanuel",
505 "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
506 "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
509 "isEcompGeneratedNaming": true,
510 "isMultiStepDesign": false
513 "lcpRegionsAndTenants": {
526 "lcpRegionsTenantsMap": {
529 "id": "092eb9e8e4b7412e8787dd091bc58e86",
530 "name": "USP-SIP-IC-24335-T-01",
536 "id": "bae71557c5bb4d5aac6743a4e5f1d054",
537 "name": "AIN Web Tool-15-D-testalexandria",
541 "id": "d0a3e3f2964542259d155a81c41aadc3",
542 "name": "test-hvf6-09",
546 "id": "fa45ca53c80b492fa8be5477cd84fc2b",
551 "id": "4914ab0ab3a743e58f0eefdacc1dde77",
552 "name": "DN5242-Nov21-T1",
556 "id": "d0a3e3f2964542259d155a81c41aadc3",
557 "name": "test-hvf6-09",
561 "id": "cbb99fe4ada84631b7baf046b6fd2044",
562 "name": "DN5242-Nov16-T3",
570 "id": "ebc3bc3d-62fd-4a3f-a037-f619df4ff034",
575 "id": "17cc1042-527b-11e6-beb8-9e71128cae77",
580 "id": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
585 "id": "a4f6f2ae-9bf5-4ed7-b904-06b2099c4bd7",
586 "name": "Enhanced Services",
595 "id": "323d69d9-2efe-4r45-ay0a-89ea7ard4e6f",
596 "name": "vEsmeralda",
600 "id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
605 "id": "d8a6ed93-251c-47ca-adc9-86671fd19f4c",
610 "id": "db171b8f-115c-4992-a2e3-ee04cae357e0",
630 "id": "e433710f-9217-458d-a79d-1c7aff376d89",
631 "name": "TYLER SILVIA",
635 "id": "b6a3f28c-eebf-494c-a900-055cc7c874ce",
645 "id": "0ee8c1bc-7cbd-4b0a-a1ac-e9999255abc1",
646 "name": "CARA Griffin",
650 "id": "c7611ebe-c324-48f1-8085-94aef0c6ef3d",
651 "name": "DARREN MCGEE",
655 "id": "e30755dc-5673-4b6b-9dcf-9abdd96b93d1",
661 "name": "vSalvatore",
665 "id": "d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4",
675 "id": "12a96a9d-4b4c-4349-a950-fe1159602621",
676 "name": "DARREN MCGEE",
681 "e433710f-9217-458d-a79d-1c7aff376d89": [
684 "name": "vRichardson",
689 "name": "TYLER SILVIA",
704 "name": "vVoiceMail",
739 "name": "vEsmeralda",
769 "name": "JOHANNA_SANTOS",
782 "name": "NFTJSSSS-NFT1"
786 "name": "YUDFJULP-JAG1"
790 "name": "UUUAIAAI-YYY1"
794 "name": "AVTRFLHD-AVT1"
798 "name": "ATLSANAI-ATL34"
801 "categoryParameters": {
802 "owningEntityList": [
808 "id": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
809 "name": "WayneHolland"
830 "lineOfBusinessList": [
851 "type": "[LCP_REGIONS_AND_TENANTS] Update",
855 "name": "CAR_2020_ER",
859 "id": "21014aa2-526b-11e6-beb8-9e71128cae77",
860 "name": "JULIO ERICKSON",
864 "id": "DHV1707-TestSubscriber-2",
865 "name": "DALE BRIDGES",
869 "id": "DHV1707-TestSubscriber-1",
870 "name": "LLOYD BRIDGES",
874 "id": "jimmy-example",
875 "name": "JimmyExampleCust-20161102",
879 "id": "jimmy-example2",
880 "name": "JimmyExampleCust-20161103",
884 "id": "ERICA5779-TestSub-PWT-102",
885 "name": "ERICA5779-TestSub-PWT-102",
889 "id": "ERICA5779-TestSub-PWT-101",
890 "name": "ERICA5779-TestSub-PWT-101",
894 "id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
899 "id": "ERICA5779-Subscriber-4",
900 "name": "ERICA5779-Subscriber-5",
904 "id": "ERICA5779-TestSub-PWT-103",
905 "name": "ERICA5779-TestSub-PWT-103",
909 "id": "ERICA5779-Subscriber-2",
910 "name": "ERICA5779-Subscriber-2",
914 "id": "e433710f-9217-458d-a79d-1c7aff376d89",
915 "name": "SILVIA ROBBINS",
919 "id": "ERICA5779-Subscriber-3",
920 "name": "ERICA5779-Subscriber-3",
924 "id": "31739f3e-526b-11e6-beb8-9e71128cae77",
925 "name": "CRAIG/ROBERTS",
933 class ActivatedRouteMock<T>{
936 serviceModelId : '6e59c5de-f052-46fa-aa7e-2fca9d674c44'
941 class MockFeatureFlagsService {}
943 describe('Generic Form popup Service', () => {
945 let service: GenericFormPopupService;
946 let httpMock: HttpTestingController;
947 let form : FormGroup;
948 let fb : FormBuilder;
949 let netwokPopupService : NetworkPopupService;
950 let vfModulePopupService : VfModulePopuopService;
951 let servicePopupService : ServicePopupService;
952 let _aaiService : AaiService;
953 let _activatedRoute : ActivatedRoute;
955 beforeAll(done => (async () => {
956 TestBed.configureTestingModule({
957 imports: [HttpClientTestingModule],
958 providers: [GenericFormPopupService,
962 BasicControlGenerator,
963 ServiceControlGenerator,
966 DefaultDataGeneratorService,
970 NetworkControlGenerator,
971 VfModulePopuopService,
972 VfModuleUpgradePopupService,
973 VfModuleControlGenerator,
974 {provide:FeatureFlagsService, useClass: MockFeatureFlagsService},
975 {provide: ActivatedRoute, useClass: ActivatedRouteMock},
976 {provide: NgRedux, useClass: MockAppStore}]
978 await TestBed.compileComponents();
980 injector = getTestBed();
981 service = injector.get(GenericFormPopupService);
982 httpMock = injector.get(HttpTestingController);
983 fb = injector.get(FormBuilder);
984 netwokPopupService = injector.get(NetworkPopupService);
985 vfModulePopupService = injector.get(VfModulePopuopService);
986 servicePopupService = injector.get(ServicePopupService);
987 _aaiService = injector.get(AaiService);
988 _activatedRoute = injector.get(ActivatedRoute);
990 })().then(done).catch(done.fail));
993 test('VL: getGenericFormDetails should return FormPopupDetails', () => {
994 let uuidData : UUIDData = <any>{
996 serviceId : '6e59c5de-f052-46fa-aa7e-2fca9d674c44',
997 networkId : 'ExtVL 0',
998 networkStoreKey : 'ExtVL 0',
999 popupService : netwokPopupService
1001 let node : ITreeNode = <any>{data : {} };
1003 jest.spyOn(uuidData.popupService ,'getGenericFormPopupDetails');
1004 service.getGenericFormDetails(uuidData, node,true);
1006 expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledTimes(1);
1007 expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledWith(uuidData['serviceId'],
1008 uuidData['networkId'],
1009 uuidData['networkStoreKey'],
1016 test('VFmodule: getGenericFormDetails should return FormPopupDetails', () => {
1017 let uuidData : UUIDData = <any>{
1019 serviceId : '6e59c5de-f052-46fa-aa7e-2fca9d674c44',
1020 vnfStoreKey : 'VF_vGeraldine 0',
1021 vFModuleStoreKey : 'vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1',
1022 popupService : vfModulePopupService
1024 let node : ITreeNode = <any>{data : {}};
1026 spyOn(uuidData.popupService ,'getGenericFormPopupDetails');
1027 service.getGenericFormDetails(uuidData, node,true);
1029 expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledTimes(1)
1030 expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledWith(
1031 uuidData['serviceId'],
1032 uuidData['vnfStoreKey'],
1033 uuidData['vFModuleStoreKey'],
1041 test('service: getGenericFormDetails should return FormPopupDetails', () => {
1042 let uuidData : UUIDData = <any>{
1044 serviceId : '6e59c5de-f052-46fa-aa7e-2fca9d674c44',
1045 popupService : servicePopupService
1047 let node : ITreeNode = <any>{data : {}};
1049 jest.spyOn(uuidData.popupService ,'getGenericFormPopupDetails');
1050 service.getGenericFormDetails(uuidData, node,true);
1052 expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledTimes(1);
1053 expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledWith(
1054 uuidData['serviceId'],
1064 test('initReduxOnCreateNewService',() => {
1065 jest.spyOn(_aaiService, 'getServiceModelById');
1066 service.initReduxOnCreateNewService();