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";
24 class MockAppStore<T>{
30 "FLAG_NETWORK_TO_ASYNC_INSTANTIATION": false,
31 "FLAG_SHOW_ASSIGNMENTS": true,
32 "FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS": true,
33 "FLAG_UNASSIGN_SERVICE": true,
34 "FLAG_SHOW_VERIFY_SERVICE": false,
35 "FLAG_COLLECTION_RESOURCE_SUPPORT": true,
36 "FLAG_DUPLICATE_VNF": true,
37 "FLAG_SERVICE_MODEL_CACHE": true,
38 "CREATE_INSTANCE_TEST": false,
39 "FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
40 "FLAG_ASYNC_INSTANTIATION": true,
41 "FLAG_ASYNC_JOBS": true,
42 "EMPTY_DRAWING_BOARD_TEST": false,
43 "FLAG_ADD_MSO_TESTAPI_FIELD": true
45 "type": "[FLAGS] Update"
49 "6e59c5de-f052-46fa-aa7e-2fca9d674c44": {
51 "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
52 "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
53 "name": "ComplexService",
55 "toscaModelURL": null,
56 "category": "Emanuel",
59 "description": "ComplexService",
60 "serviceEcompNaming": "false",
61 "instantiationType": "Macro",
66 "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
67 "invariantUuid": "4160458e-f648-4b30-a176-43881ffffe9e",
68 "description": "VSP_vMee",
71 "customizationUuid": "91415b44-753d-494c-926a-456a9172bbb9",
74 "serviceEcompNaming" : "true",
76 "ecomp_generated_naming": "false",
79 "gpb2_Internal2_mac": "00:11:22:EF:AC:DF",
80 "sctp-b-ipv6-egress_src_start_port": "0",
81 "sctp-a-ipv6-egress_rule_application": "any",
82 "Internal2_allow_transit": "true",
83 "sctp-b-IPv6_ethertype": "IPv6",
84 "sctp-a-egress_rule_application": "any",
85 "sctp-b-ingress_action": "pass",
86 "sctp-b-ingress_rule_protocol": "icmp",
87 "ncb2_Internal1_mac": "00:11:22:EF:AC:DF",
88 "sctp-b-ipv6-ingress-src_start_port": "0.0",
89 "ncb1_Internal2_mac": "00:11:22:EF:AC:DF",
90 "fsb_volume_size_0": "320.0",
91 "sctp-b-egress_src_addresses": "local",
92 "sctp-a-ipv6-ingress_ethertype": "IPv4",
93 "sctp-a-ipv6-ingress-dst_start_port": "0",
94 "sctp-b-ipv6-ingress_rule_application": "any",
95 "domain_name": "default-domain",
96 "sctp-a-ingress_rule_protocol": "icmp",
97 "sctp-b-egress-src_start_port": "0.0",
98 "sctp-a-egress_src_addresses": "local",
99 "sctp-b-display_name": "epc-sctp-b-ipv4v6-sec-group",
100 "sctp-a-egress-src_start_port": "0.0",
101 "sctp-a-ingress_ethertype": "IPv4",
102 "sctp-b-ipv6-ingress-dst_end_port": "65535",
103 "sctp-b-dst_subnet_prefix_v6": "::",
104 "nf_naming": "{ecomp_generated_naming=true}",
105 "sctp-a-ipv6-ingress_src_subnet_prefix": "0.0.0.0",
106 "sctp-b-egress-dst_start_port": "0.0",
107 "ncb_flavor_name": "nv.c20r64d1",
108 "gpb1_Internal1_mac": "00:11:22:EF:AC:DF",
109 "sctp-b-egress_dst_subnet_prefix_len": "0.0",
110 "Internal2_net_cidr": "10.0.0.10",
111 "sctp-a-ingress-dst_start_port": "0.0",
112 "sctp-a-egress-dst_start_port": "0.0",
113 "fsb1_Internal2_mac": "00:11:22:EF:AC:DF",
114 "sctp-a-egress_ethertype": "IPv4",
115 "vlc_st_service_mode": "in-network-nat",
116 "sctp-a-ipv6-egress_ethertype": "IPv4",
117 "sctp-a-egress-src_end_port": "65535.0",
118 "sctp-b-ipv6-egress_rule_application": "any",
119 "sctp-b-egress_action": "pass",
120 "sctp-a-ingress-src_subnet_prefix_len": "0.0",
121 "sctp-b-ipv6-ingress-src_end_port": "65535.0",
122 "sctp-b-name": "epc-sctp-b-ipv4v6-sec-group",
123 "fsb2_Internal1_mac": "00:11:22:EF:AC:DF",
124 "sctp-a-ipv6-ingress-src_start_port": "0.0",
125 "sctp-b-ipv6-egress_ethertype": "IPv4",
126 "Internal1_net_cidr": "10.0.0.10",
127 "sctp-a-egress_dst_subnet_prefix": "0.0.0.0",
128 "fsb_flavor_name": "nv.c20r64d1",
129 "sctp_rule_protocol": "132",
130 "sctp-b-ipv6-ingress_src_subnet_prefix_len": "0",
131 "sctp-a-ipv6-ingress_rule_application": "any",
132 "sctp-a-IPv6_ethertype": "IPv6",
133 "vlc2_Internal1_mac": "00:11:22:EF:AC:DF",
134 "vlc_st_virtualization_type": "virtual-machine",
135 "sctp-b-ingress-dst_start_port": "0.0",
136 "sctp-b-ingress-dst_end_port": "65535.0",
137 "sctp-a-ipv6-ingress-src_end_port": "65535.0",
138 "sctp-a-display_name": "epc-sctp-a-ipv4v6-sec-group",
139 "sctp-b-ingress_rule_application": "any",
140 "int2_sec_group_name": "int2-sec-group",
141 "vlc_flavor_name": "nd.c16r64d1",
142 "sctp-b-ipv6-egress_src_addresses": "local",
143 "vlc_st_interface_type_int1": "other1",
144 "sctp-b-egress-src_end_port": "65535.0",
145 "sctp-a-ipv6-egress-dst_start_port": "0",
146 "vlc_st_interface_type_int2": "other2",
147 "sctp-a-ipv6-egress_rule_protocol": "any",
148 "Internal2_shared": "false",
149 "sctp-a-ipv6-egress_dst_subnet_prefix_len": "0",
150 "Internal2_rpf": "disable",
151 "vlc1_Internal1_mac": "00:11:22:EF:AC:DF",
152 "sctp-b-ipv6-egress_src_end_port": "65535",
153 "sctp-a-ipv6-egress_src_addresses": "local",
154 "sctp-a-ingress-dst_end_port": "65535.0",
155 "sctp-a-ipv6-egress_src_end_port": "65535",
156 "Internal1_forwarding_mode": "l2",
157 "Internal2_dhcp": "false",
158 "sctp-a-dst_subnet_prefix_v6": "::",
159 "pxe_image_name": "MME_PXE-Boot_16ACP04_GA.qcow2",
160 "vlc_st_interface_type_gtp": "other0",
161 "ncb1_Internal1_mac": "00:11:22:EF:AC:DF",
162 "sctp-b-src_subnet_prefix_v6": "::",
163 "sctp-a-egress_dst_subnet_prefix_len": "0.0",
164 "int1_sec_group_name": "int1-sec-group",
165 "Internal1_dhcp": "false",
166 "sctp-a-ipv6-egress_dst_end_port": "65535",
167 "Internal2_forwarding_mode": "l2",
168 "fsb2_Internal2_mac": "00:11:22:EF:AC:DF",
169 "sctp-b-egress_dst_subnet_prefix": "0.0.0.0",
170 "Internal1_net_cidr_len": "17",
171 "gpb2_Internal1_mac": "00:11:22:EF:AC:DF",
172 "sctp-b-ingress-src_subnet_prefix_len": "0.0",
173 "sctp-a-ingress_dst_addresses": "local",
174 "sctp-a-egress_action": "pass",
175 "fsb_volume_type_0": "SF-Default-SSD",
176 "ncb2_Internal2_mac": "00:11:22:EF:AC:DF",
177 "vlc_st_interface_type_sctp_a": "left",
178 "vlc_st_interface_type_sctp_b": "right",
179 "sctp-a-src_subnet_prefix_v6": "::",
180 "vlc_st_version": "2",
181 "sctp-b-egress_ethertype": "IPv4",
182 "sctp-a-ingress_rule_application": "any",
183 "gpb1_Internal2_mac": "00:11:22:EF:AC:DF",
184 "instance_ip_family_v6": "v6",
185 "sctp-a-ipv6-egress_src_start_port": "0",
186 "sctp-b-ingress-src_start_port": "0.0",
187 "sctp-b-ingress_dst_addresses": "local",
188 "fsb1_Internal1_mac": "00:11:22:EF:AC:DF",
189 "vlc_st_interface_type_oam": "management",
190 "multi_stage_design": "true",
191 "oam_sec_group_name": "oam-sec-group",
192 "Internal2_net_gateway": "10.0.0.10",
193 "sctp-a-ipv6-ingress-dst_end_port": "65535",
194 "sctp-b-ipv6-egress-dst_start_port": "0",
195 "Internal1_net_gateway": "10.0.0.10",
196 "sctp-b-ipv6-egress_rule_protocol": "any",
197 "gtp_sec_group_name": "gtp-sec-group",
198 "sctp-a-ipv6-egress_dst_subnet_prefix": "0.0.0.0",
199 "sctp-b-ipv6-egress_dst_subnet_prefix_len": "0",
200 "sctp-a-ipv6-ingress_dst_addresses": "local",
201 "sctp-a-egress_rule_protocol": "icmp",
202 "sctp-b-ipv6-egress_action": "pass",
203 "sctp-a-ipv6-egress_action": "pass",
204 "Internal1_shared": "false",
205 "sctp-b-ipv6-ingress_rule_protocol": "any",
206 "Internal2_net_cidr_len": "17",
207 "sctp-a-name": "epc-sctp-a-ipv4v6-sec-group",
208 "sctp-a-ingress-src_end_port": "65535.0",
209 "sctp-b-ipv6-ingress_src_subnet_prefix": "0.0.0.0",
210 "sctp-a-egress-dst_end_port": "65535.0",
211 "sctp-a-ingress_action": "pass",
212 "sctp-b-egress_rule_protocol": "icmp",
213 "sctp-b-ipv6-ingress_action": "pass",
214 "vlc_st_service_type": "firewall",
215 "sctp-b-ipv6-egress_dst_end_port": "65535",
216 "sctp-b-ipv6-ingress-dst_start_port": "0",
217 "vlc2_Internal2_mac": "00:11:22:EF:AC:DF",
218 "vlc_st_availability_zone": "true",
219 "fsb_volume_image_name_1": "MME_FSB2_16ACP04_GA.qcow2",
220 "sctp-b-ingress-src_subnet_prefix": "0.0.0.0",
221 "sctp-a-ipv6-ingress_src_subnet_prefix_len": "0",
222 "Internal1_allow_transit": "true",
223 "gpb_flavor_name": "nv.c20r64d1",
224 "availability_zone_max_count": "1",
225 "fsb_volume_image_name_0": "MME_FSB1_16ACP04_GA.qcow2",
226 "sctp-b-ipv6-ingress_dst_addresses": "local",
227 "sctp-b-ipv6-egress_dst_subnet_prefix": "0.0.0.0",
228 "sctp-b-ipv6-ingress_ethertype": "IPv4",
229 "vlc1_Internal2_mac": "00:11:22:EF:AC:DF",
230 "sctp-a-ingress-src_subnet_prefix": "0.0.0.0",
231 "sctp-a-ipv6-ingress_action": "pass",
232 "Internal1_rpf": "disable",
233 "sctp-b-ingress_ethertype": "IPv4",
234 "sctp-b-egress_rule_application": "any",
235 "sctp-b-ingress-src_end_port": "65535.0",
236 "sctp-a-ipv6-ingress_rule_protocol": "any",
237 "sctp-a-ingress-src_start_port": "0.0",
238 "sctp-b-egress-dst_end_port": "65535.0"
241 "modelCustomizationName": "VF_vMee 0",
243 "vf_vmee0..VfVmee..vmme_vlc..module-1": {
244 "uuid": "522159d5-d6e0-4c2a-aa44-5a542a12a830",
245 "invariantUuid": "98a7c88b-b577-476a-90e4-e25a5871e02b",
246 "customizationUuid": "55b1be94-671a-403e-a26c-667e9c47d091",
248 "name": "VfVmee..vmme_vlc..module-1",
250 "modelCustomizationName": "VfVmee..vmme_vlc..module-1",
252 "minCountInstances": 0,
253 "maxCountInstances": null,
255 "vfModuleLabel": "vmme_vlc"
258 "volumeGroupAllowed": true
260 "vf_vmee0..VfVmee..vmme_gpb..module-2": {
261 "uuid": "41708296-e443-4c71-953f-d9a010f059e1",
262 "invariantUuid": "1cca90b8-3490-495e-87da-3f3e4c57d5b9",
263 "customizationUuid": "6add59e0-7fe1-4bc4-af48-f8812422ae7c",
265 "name": "VfVmee..vmme_gpb..module-2",
267 "modelCustomizationName": "VfVmee..vmme_gpb..module-2",
269 "minCountInstances": 0,
270 "maxCountInstances": null,
272 "vfModuleLabel": "vmme_gpb"
275 "volumeGroupAllowed": false
277 "vf_vmee0..VfVmee..base_vmme..module-0": {
278 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
279 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
280 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
282 "name": "VfVmee..base_vmme..module-0",
284 "modelCustomizationName": "VfVmee..base_vmme..module-0",
286 "minCountInstances": 1,
287 "maxCountInstances": 1,
289 "vfModuleLabel": "base_vmme"
292 "volumeGroupAllowed": true
296 "vf_vmee0..VfVmee..base_vmme..module-0": {
297 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
298 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
299 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
301 "name": "VfVmee..base_vmme..module-0",
303 "modelCustomizationName": "VfVmee..base_vmme..module-0",
305 "minCountInstances": 1,
306 "maxCountInstances": 1,
308 "vfModuleLabel": "base_vmme"
313 "vfcInstanceGroups": {}
318 "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986",
319 "invariantUuid": "379f816b-a7aa-422f-be30-17114ff50b7c",
320 "description": "ECOMP generic virtual link (network) base type for all other service-level and global networks",
323 "customizationUuid": "94fdd893-4a36-4d70-b16a-ec29c54c184f",
327 "ecomp_generated_naming": "false",
328 "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}}",
329 "exVL_naming": "{ecomp_generated_naming=true}",
330 "network_flows": "{is_network_policy=false, is_bound_to_vpn=false}",
331 "network_homing": "{ecomp_selected_instance_node_target=false}"
334 "modelCustomizationName": "ExtVL 0"
337 "collectionResource": {},
339 "Port Mirroring Configuration By Policy 0": {
340 "uuid": "b4398538-e89d-4f13-b33d-ca323434ba50",
341 "invariantUuid": "6ef0ca40-f366-4897-951f-abd65d25f6f7",
342 "description": "A port mirroring configuration by policy object",
343 "name": "Port Mirroring Configuration By Policy",
345 "customizationUuid": "3c3b7b8d-8669-4b3b-8664-61970041fad2",
349 "type": "Configuration",
350 "modelCustomizationName": "Port Mirroring Configuration By Policy 0",
352 "collectorNodes": null,
353 "configurationByPolicy": false
356 "serviceProxies": {},
358 "vf_vmee0..VfVmee..vmme_vlc..module-1": {
359 "uuid": "522159d5-d6e0-4c2a-aa44-5a542a12a830",
360 "invariantUuid": "98a7c88b-b577-476a-90e4-e25a5871e02b",
361 "customizationUuid": "55b1be94-671a-403e-a26c-667e9c47d091",
363 "name": "VfVmee..vmme_vlc..module-1",
365 "modelCustomizationName": "VfVmee..vmme_vlc..module-1",
367 "minCountInstances": 0,
368 "maxCountInstances": null,
370 "vfModuleLabel": "vmme_vlc"
373 "volumeGroupAllowed": true
375 "vf_vmee0..VfVmee..vmme_gpb..module-2": {
376 "uuid": "41708296-e443-4c71-953f-d9a010f059e1",
377 "invariantUuid": "1cca90b8-3490-495e-87da-3f3e4c57d5b9",
378 "customizationUuid": "6add59e0-7fe1-4bc4-af48-f8812422ae7c",
380 "name": "VfVmee..vmme_gpb..module-2",
382 "modelCustomizationName": "VfVmee..vmme_gpb..module-2",
384 "minCountInstances": 0,
385 "maxCountInstances": null,
387 "vfModuleLabel": "vmme_gpb"
390 "volumeGroupAllowed": false
392 "vf_vmee0..VfVmee..base_vmme..module-0": {
393 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
394 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
395 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
397 "name": "VfVmee..base_vmme..module-0",
399 "modelCustomizationName": "VfVmee..base_vmme..module-0",
401 "minCountInstances": 1,
402 "maxCountInstances": 1,
404 "vfModuleLabel": "base_vmme"
407 "volumeGroupAllowed": true
411 "vf_vmee0..VfVmee..base_vmme..module-0": {
412 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
413 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
414 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
416 "name": "VfVmee..base_vmme..module-0",
418 "modelCustomizationName": "VfVmee..base_vmme..module-0",
420 "minCountInstances": 1,
421 "maxCountInstances": 1,
423 "vfModuleLabel": "base_vmme"
432 "6e59c5de-f052-46fa-aa7e-2fca9d674c44": {
436 "rollbackOnFailure": "true",
438 "vf_vmee0..VfVmee..base_vmme..module-0": {
439 "vf_vmee0..VfVmee..base_vmme..module-0vmvzo": {
440 "isMissingData": false,
441 "sdncPreReload": null,
443 "modelType": "VFmodule",
444 "modelInvariantId": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
445 "modelVersionId": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
446 "modelName": "VfVmee..base_vmme..module-0",
448 "modelCustomizationId": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
449 "modelCustomizationName": "VfVmee..base_vmme..module-0"
454 "trackById": "wmtm6sy2uj"
458 "isMissingData": true,
459 "originalName": "VF_vMee 0",
460 "vnfStoreKey": "VF_vMee 0",
461 "trackById": "p3wk448m5do",
462 "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
463 "productFamilyId": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
464 "lcpCloudRegionId": null,
466 "lineOfBusiness": null,
467 "platformName": null,
470 "modelInvariantId": "4160458e-f648-4b30-a176-43881ffffe9e",
471 "modelVersionId": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
472 "modelName": "VF_vMee",
473 "modelVersion": "2.0",
474 "modelCustomizationName": "VF_vMee 0"
481 "validationCounter": 1,
483 "existingVNFCounterMap": {
484 "d6557200-ecf2-4641-8094-5393ae3aae60": 1
486 "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
487 "subscriptionServiceType": "TYLER SILVIA",
488 "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
489 "productFamilyId": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
490 "lcpCloudRegionId": "hvf6",
491 "tenantId": "229bcdc6eaeb4ca59d55221141d01f8e",
494 "rollbackOnFailure": "true",
497 "modelInvariantId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
498 "modelVersionId": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
499 "modelName": "ComplexService",
500 "modelVersion": "1.0",
501 "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44"
504 "name": "ComplexService",
506 "description": "ComplexService",
507 "category": "Emanuel",
508 "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
509 "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
512 "isEcompGeneratedNaming": true,
513 "isMultiStepDesign": false
516 "lcpRegionsAndTenants": {
529 "lcpRegionsTenantsMap": {
532 "id": "092eb9e8e4b7412e8787dd091bc58e86",
533 "name": "USP-SIP-IC-24335-T-01",
539 "id": "bae71557c5bb4d5aac6743a4e5f1d054",
540 "name": "AIN Web Tool-15-D-testalexandria",
544 "id": "d0a3e3f2964542259d155a81c41aadc3",
545 "name": "test-hvf6-09",
549 "id": "fa45ca53c80b492fa8be5477cd84fc2b",
554 "id": "cbb99fe4ada84631b7baf046b6fd2044",
555 "name": "DN5242-Nov16-T3",
563 "id": "ebc3bc3d-62fd-4a3f-a037-f619df4ff034",
568 "id": "17cc1042-527b-11e6-beb8-9e71128cae77",
573 "id": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
578 "id": "a4f6f2ae-9bf5-4ed7-b904-06b2099c4bd7",
579 "name": "Enhanced Services",
588 "id": "323d69d9-2efe-4r45-ay0a-89ea7ard4e6f",
593 "id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
598 "id": "d8a6ed93-251c-47ca-adc9-86671fd19f4c",
603 "id": "db171b8f-115c-4992-a2e3-ee04cae357e0",
623 "id": "e433710f-9217-458d-a79d-1c7aff376d89",
624 "name": "TYLER SILVIA",
628 "id": "b6a3f28c-eebf-494c-a900-055cc7c874ce",
638 "id": "0ee8c1bc-7cbd-4b0a-a1ac-e9999255abc1",
639 "name": "CARA Griffin",
643 "id": "c7611ebe-c324-48f1-8085-94aef0c6ef3d",
644 "name": "DARREN MCGEE",
648 "id": "e30755dc-5673-4b6b-9dcf-9abdd96b93d1",
654 "name": "vSalvatore",
658 "id": "d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4",
668 "id": "12a96a9d-4b4c-4349-a950-fe1159602621",
669 "name": "DARREN MCGEE",
674 "e433710f-9217-458d-a79d-1c7aff376d89": [
677 "name": "vRichardson",
682 "name": "TYLER SILVIA",
697 "name": "vVoiceMail",
762 "name": "JOHANNA_SANTOS",
775 "name": "NFTJSSSS-NFT1"
779 "name": "YUDFJULP-JAG1"
783 "name": "UUUAIAAI-YYY1"
787 "name": "AVTRFLHD-AVT1"
791 "name": "ATLSANAI-ATL34"
794 "categoryParameters": {
795 "owningEntityList": [
801 "id": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
802 "name": "WayneHolland"
823 "lineOfBusinessList": [
844 "type": "[LCP_REGIONS_AND_TENANTS] Update",
848 "name": "CAR_2020_ER",
852 "id": "21014aa2-526b-11e6-beb8-9e71128cae77",
853 "name": "JULIO ERICKSON",
857 "id": "DHV1707-TestSubscriber-2",
858 "name": "DALE BRIDGES",
862 "id": "DHV1707-TestSubscriber-1",
863 "name": "LLOYD BRIDGES",
867 "id": "jimmy-example",
868 "name": "JimmyExampleCust-20161102",
872 "id": "jimmy-example2",
873 "name": "JimmyExampleCust-20161103",
877 "id": "ERICA5779-TestSub-PWT-102",
878 "name": "ERICA5779-TestSub-PWT-102",
882 "id": "ERICA5779-TestSub-PWT-101",
883 "name": "ERICA5779-TestSub-PWT-101",
887 "id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
892 "id": "ERICA5779-Subscriber-4",
893 "name": "ERICA5779-Subscriber-5",
897 "id": "ERICA5779-TestSub-PWT-103",
898 "name": "ERICA5779-TestSub-PWT-103",
902 "id": "ERICA5779-Subscriber-2",
903 "name": "ERICA5779-Subscriber-2",
907 "id": "e433710f-9217-458d-a79d-1c7aff376d89",
908 "name": "SILVIA ROBBINS",
912 "id": "ERICA5779-Subscriber-3",
913 "name": "ERICA5779-Subscriber-3",
917 "id": "31739f3e-526b-11e6-beb8-9e71128cae77",
918 "name": "CRAIG/ROBERTS",
926 class ActivatedRouteMock<T>{
929 serviceModelId : '6e59c5de-f052-46fa-aa7e-2fca9d674c44'
934 class MockFeatureFlagsService {}
936 describe('Generic Form popup Service', () => {
938 let service: GenericFormPopupService;
939 let httpMock: HttpTestingController;
940 let form : FormGroup;
941 let fb : FormBuilder;
942 let netwokPopupService : NetworkPopupService;
943 let vfModulePopupService : VfModulePopuopService;
944 let servicePopupService : ServicePopupService;
945 let _aaiService : AaiService;
946 let _activatedRoute : ActivatedRoute;
948 beforeAll(done => (async () => {
949 TestBed.configureTestingModule({
950 imports: [HttpClientTestingModule],
951 providers: [GenericFormPopupService,
955 BasicControlGenerator,
956 ServiceControlGenerator,
959 DefaultDataGeneratorService,
963 NetworkControlGenerator,
964 VfModulePopuopService,
965 VfModuleControlGenerator,
966 {provide:FeatureFlagsService, useClass: MockFeatureFlagsService},
967 {provide: ActivatedRoute, useClass: ActivatedRouteMock},
968 {provide: NgRedux, useClass: MockAppStore}]
970 await TestBed.compileComponents();
972 injector = getTestBed();
973 service = injector.get(GenericFormPopupService);
974 httpMock = injector.get(HttpTestingController);
975 fb = injector.get(FormBuilder);
976 netwokPopupService = injector.get(NetworkPopupService);
977 vfModulePopupService = injector.get(VfModulePopuopService);
978 servicePopupService = injector.get(ServicePopupService);
979 _aaiService = injector.get(AaiService);
980 _activatedRoute = injector.get(ActivatedRoute);
982 })().then(done).catch(done.fail));
985 test('VL: getGenericFormDetails should return FormPopupDetails', () => {
986 let uuidData : UUIDData = <any>{
988 serviceId : '6e59c5de-f052-46fa-aa7e-2fca9d674c44',
989 networkId : 'ExtVL 0',
990 networkStoreKey : 'ExtVL 0',
991 popupService : netwokPopupService
993 let node : ITreeNode = <any>{data : {} };
995 jest.spyOn(uuidData.popupService ,'getGenericFormPopupDetails');
996 service.getGenericFormDetails(uuidData, node,true);
998 expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledTimes(1);
999 expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledWith(uuidData['serviceId'],
1000 uuidData['networkId'],
1001 uuidData['networkStoreKey'],
1008 test('VFmodule: getGenericFormDetails should return FormPopupDetails', () => {
1009 let uuidData : UUIDData = <any>{
1011 serviceId : '6e59c5de-f052-46fa-aa7e-2fca9d674c44',
1012 vnfStoreKey : 'VF_vMee 0',
1013 vFModuleStoreKey : 'vf_vmee0..VfVmee..vmme_vlc..module-1',
1014 popupService : vfModulePopupService
1016 let node : ITreeNode = <any>{data : {}};
1018 spyOn(uuidData.popupService ,'getGenericFormPopupDetails');
1019 service.getGenericFormDetails(uuidData, node,true);
1021 expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledTimes(1)
1022 expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledWith(
1023 uuidData['serviceId'],
1024 uuidData['vnfStoreKey'],
1025 uuidData['vFModuleStoreKey'],
1033 test('service: getGenericFormDetails should return FormPopupDetails', () => {
1034 let uuidData : UUIDData = <any>{
1036 serviceId : '6e59c5de-f052-46fa-aa7e-2fca9d674c44',
1037 popupService : servicePopupService
1039 let node : ITreeNode = <any>{data : {}};
1041 jest.spyOn(uuidData.popupService ,'getGenericFormPopupDetails');
1042 service.getGenericFormDetails(uuidData, node,true);
1044 expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledTimes(1);
1045 expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledWith(
1046 uuidData['serviceId'],
1056 test('initReduxOnCreateNewService',() => {
1057 jest.spyOn(_aaiService, 'getServiceModelById');
1058 service.initReduxOnCreateNewService();