Merge "Condense unneeded data on Modern UI tests"
[vid.git] / vid-webpack-master / src / app / shared / components / genericFormPopup / generic-form-popup.service.spec.ts
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
24 class MockAppStore<T>{
25   getState() {
26     return {
27       "global": {
28         "name": null,
29         "flags": {
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
44         },
45         "type": "[FLAGS] Update"
46       },
47       "service": {
48         "serviceHierarchy": {
49           "6e59c5de-f052-46fa-aa7e-2fca9d674c44": {
50             "service": {
51               "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
52               "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
53               "name": "ComplexService",
54               "version": "1.0",
55               "toscaModelURL": null,
56               "category": "Emanuel",
57               "serviceType": "",
58               "serviceRole": "",
59               "description": "ComplexService",
60               "serviceEcompNaming": "false",
61               "instantiationType": "Macro",
62               "inputs": {}
63             },
64             "vnfs": {
65               "VF_vMee 0": {
66                 "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
67                 "invariantUuid": "4160458e-f648-4b30-a176-43881ffffe9e",
68                 "description": "VSP_vMee",
69                 "name": "VF_vMee",
70                 "version": "2.0",
71                 "customizationUuid": "91415b44-753d-494c-926a-456a9172bbb9",
72                 "inputs": {},
73                 "commands": {},
74                 "serviceEcompNaming" : "true",
75                 "properties": {
76                   "ecomp_generated_naming": "false",
77                   "max_instances": 10,
78                   "min_instances": 1,
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"
239                 },
240                 "type": "VF",
241                 "modelCustomizationName": "VF_vMee 0",
242                 "vfModules": {
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",
247                     "description": null,
248                     "name": "VfVmee..vmme_vlc..module-1",
249                     "version": "2",
250                     "modelCustomizationName": "VfVmee..vmme_vlc..module-1",
251                     "properties": {
252                       "minCountInstances": 0,
253                       "maxCountInstances": null,
254                       "initialCount": 0,
255                       "vfModuleLabel": "vmme_vlc"
256                     },
257                     "inputs": {},
258                     "volumeGroupAllowed": true
259                   },
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",
264                     "description": null,
265                     "name": "VfVmee..vmme_gpb..module-2",
266                     "version": "2",
267                     "modelCustomizationName": "VfVmee..vmme_gpb..module-2",
268                     "properties": {
269                       "minCountInstances": 0,
270                       "maxCountInstances": null,
271                       "initialCount": 0,
272                       "vfModuleLabel": "vmme_gpb"
273                     },
274                     "inputs": {},
275                     "volumeGroupAllowed": false
276                   },
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",
281                     "description": null,
282                     "name": "VfVmee..base_vmme..module-0",
283                     "version": "2",
284                     "modelCustomizationName": "VfVmee..base_vmme..module-0",
285                     "properties": {
286                       "minCountInstances": 1,
287                       "maxCountInstances": 1,
288                       "initialCount": 1,
289                       "vfModuleLabel": "base_vmme"
290                     },
291                     "inputs": {},
292                     "volumeGroupAllowed": true
293                   }
294                 },
295                 "volumeGroups": {
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",
300                     "description": null,
301                     "name": "VfVmee..base_vmme..module-0",
302                     "version": "2",
303                     "modelCustomizationName": "VfVmee..base_vmme..module-0",
304                     "properties": {
305                       "minCountInstances": 1,
306                       "maxCountInstances": 1,
307                       "initialCount": 1,
308                       "vfModuleLabel": "base_vmme"
309                     },
310                     "inputs": {}
311                   }
312                 },
313                 "vfcInstanceGroups": {}
314               }
315             },
316             "networks": {
317               "ExtVL 0": {
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",
321                 "name": "ExtVL",
322                 "version": "37.0",
323                 "customizationUuid": "94fdd893-4a36-4d70-b16a-ec29c54c184f",
324                 "inputs": {},
325                 "commands": {},
326                 "properties": {
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}"
332                 },
333                 "type": "VL",
334                 "modelCustomizationName": "ExtVL 0"
335               }
336             },
337             "collectionResource": {},
338             "configurations": {
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",
344                 "version": "27.0",
345                 "customizationUuid": "3c3b7b8d-8669-4b3b-8664-61970041fad2",
346                 "inputs": {},
347                 "commands": {},
348                 "properties": {},
349                 "type": "Configuration",
350                 "modelCustomizationName": "Port Mirroring Configuration By Policy 0",
351                 "sourceNodes": [],
352                 "collectorNodes": null,
353                 "configurationByPolicy": false
354               }
355             },
356             "serviceProxies": {},
357             "vfModules": {
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",
362                 "description": null,
363                 "name": "VfVmee..vmme_vlc..module-1",
364                 "version": "2",
365                 "modelCustomizationName": "VfVmee..vmme_vlc..module-1",
366                 "properties": {
367                   "minCountInstances": 0,
368                   "maxCountInstances": null,
369                   "initialCount": 0,
370                   "vfModuleLabel": "vmme_vlc"
371                 },
372                 "inputs": {},
373                 "volumeGroupAllowed": true
374               },
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",
379                 "description": null,
380                 "name": "VfVmee..vmme_gpb..module-2",
381                 "version": "2",
382                 "modelCustomizationName": "VfVmee..vmme_gpb..module-2",
383                 "properties": {
384                   "minCountInstances": 0,
385                   "maxCountInstances": null,
386                   "initialCount": 0,
387                   "vfModuleLabel": "vmme_gpb"
388                 },
389                 "inputs": {},
390                 "volumeGroupAllowed": false
391               },
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",
396                 "description": null,
397                 "name": "VfVmee..base_vmme..module-0",
398                 "version": "2",
399                 "modelCustomizationName": "VfVmee..base_vmme..module-0",
400                 "properties": {
401                   "minCountInstances": 1,
402                   "maxCountInstances": 1,
403                   "initialCount": 1,
404                   "vfModuleLabel": "base_vmme"
405                 },
406                 "inputs": {},
407                 "volumeGroupAllowed": true
408               }
409             },
410             "volumeGroups": {
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",
415                 "description": null,
416                 "name": "VfVmee..base_vmme..module-0",
417                 "version": "2",
418                 "modelCustomizationName": "VfVmee..base_vmme..module-0",
419                 "properties": {
420                   "minCountInstances": 1,
421                   "maxCountInstances": 1,
422                   "initialCount": 1,
423                   "vfModuleLabel": "base_vmme"
424                 },
425                 "inputs": {}
426               }
427             },
428             "pnfs": {}
429           }
430         },
431         "serviceInstance": {
432           "6e59c5de-f052-46fa-aa7e-2fca9d674c44": {
433             "networks": {},
434             "vnfs": {
435               "VF_vMee 0": {
436                 "rollbackOnFailure": "true",
437                 "vfModules": {
438                   "vf_vmee0..VfVmee..base_vmme..module-0": {
439                     "vf_vmee0..VfVmee..base_vmme..module-0vmvzo": {
440                       "isMissingData": false,
441                       "sdncPreReload": null,
442                       "modelInfo": {
443                         "modelType": "VFmodule",
444                         "modelInvariantId": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
445                         "modelVersionId": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
446                         "modelName": "VfVmee..base_vmme..module-0",
447                         "modelVersion": "2",
448                         "modelCustomizationId": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
449                         "modelCustomizationName": "VfVmee..base_vmme..module-0"
450                       },
451                       "instanceParams": [
452                         {}
453                       ],
454                       "trackById": "wmtm6sy2uj"
455                     }
456                   }
457                 },
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,
465                 "tenantId": null,
466                 "lineOfBusiness": null,
467                 "platformName": null,
468                 "modelInfo": {
469                   "modelType": "VF",
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"
475                 }
476               }
477             },
478             "instanceParams": [
479               {}
480             ],
481             "validationCounter": 1,
482             "existingNames": {},
483             "existingVNFCounterMap": {
484               "d6557200-ecf2-4641-8094-5393ae3aae60": 1
485             },
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",
492             "aicZoneId": "JAG1",
493             "projectName": "x1",
494             "rollbackOnFailure": "true",
495             "bulkSize": 1,
496             "modelInfo": {
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"
502             },
503             "isALaCarte": false,
504             "name": "ComplexService",
505             "version": "1.0",
506             "description": "ComplexService",
507             "category": "Emanuel",
508             "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
509             "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
510             "serviceType": "",
511             "serviceRole": "",
512             "isEcompGeneratedNaming": true,
513             "isMultiStepDesign": false
514           }
515         },
516         "lcpRegionsAndTenants": {
517           "lcpRegionList": [
518             {
519               "id": "JANET25",
520               "name": "JANET25",
521               "isPermitted": true
522             },
523             {
524               "id": "hvf6",
525               "name": "hvf6",
526               "isPermitted": true
527             }
528           ],
529           "lcpRegionsTenantsMap": {
530             "JANET25": [
531               {
532                 "id": "092eb9e8e4b7412e8787dd091bc58e86",
533                 "name": "USP-SIP-IC-24335-T-01",
534                 "isPermitted": true
535               }
536             ],
537             "hvf6": [
538               {
539                 "id": "bae71557c5bb4d5aac6743a4e5f1d054",
540                 "name": "AIN Web Tool-15-D-testalexandria",
541                 "isPermitted": true
542               },
543               {
544                 "id": "d0a3e3f2964542259d155a81c41aadc3",
545                 "name": "test-hvf6-09",
546                 "isPermitted": true
547               },
548               {
549                 "id": "fa45ca53c80b492fa8be5477cd84fc2b",
550                 "name": "ro-T112",
551                 "isPermitted": true
552               },
553               {
554                 "id": "cbb99fe4ada84631b7baf046b6fd2044",
555                 "name": "DN5242-Nov16-T3",
556                 "isPermitted": true
557               }
558             ]
559           }
560         },
561         "productFamilies": [
562           {
563             "id": "ebc3bc3d-62fd-4a3f-a037-f619df4ff034",
564             "name": "SCOTTIE",
565             "isPermitted": true
566           },
567           {
568             "id": "17cc1042-527b-11e6-beb8-9e71128cae77",
569             "name": "IGNACIO",
570             "isPermitted": true
571           },
572           {
573             "id": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
574             "name": "Christie",
575             "isPermitted": true
576           },
577           {
578             "id": "a4f6f2ae-9bf5-4ed7-b904-06b2099c4bd7",
579             "name": "Enhanced Services",
580             "isPermitted": true
581           },
582           {
583             "id": "vTerrance",
584             "name": "vTerrance",
585             "isPermitted": true
586           },
587           {
588             "id": "323d69d9-2efe-4r45-ay0a-89ea7ard4e6f",
589             "name": "vSCP",
590             "isPermitted": true
591           },
592           {
593             "id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
594             "name": "Emanuel",
595             "isPermitted": true
596           },
597           {
598             "id": "d8a6ed93-251c-47ca-adc9-86671fd19f4c",
599             "name": "BVOIP",
600             "isPermitted": true
601           },
602           {
603             "id": "db171b8f-115c-4992-a2e3-ee04cae357e0",
604             "name": "LINDSEY",
605             "isPermitted": true
606           },
607           {
608             "id": "LRSI-OSPF",
609             "name": "LRSI-OSPF",
610             "isPermitted": true
611           },
612           {
613             "id": "vRosemarie",
614             "name": "HNGATEWAY",
615             "isPermitted": true
616           },
617           {
618             "id": "vHNPaas",
619             "name": "WILKINS",
620             "isPermitted": true
621           },
622           {
623             "id": "e433710f-9217-458d-a79d-1c7aff376d89",
624             "name": "TYLER SILVIA",
625             "isPermitted": true
626           },
627           {
628             "id": "b6a3f28c-eebf-494c-a900-055cc7c874ce",
629             "name": "VROUTER",
630             "isPermitted": true
631           },
632           {
633             "id": "Cisneros",
634             "name": "vMuriel",
635             "isPermitted": true
636           },
637           {
638             "id": "0ee8c1bc-7cbd-4b0a-a1ac-e9999255abc1",
639             "name": "CARA Griffin",
640             "isPermitted": true
641           },
642           {
643             "id": "c7611ebe-c324-48f1-8085-94aef0c6ef3d",
644             "name": "DARREN MCGEE",
645             "isPermitted": true
646           },
647           {
648             "id": "e30755dc-5673-4b6b-9dcf-9abdd96b93d1",
649             "name": "Transport",
650             "isPermitted": true
651           },
652           {
653             "id": "vSalvatore",
654             "name": "vSalvatore",
655             "isPermitted": true
656           },
657           {
658             "id": "d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4",
659             "name": "Josefina",
660             "isPermitted": true
661           },
662           {
663             "id": "vHubbard",
664             "name": "vHubbard",
665             "isPermitted": true
666           },
667           {
668             "id": "12a96a9d-4b4c-4349-a950-fe1159602621",
669             "name": "DARREN MCGEE",
670             "isPermitted": true
671           }
672         ],
673         "serviceTypes": {
674           "e433710f-9217-458d-a79d-1c7aff376d89": [
675             {
676               "id": "0",
677               "name": "vRichardson",
678               "isPermitted": false
679             },
680             {
681               "id": "1",
682               "name": "TYLER SILVIA",
683               "isPermitted": true
684             },
685             {
686               "id": "2",
687               "name": "Emanuel",
688               "isPermitted": false
689             },
690             {
691               "id": "3",
692               "name": "vJamie",
693               "isPermitted": false
694             },
695             {
696               "id": "4",
697               "name": "vVoiceMail",
698               "isPermitted": false
699             },
700             {
701               "id": "5",
702               "name": "Kennedy",
703               "isPermitted": false
704             },
705             {
706               "id": "6",
707               "name": "vSEGW",
708               "isPermitted": false
709             },
710             {
711               "id": "7",
712               "name": "vVM",
713               "isPermitted": false
714             },
715             {
716               "id": "8",
717               "name": "vOTA",
718               "isPermitted": false
719             },
720             {
721               "id": "9",
722               "name": "vMME",
723               "isPermitted": false
724             },
725             {
726               "id": "10",
727               "name": "vMNS",
728               "isPermitted": false
729             },
730             {
731               "id": "11",
732               "name": "vSCP",
733               "isPermitted": false
734             },
735             {
736               "id": "12",
737               "name": "VPMS",
738               "isPermitted": false
739             },
740             {
741               "id": "13",
742               "name": "vMMSC",
743               "isPermitted": false
744             },
745             {
746               "id": "14",
747               "name": "SSD",
748               "isPermitted": false
749             },
750             {
751               "id": "15",
752               "name": "vMOG",
753               "isPermitted": false
754             },
755             {
756               "id": "16",
757               "name": "LINDSEY",
758               "isPermitted": false
759             },
760             {
761               "id": "17",
762               "name": "JOHANNA_SANTOS",
763               "isPermitted": false
764             },
765             {
766               "id": "18",
767               "name": "vCarroll",
768               "isPermitted": false
769             }
770           ]
771         },
772         "aicZones": [
773           {
774             "id": "NFT1",
775             "name": "NFTJSSSS-NFT1"
776           },
777           {
778             "id": "JAG1",
779             "name": "YUDFJULP-JAG1"
780           },
781           {
782             "id": "YYY1",
783             "name": "UUUAIAAI-YYY1"
784           },
785           {
786             "id": "AVT1",
787             "name": "AVTRFLHD-AVT1"
788           },
789           {
790             "id": "ATL34",
791             "name": "ATLSANAI-ATL34"
792           }
793         ],
794         "categoryParameters": {
795           "owningEntityList": [
796             {
797               "id": "aaa1",
798               "name": "aaa1"
799             },
800             {
801               "id": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
802               "name": "WayneHolland"
803             },
804             {
805               "id": "Melissa",
806               "name": "Melissa"
807             }
808           ],
809           "projectList": [
810             {
811               "id": "WATKINS",
812               "name": "WATKINS"
813             },
814             {
815               "id": "x1",
816               "name": "x1"
817             },
818             {
819               "id": "yyy1",
820               "name": "yyy1"
821             }
822           ],
823           "lineOfBusinessList": [
824             {
825               "id": "ONAP",
826               "name": "ONAP"
827             },
828             {
829               "id": "zzz1",
830               "name": "zzz1"
831             }
832           ],
833           "platformList": [
834             {
835               "id": "platform",
836               "name": "platform"
837             },
838             {
839               "id": "xxx1",
840               "name": "xxx1"
841             }
842           ]
843         },
844         "type": "[LCP_REGIONS_AND_TENANTS] Update",
845         "subscribers": [
846           {
847             "id": "CAR_2020_ER",
848             "name": "CAR_2020_ER",
849             "isPermitted": true
850           },
851           {
852             "id": "21014aa2-526b-11e6-beb8-9e71128cae77",
853             "name": "JULIO ERICKSON",
854             "isPermitted": false
855           },
856           {
857             "id": "DHV1707-TestSubscriber-2",
858             "name": "DALE BRIDGES",
859             "isPermitted": false
860           },
861           {
862             "id": "DHV1707-TestSubscriber-1",
863             "name": "LLOYD BRIDGES",
864             "isPermitted": false
865           },
866           {
867             "id": "jimmy-example",
868             "name": "JimmyExampleCust-20161102",
869             "isPermitted": false
870           },
871           {
872             "id": "jimmy-example2",
873             "name": "JimmyExampleCust-20161103",
874             "isPermitted": false
875           },
876           {
877             "id": "ERICA5779-TestSub-PWT-102",
878             "name": "ERICA5779-TestSub-PWT-102",
879             "isPermitted": false
880           },
881           {
882             "id": "ERICA5779-TestSub-PWT-101",
883             "name": "ERICA5779-TestSub-PWT-101",
884             "isPermitted": false
885           },
886           {
887             "id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
888             "name": "Emanuel",
889             "isPermitted": false
890           },
891           {
892             "id": "ERICA5779-Subscriber-4",
893             "name": "ERICA5779-Subscriber-5",
894             "isPermitted": false
895           },
896           {
897             "id": "ERICA5779-TestSub-PWT-103",
898             "name": "ERICA5779-TestSub-PWT-103",
899             "isPermitted": false
900           },
901           {
902             "id": "ERICA5779-Subscriber-2",
903             "name": "ERICA5779-Subscriber-2",
904             "isPermitted": false
905           },
906           {
907             "id": "e433710f-9217-458d-a79d-1c7aff376d89",
908             "name": "SILVIA ROBBINS",
909             "isPermitted": true
910           },
911           {
912             "id": "ERICA5779-Subscriber-3",
913             "name": "ERICA5779-Subscriber-3",
914             "isPermitted": false
915           },
916           {
917             "id": "31739f3e-526b-11e6-beb8-9e71128cae77",
918             "name": "CRAIG/ROBERTS",
919             "isPermitted": false
920           }
921         ]
922       }
923     }
924   }
925 }
926 class ActivatedRouteMock<T>{
927   queryParams() {
928     return {
929       serviceModelId : '6e59c5de-f052-46fa-aa7e-2fca9d674c44'
930     }
931   }
932 }
933
934 class MockFeatureFlagsService {}
935
936 describe('Generic Form popup Service', () => {
937   let injector;
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;
947
948   beforeAll(done => (async () => {
949     TestBed.configureTestingModule({
950       imports: [HttpClientTestingModule],
951       providers: [GenericFormPopupService,
952         FormBuilder,
953         IframeService,
954         ServicePopupService,
955         BasicControlGenerator,
956         ServiceControlGenerator,
957         GenericFormService,
958         LogService,
959         DefaultDataGeneratorService,
960         BasicPopupService,
961         AaiService,
962         NetworkPopupService,
963         NetworkControlGenerator,
964         VfModulePopuopService,
965         VfModuleControlGenerator,
966         {provide:FeatureFlagsService, useClass: MockFeatureFlagsService},
967         {provide: ActivatedRoute, useClass: ActivatedRouteMock},
968         {provide: NgRedux, useClass: MockAppStore}]
969     });
970     await TestBed.compileComponents();
971
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);
981
982   })().then(done).catch(done.fail));
983
984
985   test('VL: getGenericFormDetails should return FormPopupDetails', () => {
986     let uuidData : UUIDData = <any>{
987       type : 'VL',
988       serviceId : '6e59c5de-f052-46fa-aa7e-2fca9d674c44',
989       networkId : 'ExtVL 0',
990       networkStoreKey : 'ExtVL 0',
991       popupService : netwokPopupService
992     };
993     let node : ITreeNode = <any>{data : {} };
994
995     jest.spyOn(uuidData.popupService ,'getGenericFormPopupDetails');
996     service.getGenericFormDetails(uuidData, node,true);
997
998     expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledTimes(1);
999     expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledWith(uuidData['serviceId'],
1000       uuidData['networkId'],
1001       uuidData['networkStoreKey'],
1002       node,
1003       uuidData,
1004       true
1005     );
1006   });
1007
1008   test('VFmodule: getGenericFormDetails should return FormPopupDetails', () => {
1009     let uuidData : UUIDData = <any>{
1010       type : 'VFmodule',
1011       serviceId : '6e59c5de-f052-46fa-aa7e-2fca9d674c44',
1012       vnfStoreKey : 'VF_vMee 0',
1013       vFModuleStoreKey : 'vf_vmee0..VfVmee..vmme_vlc..module-1',
1014       popupService : vfModulePopupService
1015     };
1016     let node : ITreeNode = <any>{data : {}};
1017
1018     spyOn(uuidData.popupService ,'getGenericFormPopupDetails');
1019     service.getGenericFormDetails(uuidData, node,true);
1020
1021     expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledTimes(1)
1022     expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledWith(
1023       uuidData['serviceId'],
1024       uuidData['vnfStoreKey'],
1025       uuidData['vFModuleStoreKey'],
1026       node,
1027       uuidData,
1028       true
1029     );
1030   });
1031
1032
1033   test('service: getGenericFormDetails should return FormPopupDetails', () => {
1034     let uuidData : UUIDData = <any>{
1035       type : 'service',
1036       serviceId : '6e59c5de-f052-46fa-aa7e-2fca9d674c44',
1037       popupService : servicePopupService
1038     };
1039     let node : ITreeNode = <any>{data : {}};
1040
1041     jest.spyOn(uuidData.popupService ,'getGenericFormPopupDetails');
1042     service.getGenericFormDetails(uuidData, node,true);
1043
1044     expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledTimes(1);
1045     expect(uuidData.popupService.getGenericFormPopupDetails).toHaveBeenCalledWith(
1046       uuidData['serviceId'],
1047       null,
1048       null,
1049       node,
1050       uuidData,
1051       true
1052     );
1053   });
1054
1055
1056   test('initReduxOnCreateNewService',() => {
1057     jest.spyOn(_aaiService, 'getServiceModelById');
1058     service.initReduxOnCreateNewService();
1059   })
1060 });