remove EMPTY_DRAWING_BOARD_TEST feature flag
[vid.git] / vid-webpack-master / src / app / shared / components / genericForm / formControlsServices / vfModuleGenerator / vfModule.control.generator.spec.ts
1 import {getTestBed, TestBed} from '@angular/core/testing';
2 import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
3 import {NgRedux} from '@angular-redux/store';
4 import {BasicControlGenerator} from "../basic.control.generator";
5 import {AaiService} from "../../../../services/aaiService/aai.service";
6 import {GenericFormService} from "../../generic-form.service";
7 import {FormBuilder} from "@angular/forms";
8 import {LogService} from "../../../../utils/log/log.service";
9 import {
10   FormControlModel,
11   ValidatorModel,
12   ValidatorOptions
13 } from "../../../../models/formControlModels/formControl.model";
14 import {FormControlNames, VfModuleControlGenerator} from "./vfModule.control.generator";
15 import {FeatureFlagsService} from "../../../../services/featureFlag/feature-flags.service";
16 import {VfModuleInstance} from "../../../../models/vfModuleInstance";
17 import {VfModule} from "../../../../models/vfModule";
18
19 class MockAppStore<T> {
20   getState() {
21     return {
22       "global": {
23         "name": null,
24         "flags": {
25           "FLAG_NETWORK_TO_ASYNC_INSTANTIATION": false,
26           "FLAG_SHOW_ASSIGNMENTS": true,
27           "FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS": true,
28           "FLAG_SHOW_VERIFY_SERVICE": false,
29           "FLAG_SERVICE_MODEL_CACHE": true,
30           "FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
31           "FLAG_ADD_MSO_TESTAPI_FIELD": true
32         },
33         "type": "[FLAGS] Update"
34       },
35       "service": {
36         "serviceHierarchy": {
37           "6e59c5de-f052-46fa-aa7e-2fca9d674c44": {
38             "service": {
39               "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
40               "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
41               "name": "ComplexService",
42               "version": "1.0",
43               "toscaModelURL": null,
44               "category": "Emanuel",
45               "serviceType": "",
46               "serviceRole": "",
47               "description": "ComplexService",
48               "serviceEcompNaming": "false",
49               "instantiationType": "Macro",
50               "inputs": {}
51             },
52             "vnfs": {
53               "VF_vGeraldine 0": {
54                 "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
55                 "invariantUuid": "4160458e-f648-4b30-a176-43881ffffe9e",
56                 "description": "VSP_vGeraldine",
57                 "name": "VF_vGeraldine",
58                 "version": "2.0",
59                 "customizationUuid": "91415b44-753d-494c-926a-456a9172bbb9",
60                 "inputs": {},
61                 "commands": {},
62                 "serviceEcompNaming" : "true",
63                 "properties": {
64                   "ecomp_generated_naming": "false",
65                   "max_instances": 10,
66                   "min_instances": 1,
67                   "gpb2_Internal2_mac": "00:11:22:EF:AC:DF",
68                   "sctp-b-ipv6-egress_src_start_port": "0",
69                   "sctp-a-ipv6-egress_rule_application": "any",
70                   "Internal2_allow_transit": "true",
71                   "sctp-b-IPv6_ethertype": "IPv6",
72                   "sctp-a-egress_rule_application": "any",
73                   "sctp-b-ingress_action": "pass",
74                   "sctp-b-ingress_rule_protocol": "icmp",
75                   "ncb2_Internal1_mac": "00:11:22:EF:AC:DF",
76                   "sctp-b-ipv6-ingress-src_start_port": "0.0",
77                   "ncb1_Internal2_mac": "00:11:22:EF:AC:DF",
78                   "fsb_volume_size_0": "320.0",
79                   "sctp-b-egress_src_addresses": "local",
80                   "sctp-a-ipv6-ingress_ethertype": "IPv4",
81                   "sctp-a-ipv6-ingress-dst_start_port": "0",
82                   "sctp-b-ipv6-ingress_rule_application": "any",
83                   "domain_name": "default-domain",
84                   "sctp-a-ingress_rule_protocol": "icmp",
85                   "sctp-b-egress-src_start_port": "0.0",
86                   "sctp-a-egress_src_addresses": "local",
87                   "sctp-b-display_name": "epc-sctp-b-ipv4v6-sec-group",
88                   "sctp-a-egress-src_start_port": "0.0",
89                   "sctp-a-ingress_ethertype": "IPv4",
90                   "sctp-b-ipv6-ingress-dst_end_port": "65535",
91                   "sctp-b-dst_subnet_prefix_v6": "::",
92                   "nf_naming": "{ecomp_generated_naming=true}",
93                   "sctp-a-ipv6-ingress_src_subnet_prefix": "0.0.0.0",
94                   "sctp-b-egress-dst_start_port": "0.0",
95                   "ncb_flavor_name": "nv.c20r64d1",
96                   "gpb1_Internal1_mac": "00:11:22:EF:AC:DF",
97                   "sctp-b-egress_dst_subnet_prefix_len": "0.0",
98                   "Internal2_net_cidr": "10.0.0.10",
99                   "sctp-a-ingress-dst_start_port": "0.0",
100                   "sctp-a-egress-dst_start_port": "0.0",
101                   "fsb1_Internal2_mac": "00:11:22:EF:AC:DF",
102                   "sctp-a-egress_ethertype": "IPv4",
103                   "vlc_st_service_mode": "in-network-nat",
104                   "sctp-a-ipv6-egress_ethertype": "IPv4",
105                   "sctp-a-egress-src_end_port": "65535.0",
106                   "sctp-b-ipv6-egress_rule_application": "any",
107                   "sctp-b-egress_action": "pass",
108                   "sctp-a-ingress-src_subnet_prefix_len": "0.0",
109                   "sctp-b-ipv6-ingress-src_end_port": "65535.0",
110                   "sctp-b-name": "epc-sctp-b-ipv4v6-sec-group",
111                   "fsb2_Internal1_mac": "00:11:22:EF:AC:DF",
112                   "sctp-a-ipv6-ingress-src_start_port": "0.0",
113                   "sctp-b-ipv6-egress_ethertype": "IPv4",
114                   "Internal1_net_cidr": "10.0.0.10",
115                   "sctp-a-egress_dst_subnet_prefix": "0.0.0.0",
116                   "fsb_flavor_name": "nv.c20r64d1",
117                   "sctp_rule_protocol": "132",
118                   "sctp-b-ipv6-ingress_src_subnet_prefix_len": "0",
119                   "sctp-a-ipv6-ingress_rule_application": "any",
120                   "sctp-a-IPv6_ethertype": "IPv6",
121                   "vlc2_Internal1_mac": "00:11:22:EF:AC:DF",
122                   "vlc_st_virtualization_type": "virtual-machine",
123                   "sctp-b-ingress-dst_start_port": "0.0",
124                   "sctp-b-ingress-dst_end_port": "65535.0",
125                   "sctp-a-ipv6-ingress-src_end_port": "65535.0",
126                   "sctp-a-display_name": "epc-sctp-a-ipv4v6-sec-group",
127                   "sctp-b-ingress_rule_application": "any",
128                   "int2_sec_group_name": "int2-sec-group",
129                   "vlc_flavor_name": "nd.c16r64d1",
130                   "sctp-b-ipv6-egress_src_addresses": "local",
131                   "vlc_st_interface_type_int1": "other1",
132                   "sctp-b-egress-src_end_port": "65535.0",
133                   "sctp-a-ipv6-egress-dst_start_port": "0",
134                   "vlc_st_interface_type_int2": "other2",
135                   "sctp-a-ipv6-egress_rule_protocol": "any",
136                   "Internal2_shared": "false",
137                   "sctp-a-ipv6-egress_dst_subnet_prefix_len": "0",
138                   "Internal2_rpf": "disable",
139                   "vlc1_Internal1_mac": "00:11:22:EF:AC:DF",
140                   "sctp-b-ipv6-egress_src_end_port": "65535",
141                   "sctp-a-ipv6-egress_src_addresses": "local",
142                   "sctp-a-ingress-dst_end_port": "65535.0",
143                   "sctp-a-ipv6-egress_src_end_port": "65535",
144                   "Internal1_forwarding_mode": "l2",
145                   "Internal2_dhcp": "false",
146                   "sctp-a-dst_subnet_prefix_v6": "::",
147                   "pxe_image_name": "MME_PXE-Boot_16ACP04_GA.qcow2",
148                   "vlc_st_interface_type_gtp": "other0",
149                   "ncb1_Internal1_mac": "00:11:22:EF:AC:DF",
150                   "sctp-b-src_subnet_prefix_v6": "::",
151                   "sctp-a-egress_dst_subnet_prefix_len": "0.0",
152                   "int1_sec_group_name": "int1-sec-group",
153                   "Internal1_dhcp": "false",
154                   "sctp-a-ipv6-egress_dst_end_port": "65535",
155                   "Internal2_forwarding_mode": "l2",
156                   "fsb2_Internal2_mac": "00:11:22:EF:AC:DF",
157                   "sctp-b-egress_dst_subnet_prefix": "0.0.0.0",
158                   "Internal1_net_cidr_len": "17",
159                   "gpb2_Internal1_mac": "00:11:22:EF:AC:DF",
160                   "sctp-b-ingress-src_subnet_prefix_len": "0.0",
161                   "sctp-a-ingress_dst_addresses": "local",
162                   "sctp-a-egress_action": "pass",
163                   "fsb_volume_type_0": "SF-Default-SSD",
164                   "ncb2_Internal2_mac": "00:11:22:EF:AC:DF",
165                   "vlc_st_interface_type_sctp_a": "left",
166                   "vlc_st_interface_type_sctp_b": "right",
167                   "sctp-a-src_subnet_prefix_v6": "::",
168                   "vlc_st_version": "2",
169                   "sctp-b-egress_ethertype": "IPv4",
170                   "sctp-a-ingress_rule_application": "any",
171                   "gpb1_Internal2_mac": "00:11:22:EF:AC:DF",
172                   "instance_ip_family_v6": "v6",
173                   "sctp-a-ipv6-egress_src_start_port": "0",
174                   "sctp-b-ingress-src_start_port": "0.0",
175                   "sctp-b-ingress_dst_addresses": "local",
176                   "fsb1_Internal1_mac": "00:11:22:EF:AC:DF",
177                   "vlc_st_interface_type_oam": "management",
178                   "multi_stage_design": "true",
179                   "oam_sec_group_name": "oam-sec-group",
180                   "Internal2_net_gateway": "10.0.0.10",
181                   "sctp-a-ipv6-ingress-dst_end_port": "65535",
182                   "sctp-b-ipv6-egress-dst_start_port": "0",
183                   "Internal1_net_gateway": "10.0.0.10",
184                   "sctp-b-ipv6-egress_rule_protocol": "any",
185                   "gtp_sec_group_name": "gtp-sec-group",
186                   "sctp-a-ipv6-egress_dst_subnet_prefix": "0.0.0.0",
187                   "sctp-b-ipv6-egress_dst_subnet_prefix_len": "0",
188                   "sctp-a-ipv6-ingress_dst_addresses": "local",
189                   "sctp-a-egress_rule_protocol": "icmp",
190                   "sctp-b-ipv6-egress_action": "pass",
191                   "sctp-a-ipv6-egress_action": "pass",
192                   "Internal1_shared": "false",
193                   "sctp-b-ipv6-ingress_rule_protocol": "any",
194                   "Internal2_net_cidr_len": "17",
195                   "sctp-a-name": "epc-sctp-a-ipv4v6-sec-group",
196                   "sctp-a-ingress-src_end_port": "65535.0",
197                   "sctp-b-ipv6-ingress_src_subnet_prefix": "0.0.0.0",
198                   "sctp-a-egress-dst_end_port": "65535.0",
199                   "sctp-a-ingress_action": "pass",
200                   "sctp-b-egress_rule_protocol": "icmp",
201                   "sctp-b-ipv6-ingress_action": "pass",
202                   "vlc_st_service_type": "firewall",
203                   "sctp-b-ipv6-egress_dst_end_port": "65535",
204                   "sctp-b-ipv6-ingress-dst_start_port": "0",
205                   "vlc2_Internal2_mac": "00:11:22:EF:AC:DF",
206                   "vlc_st_availability_zone": "true",
207                   "fsb_volume_image_name_1": "MME_FSB2_16ACP04_GA.qcow2",
208                   "sctp-b-ingress-src_subnet_prefix": "0.0.0.0",
209                   "sctp-a-ipv6-ingress_src_subnet_prefix_len": "0",
210                   "Internal1_allow_transit": "true",
211                   "gpb_flavor_name": "nv.c20r64d1",
212                   "availability_zone_max_count": "1",
213                   "fsb_volume_image_name_0": "MME_FSB1_16ACP04_GA.qcow2",
214                   "sctp-b-ipv6-ingress_dst_addresses": "local",
215                   "sctp-b-ipv6-egress_dst_subnet_prefix": "0.0.0.0",
216                   "sctp-b-ipv6-ingress_ethertype": "IPv4",
217                   "vlc1_Internal2_mac": "00:11:22:EF:AC:DF",
218                   "sctp-a-ingress-src_subnet_prefix": "0.0.0.0",
219                   "sctp-a-ipv6-ingress_action": "pass",
220                   "Internal1_rpf": "disable",
221                   "sctp-b-ingress_ethertype": "IPv4",
222                   "sctp-b-egress_rule_application": "any",
223                   "sctp-b-ingress-src_end_port": "65535.0",
224                   "sctp-a-ipv6-ingress_rule_protocol": "any",
225                   "sctp-a-ingress-src_start_port": "0.0",
226                   "sctp-b-egress-dst_end_port": "65535.0"
227                 },
228                 "type": "VF",
229                 "modelCustomizationName": "VF_vGeraldine 0",
230                 "vfModules": {
231                   "vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1": {
232                     "uuid": "522159d5-d6e0-4c2a-aa44-5a542a12a830",
233                     "invariantUuid": "98a7c88b-b577-476a-90e4-e25a5871e02b",
234                     "customizationUuid": "55b1be94-671a-403e-a26c-667e9c47d091",
235                     "description": null,
236                     "name": "VfVgeraldine..vflorence_vlc..module-1",
237                     "version": "2",
238                     "modelCustomizationName": "VfVgeraldine..vflorence_vlc..module-1",
239                     "properties": {
240                       "minCountInstances": 0,
241                       "maxCountInstances": null,
242                       "initialCount": 0,
243                       "vfModuleLabel": "vflorence_vlc"
244                     },
245                     "inputs": {},
246                     "volumeGroupAllowed": true
247                   },
248                   "vf_vgeraldine0..VfVgeraldine..vflorence_gpb..module-2": {
249                     "uuid": "41708296-e443-4c71-953f-d9a010f059e1",
250                     "invariantUuid": "1cca90b8-3490-495e-87da-3f3e4c57d5b9",
251                     "customizationUuid": "6add59e0-7fe1-4bc4-af48-f8812422ae7c",
252                     "description": null,
253                     "name": "VfVgeraldine..vflorence_gpb..module-2",
254                     "version": "2",
255                     "modelCustomizationName": "VfVgeraldine..vflorence_gpb..module-2",
256                     "properties": {
257                       "minCountInstances": 0,
258                       "maxCountInstances": null,
259                       "initialCount": 0,
260                       "vfModuleLabel": "vflorence_gpb"
261                     },
262                     "inputs": {},
263                     "volumeGroupAllowed": false
264                   },
265                   "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
266                     "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
267                     "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
268                     "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
269                     "description": null,
270                     "name": "VfVgeraldine..base_vflorence..module-0",
271                     "version": "2",
272                     "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
273                     "properties": {
274                       "minCountInstances": 1,
275                       "maxCountInstances": 1,
276                       "initialCount": 1,
277                       "vfModuleLabel": "base_vflorence"
278                     },
279                     "inputs": {},
280                     "volumeGroupAllowed": true
281                   }
282                 },
283                 "volumeGroups": {
284                   "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
285                     "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
286                     "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
287                     "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
288                     "description": null,
289                     "name": "VfVgeraldine..base_vflorence..module-0",
290                     "version": "2",
291                     "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
292                     "properties": {
293                       "minCountInstances": 1,
294                       "maxCountInstances": 1,
295                       "initialCount": 1,
296                       "vfModuleLabel": "base_vflorence"
297                     },
298                     "inputs": {}
299                   }
300                 },
301                 "vfcInstanceGroups": {}
302               }
303             },
304             "networks": {
305               "ExtVL 0": {
306                 "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986",
307                 "invariantUuid": "379f816b-a7aa-422f-be30-17114ff50b7c",
308                 "description": "ECOMP generic virtual link (network) base type for all other service-level and global networks",
309                 "name": "ExtVL",
310                 "version": "37.0",
311                 "customizationUuid": "94fdd893-4a36-4d70-b16a-ec29c54c184f",
312                 "inputs": {},
313                 "commands": {},
314                 "properties": {
315                   "ecomp_generated_naming": "false",
316                   "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}}",
317                   "exVL_naming": "{ecomp_generated_naming=true}",
318                   "network_flows": "{is_network_policy=false, is_bound_to_vpn=false}",
319                   "network_homing": "{ecomp_selected_instance_node_target=false}"
320                 },
321                 "type": "VL",
322                 "modelCustomizationName": "ExtVL 0"
323               }
324             },
325             "collectionResources": {},
326             "configurations": {
327               "Port Mirroring Configuration By Policy 0": {
328                 "uuid": "b4398538-e89d-4f13-b33d-ca323434ba50",
329                 "invariantUuid": "6ef0ca40-f366-4897-951f-abd65d25f6f7",
330                 "description": "A port mirroring configuration by policy object",
331                 "name": "Port Mirroring Configuration By Policy",
332                 "version": "27.0",
333                 "customizationUuid": "3c3b7b8d-8669-4b3b-8664-61970041fad2",
334                 "inputs": {},
335                 "commands": {},
336                 "properties": {},
337                 "type": "Configuration",
338                 "modelCustomizationName": "Port Mirroring Configuration By Policy 0",
339                 "sourceNodes": [],
340                 "collectorNodes": null,
341                 "configurationByPolicy": false
342               }
343             },
344             "serviceProxies": {},
345             "vfModules": {
346               "vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1": {
347                 "uuid": "522159d5-d6e0-4c2a-aa44-5a542a12a830",
348                 "invariantUuid": "98a7c88b-b577-476a-90e4-e25a5871e02b",
349                 "customizationUuid": "55b1be94-671a-403e-a26c-667e9c47d091",
350                 "description": null,
351                 "name": "VfVgeraldine..vflorence_vlc..module-1",
352                 "version": "2",
353                 "modelCustomizationName": "VfVgeraldine..vflorence_vlc..module-1",
354                 "properties": {
355                   "minCountInstances": 0,
356                   "maxCountInstances": null,
357                   "initialCount": 0,
358                   "vfModuleLabel": "vflorence_vlc"
359                 },
360                 "inputs": {},
361                 "volumeGroupAllowed": true
362               },
363               "vf_vgeraldine0..VfVgeraldine..vflorence_gpb..module-2": {
364                 "uuid": "41708296-e443-4c71-953f-d9a010f059e1",
365                 "invariantUuid": "1cca90b8-3490-495e-87da-3f3e4c57d5b9",
366                 "customizationUuid": "6add59e0-7fe1-4bc4-af48-f8812422ae7c",
367                 "description": null,
368                 "name": "VfVgeraldine..vflorence_gpb..module-2",
369                 "version": "2",
370                 "modelCustomizationName": "VfVgeraldine..vflorence_gpb..module-2",
371                 "properties": {
372                   "minCountInstances": 0,
373                   "maxCountInstances": null,
374                   "initialCount": 0,
375                   "vfModuleLabel": "vflorence_gpb"
376                 },
377                 "inputs": {},
378                 "volumeGroupAllowed": false
379               },
380               "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
381                 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
382                 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
383                 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
384                 "description": null,
385                 "name": "VfVgeraldine..base_vflorence..module-0",
386                 "version": "2",
387                 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
388                 "properties": {
389                   "minCountInstances": 1,
390                   "maxCountInstances": 1,
391                   "initialCount": 1,
392                   "vfModuleLabel": "base_vflorence"
393                 },
394                 "inputs": {},
395                 "volumeGroupAllowed": true
396               }
397             },
398             "volumeGroups": {
399               "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
400                 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
401                 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
402                 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
403                 "description": null,
404                 "name": "VfVgeraldine..base_vflorence..module-0",
405                 "version": "2",
406                 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
407                 "properties": {
408                   "minCountInstances": 1,
409                   "maxCountInstances": 1,
410                   "initialCount": 1,
411                   "vfModuleLabel": "base_vflorence"
412                 },
413                 "inputs": {}
414               }
415             },
416             "pnfs": {}
417           }
418         },
419         "serviceInstance": {
420           "6e59c5de-f052-46fa-aa7e-2fca9d674c44": {
421             "networks": {},
422             "vnfs": {
423               "VF_vGeraldine 0": {
424                 "rollbackOnFailure": "true",
425                 "vfModules": {
426                   "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
427                     "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0vmvzo": {
428                       "isMissingData": false,
429                       "sdncPreReload": null,
430                       "modelInfo": {
431                         "modelType": "VFmodule",
432                         "modelInvariantId": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
433                         "modelVersionId": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
434                         "modelName": "VfVgeraldine..base_vflorence..module-0",
435                         "modelVersion": "2",
436                         "modelCustomizationId": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
437                         "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0"
438                       },
439                       "instanceParams": [
440                         {}
441                       ],
442                       "trackById": "wmtm6sy2uj"
443                     }
444                   }
445                 },
446                 "isMissingData": true,
447                 "originalName": "VF_vGeraldine 0",
448                 "vnfStoreKey": "VF_vGeraldine 0",
449                 "trackById": "p3wk448m5do",
450                 "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
451                 "productFamilyId": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
452                 "lcpCloudRegionId": null,
453                 "tenantId": null,
454                 "lineOfBusiness": null,
455                 "platformName": null,
456                 "modelInfo": {
457                   "modelType": "VF",
458                   "modelInvariantId": "4160458e-f648-4b30-a176-43881ffffe9e",
459                   "modelVersionId": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
460                   "modelName": "VF_vGeraldine",
461                   "modelVersion": "2.0",
462                   "modelCustomizationName": "VF_vGeraldine 0"
463                 }
464               }
465             },
466             "instanceParams": [
467               {}
468             ],
469             "validationCounter": 1,
470             "existingNames": {},
471             "existingVNFCounterMap": {
472               "d6557200-ecf2-4641-8094-5393ae3aae60": 1
473             },
474             "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
475             "subscriptionServiceType": "TYLER SILVIA",
476             "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
477             "productFamilyId": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
478             "lcpCloudRegionId": "hvf6",
479             "tenantId": "229bcdc6eaeb4ca59d55221141d01f8e",
480             "aicZoneId": "JAG1",
481             "projectName": "x1",
482             "rollbackOnFailure": "true",
483             "bulkSize": 1,
484             "modelInfo": {
485               "modelInvariantId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
486               "modelVersionId": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
487               "modelName": "ComplexService",
488               "modelVersion": "1.0",
489               "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44"
490             },
491             "isALaCarte": false,
492             "name": "ComplexService",
493             "version": "1.0",
494             "description": "ComplexService",
495             "category": "Emanuel",
496             "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
497             "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
498             "serviceType": "",
499             "serviceRole": "",
500             "isEcompGeneratedNaming": true,
501             "isMultiStepDesign": false
502           }
503         },
504         "lcpRegionsAndTenants": {
505           "lcpRegionList": [
506             {
507               "id": "AAIAIC25",
508               "name": "AAIAIC25",
509               "isPermitted": true
510             },
511             {
512               "id": "hvf6",
513               "name": "hvf6",
514               "isPermitted": true
515             }
516           ],
517           "lcpRegionsTenantsMap": {
518             "AAIAIC25": [
519               {
520                 "id": "092eb9e8e4b7412e8787dd091bc58e86",
521                 "name": "USP-SIP-IC-24335-T-01",
522                 "isPermitted": true
523               }
524             ],
525             "hvf6": [
526               {
527                 "id": "bae71557c5bb4d5aac6743a4e5f1d054",
528                 "name": "AIN Web Tool-15-D-testalexandria",
529                 "isPermitted": true
530               },
531               {
532                 "id": "d0a3e3f2964542259d155a81c41aadc3",
533                 "name": "test-hvf6-09",
534                 "isPermitted": true
535               },
536               {
537                 "id": "fa45ca53c80b492fa8be5477cd84fc2b",
538                 "name": "ro-T112",
539                 "isPermitted": true
540               },
541               {
542                 "id": "cbb99fe4ada84631b7baf046b6fd2044",
543                 "name": "DN5242-Nov16-T3",
544                 "isPermitted": true
545               }
546             ]
547           }
548         },
549         "productFamilies": [
550           {
551             "id": "ebc3bc3d-62fd-4a3f-a037-f619df4ff034",
552             "name": "ERICA",
553             "isPermitted": true
554           },
555           {
556             "id": "17cc1042-527b-11e6-beb8-9e71128cae77",
557             "name": "IGNACIO",
558             "isPermitted": true
559           },
560           {
561             "id": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
562             "name": "Christie",
563             "isPermitted": true
564           },
565           {
566             "id": "a4f6f2ae-9bf5-4ed7-b904-06b2099c4bd7",
567             "name": "Enhanced Services",
568             "isPermitted": true
569           },
570           {
571             "id": "vTerrance",
572             "name": "vTerrance",
573             "isPermitted": true
574           },
575           {
576             "id": "323d69d9-2efe-4r45-ay0a-89ea7ard4e6f",
577             "name": "vEsmeralda",
578             "isPermitted": true
579           },
580           {
581             "id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
582             "name": "Emanuel",
583             "isPermitted": true
584           },
585           {
586             "id": "d8a6ed93-251c-47ca-adc9-86671fd19f4c",
587             "name": "BVOIP",
588             "isPermitted": true
589           },
590           {
591             "id": "db171b8f-115c-4992-a2e3-ee04cae357e0",
592             "name": "LINDSEY",
593             "isPermitted": true
594           },
595           {
596             "id": "LRSI-OSPF",
597             "name": "LRSI-OSPF",
598             "isPermitted": true
599           },
600           {
601             "id": "vRosemarie",
602             "name": "HNGATEWAY",
603             "isPermitted": true
604           },
605           {
606             "id": "vHNPaas",
607             "name": "WILKINS",
608             "isPermitted": true
609           },
610           {
611             "id": "e433710f-9217-458d-a79d-1c7aff376d89",
612             "name": "TYLER SILVIA",
613             "isPermitted": true
614           },
615           {
616             "id": "b6a3f28c-eebf-494c-a900-055cc7c874ce",
617             "name": "VROUTER",
618             "isPermitted": true
619           },
620           {
621             "id": "vMuriel",
622             "name": "vMuriel",
623             "isPermitted": true
624           },
625           {
626             "id": "0ee8c1bc-7cbd-4b0a-a1ac-e9999255abc1",
627             "name": "CARA Griffin",
628             "isPermitted": true
629           },
630           {
631             "id": "c7611ebe-c324-48f1-8085-94aef0c6ef3d",
632             "name": "DARREN MCGEE",
633             "isPermitted": true
634           },
635           {
636             "id": "e30755dc-5673-4b6b-9dcf-9abdd96b93d1",
637             "name": "Transport",
638             "isPermitted": true
639           },
640           {
641             "id": "vSalvatore",
642             "name": "vSalvatore",
643             "isPermitted": true
644           },
645           {
646             "id": "d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4",
647             "name": "JOSEFINA",
648             "isPermitted": true
649           },
650           {
651             "id": "vHubbard",
652             "name": "vHubbard",
653             "isPermitted": true
654           },
655           {
656             "id": "12a96a9d-4b4c-4349-a950-fe1159602621",
657             "name": "DARREN MCGEE",
658             "isPermitted": true
659           }
660         ],
661         "serviceTypes": {
662           "e433710f-9217-458d-a79d-1c7aff376d89": [
663             {
664               "id": "0",
665               "name": "vRichardson",
666               "isPermitted": false
667             },
668             {
669               "id": "1",
670               "name": "TYLER SILVIA",
671               "isPermitted": true
672             },
673             {
674               "id": "2",
675               "name": "Emanuel",
676               "isPermitted": false
677             },
678             {
679               "id": "3",
680               "name": "vJamie",
681               "isPermitted": false
682             },
683             {
684               "id": "4",
685               "name": "vVoiceMail",
686               "isPermitted": false
687             },
688             {
689               "id": "5",
690               "name": "Kennedy",
691               "isPermitted": false
692             },
693             {
694               "id": "6",
695               "name": "vPorfirio",
696               "isPermitted": false
697             },
698             {
699               "id": "7",
700               "name": "vVM",
701               "isPermitted": false
702             },
703             {
704               "id": "8",
705               "name": "vOTA",
706               "isPermitted": false
707             },
708             {
709               "id": "9",
710               "name": "vFLORENCE",
711               "isPermitted": false
712             },
713             {
714               "id": "10",
715               "name": "vMNS",
716               "isPermitted": false
717             },
718             {
719               "id": "11",
720               "name": "vEsmeralda",
721               "isPermitted": false
722             },
723             {
724               "id": "12",
725               "name": "VPMS",
726               "isPermitted": false
727             },
728             {
729               "id": "13",
730               "name": "vWINIFRED",
731               "isPermitted": false
732             },
733             {
734               "id": "14",
735               "name": "SSD",
736               "isPermitted": false
737             },
738             {
739               "id": "15",
740               "name": "vMOG",
741               "isPermitted": false
742             },
743             {
744               "id": "16",
745               "name": "LINDSEY",
746               "isPermitted": false
747             },
748             {
749               "id": "17",
750               "name": "JOHANNA_SANTOS",
751               "isPermitted": false
752             },
753             {
754               "id": "18",
755               "name": "vCarroll",
756               "isPermitted": false
757             }
758           ]
759         },
760         "aicZones": [
761           {
762             "id": "NFT1",
763             "name": "NFTJSSSS-NFT1"
764           },
765           {
766             "id": "JAG1",
767             "name": "YUDFJULP-JAG1"
768           },
769           {
770             "id": "YYY1",
771             "name": "UUUAIAAI-YYY1"
772           },
773           {
774             "id": "AVT1",
775             "name": "AVTRFLHD-AVT1"
776           },
777           {
778             "id": "ATL34",
779             "name": "ATLSANAI-ATL34"
780           }
781         ],
782         "categoryParameters": {
783           "owningEntityList": [
784             {
785               "id": "aaa1",
786               "name": "aaa1"
787             },
788             {
789               "id": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
790               "name": "WayneHolland"
791             },
792             {
793               "id": "Melissa",
794               "name": "Melissa"
795             }
796           ],
797           "projectList": [
798             {
799               "id": "WATKINS",
800               "name": "WATKINS"
801             },
802             {
803               "id": "x1",
804               "name": "x1"
805             },
806             {
807               "id": "yyy1",
808               "name": "yyy1"
809             }
810           ],
811           "lineOfBusinessList": [
812             {
813               "id": "ONAP",
814               "name": "ONAP"
815             },
816             {
817               "id": "zzz1",
818               "name": "zzz1"
819             }
820           ],
821           "platformList": [
822             {
823               "id": "platform",
824               "name": "platform"
825             },
826             {
827               "id": "xxx1",
828               "name": "xxx1"
829             }
830           ]
831         },
832         "type": "[LCP_REGIONS_AND_TENANTS] Update",
833         "subscribers": [
834           {
835             "id": "CAR_2020_ER",
836             "name": "CAR_2020_ER",
837             "isPermitted": true
838           },
839           {
840             "id": "21014aa2-526b-11e6-beb8-9e71128cae77",
841             "name": "JULIO ERICKSON",
842             "isPermitted": false
843           },
844           {
845             "id": "DHV1707-TestSubscriber-2",
846             "name": "DALE BRIDGES",
847             "isPermitted": false
848           },
849           {
850             "id": "DHV1707-TestSubscriber-1",
851             "name": "LLOYD BRIDGES",
852             "isPermitted": false
853           },
854           {
855             "id": "jimmy-example",
856             "name": "JimmyExampleCust-20161102",
857             "isPermitted": false
858           },
859           {
860             "id": "jimmy-example2",
861             "name": "JimmyExampleCust-20161103",
862             "isPermitted": false
863           },
864           {
865             "id": "ERICA5779-TestSub-PWT-102",
866             "name": "ERICA5779-TestSub-PWT-102",
867             "isPermitted": false
868           },
869           {
870             "id": "ERICA5779-TestSub-PWT-101",
871             "name": "ERICA5779-TestSub-PWT-101",
872             "isPermitted": false
873           },
874           {
875             "id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
876             "name": "Emanuel",
877             "isPermitted": false
878           },
879           {
880             "id": "ERICA5779-Subscriber-4",
881             "name": "ERICA5779-Subscriber-5",
882             "isPermitted": false
883           },
884           {
885             "id": "ERICA5779-TestSub-PWT-103",
886             "name": "ERICA5779-TestSub-PWT-103",
887             "isPermitted": false
888           },
889           {
890             "id": "ERICA5779-Subscriber-2",
891             "name": "ERICA5779-Subscriber-2",
892             "isPermitted": false
893           },
894           {
895             "id": "e433710f-9217-458d-a79d-1c7aff376d89",
896             "name": "SILVIA ROBBINS",
897             "isPermitted": true
898           },
899           {
900             "id": "ERICA5779-Subscriber-3",
901             "name": "ERICA5779-Subscriber-3",
902             "isPermitted": false
903           },
904           {
905             "id": "31739f3e-526b-11e6-beb8-9e71128cae77",
906             "name": "CRAIG/ROBERTS",
907             "isPermitted": false
908           }
909         ]
910       }
911     }
912   }
913 }
914
915 class MockFeatureFlagsService {}
916
917 describe('VFModule Control Generator', () => {
918   let injector;
919   let service: VfModuleControlGenerator;
920   let httpMock: HttpTestingController;
921
922   beforeAll(done => (async () => {
923     TestBed.configureTestingModule({
924       imports: [HttpClientTestingModule],
925       providers: [VfModuleControlGenerator,
926         GenericFormService,
927         BasicControlGenerator,
928         AaiService,
929         FormBuilder,
930         LogService,
931         {provide:FeatureFlagsService, useClass: MockFeatureFlagsService},
932         {provide: NgRedux, useClass: MockAppStore}]
933     });
934     await TestBed.compileComponents();
935
936     injector = getTestBed();
937     service = injector.get(VfModuleControlGenerator);
938     httpMock = injector.get(HttpTestingController);
939     jest.spyOn(console, 'error');
940
941   })().then(done).catch(done.fail));
942
943   test(' getMacroFormControls gets vnfStoreKey === null', () => {
944     const serviceId: string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
945     const vnfStoreKey: string = null;
946     const vfModuleStoreKey: string = 'vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0';
947     const vfModuleUUID: string = "522159d5-d6e0-4c2a-aa44-5a542a12a830";
948     const controls: FormControlModel[] = service.getMacroFormControls(serviceId, vnfStoreKey, vfModuleStoreKey, vfModuleUUID, true);
949
950     expect(controls).toEqual([]);
951     expect(console.error).toHaveBeenCalled();
952   });
953
954   test('getAlaCarteFormControls check for mandatory controls', () => {
955     const serviceId: string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
956     const vnfStoreKey: string = 'VF_vGeraldine 0';
957     const vfModuleStoreKey: string = 'vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0';
958     const uuidData: Object = {
959       modelId : "522159d5-d6e0-4c2a-aa44-5a542a12a830",
960       modelName :  "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0",
961       serviceId : "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
962       type : "VFmodule",
963       vFModuleStoreKey : "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0vmvzo",
964       vnfStoreKey : "VF_vGeraldine 0"
965     };
966     const controls: FormControlModel[] = service.getAlaCarteFormControls(serviceId, vnfStoreKey, vfModuleStoreKey, uuidData, true);
967
968     const mandatoryControls : string[] = [
969       FormControlNames.INSTANCE_NAME,
970       FormControlNames.LCPCLOUD_REGION_ID,
971       FormControlNames.TENANT_ID,
972       FormControlNames.ROLLBACK_ON_FAILURE,
973     ];
974
975     for(let i = 0 ; i < mandatoryControls.length ; i++) {
976       let requiredExist = controls.find(ctrl => ctrl.controlName === mandatoryControls[i]).validations.find(item => item.validatorName === 'required');
977       expect(requiredExist).toBeDefined();
978     }
979   });
980
981
982   const cases = [
983     [true, true, true, null, true, true],
984     [true, true, false, null, true, false], //Scenario to check that UI field doesn't appear.
985     [false, true, false, "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0_vol", true, true],
986     [false, true, true, "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0_vol", true, true],
987     [false, false, true, null, false, false],
988   ];
989
990   test.each(cases)('Given Ecomp Gen Name: %p and VG Name %p , ' +
991     'is A La Carte %p - expect the name value for VG to be %p , ' +
992     'VG Name should be defined: %p , and should the field be visible: %p',
993     (ecomGenName, vGName, isALaCarte, expectedName, shouldWeVerifyDefinitionOfField, isVisible) => {
994     const moduleName = "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0";
995     service.vfModuleModel = new VfModule();
996     service.vfModuleModel.name = moduleName;
997     service.vfModuleModel.volumeGroupAllowed = vGName;
998     let vnf : Object =  {isEcompGeneratedNaming: ecomGenName};
999     const serviceId: string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
1000     const vnfStoreKey: string = 'VF_vGeraldine 0';
1001     const uuidData: Object = {
1002       modelName :  moduleName,
1003       vFModuleStoreKey : "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0vmvzo",
1004     };
1005     const vfModuleModel :VfModuleInstance = service.getVfModuleInstance(serviceId, vnfStoreKey, uuidData,true);
1006     let existingMatchingFieldInForm = buildVfModuleFormControlModel(vfModuleModel ,serviceId, vnf, isALaCarte);
1007       if (shouldWeVerifyDefinitionOfField) {
1008         expect(existingMatchingFieldInForm).toBeDefined();
1009         expect(existingMatchingFieldInForm.value).toEqual(expectedName);
1010         expect(existingMatchingFieldInForm.isVisible).toEqual(isVisible);
1011       } else {
1012         expect(existingMatchingFieldInForm).toBeUndefined();
1013       }
1014     });
1015
1016   let buildVfModuleFormControlModel = function(vfModuleModel :any, serviceId: string, vnf, isALaCarte) :FormControlModel {
1017     let controls: FormControlModel[] = service.pushInstanceAndVGToForm([], vfModuleModel, serviceId, vnf, isALaCarte);
1018     return controls.find(ctrl => ctrl.controlName === FormControlNames.VOLUME_GROUP_NAME);
1019   };
1020
1021   test('getMacroFormControls check for mandatory controls', () => {
1022     const serviceId: string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
1023     const vnfStoreKey: string = 'VF_vGeraldine 0';
1024     const uuidData: Object = {
1025       modelId : "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
1026       modelName :  "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0",
1027       serviceId : "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
1028       type : "VFmodule",
1029       vFModuleStoreKey : "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0vmvzo",
1030       vnfStoreKey : "VF_vGeraldine 0"
1031     };
1032     const controls: FormControlModel[] = service.getMacroFormControls(serviceId, vnfStoreKey, vnfStoreKey, uuidData, true);
1033
1034     const mandatoryControls : string[] = [
1035       'instanceName'
1036     ];
1037
1038     for(let i = 0 ; i < mandatoryControls.length ; i++) {
1039       let requiredExist = controls.find(ctrl => ctrl.controlName === mandatoryControls[i]).validations.find(item => item.validatorName === 'required');
1040       expect(requiredExist).toBeDefined();
1041     }
1042   });
1043
1044   test(' getMacroFormControls gets null vnfStoreKey', () => {
1045     const serviceId: string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
1046     const vnfStoreKey: string = null;
1047     const vfModuleUUID: string = "522159d5-d6e0-4c2a-aa44-5a542a12a830";
1048     const uuidData: Object = {};
1049     const controls: FormControlModel[] = service.getMacroFormControls(serviceId, vnfStoreKey, vfModuleUUID, uuidData,true);
1050
1051     expect(controls).toEqual([]);
1052     expect(console.error).toHaveBeenCalled();
1053   });
1054
1055   test('getAlaCarteFormControls should return the correct order of controls', () => {
1056     const controls:FormControlModel[] = getAlaCarteFormControls();
1057
1058     const orderedControls : string[] = [
1059       FormControlNames.INSTANCE_NAME,
1060       FormControlNames.VOLUME_GROUP_NAME,
1061       FormControlNames.LCPCLOUD_REGION_ID,
1062       FormControlNames.LEGACY_REGION,
1063       FormControlNames.TENANT_ID,
1064       FormControlNames.ROLLBACK_ON_FAILURE,
1065       FormControlNames.SDN_C_PRE_LOAD
1066     ];
1067
1068     expect(controls.length).toEqual(7);
1069     for(let i = 0 ; i < orderedControls.length ; i++) {
1070      expect(controls[i].controlName).toEqual(orderedControls[i]);
1071     }
1072   });
1073
1074   function getAlaCarteFormControls():FormControlModel[] {
1075     const serviceId: string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
1076     const vnfStoreKey: string = 'VF_vGeraldine 0';
1077     const vfModuleUUID: string = "522159d5-d6e0-4c2a-aa44-5a542a12a830";
1078     const uuidData: Object = {
1079       modelId: "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
1080       modelName: "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0",
1081       serviceId: "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
1082       type: "VFmodule",
1083       vFModuleStoreKey: "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0vmvzo",
1084       vnfStoreKey: "VF_vGeraldine 0"
1085     };
1086     const controls: FormControlModel[] = service.getAlaCarteFormControls(serviceId, vnfStoreKey, vfModuleUUID, uuidData, true);
1087     return controls;
1088   }
1089
1090   test('getAlaCarteFormControls responce with wrong order of controls', () => {
1091     const controls:FormControlModel[] = getAlaCarteFormControls();
1092
1093     const orderedControls : string[] = [
1094       FormControlNames.INSTANCE_NAME,
1095       FormControlNames.VOLUME_GROUP_NAME,
1096       FormControlNames.LCPCLOUD_REGION_ID,
1097       FormControlNames.TENANT_ID, // TENANT_ID must be after LEGACY_REGION
1098       FormControlNames.LEGACY_REGION,
1099       FormControlNames.ROLLBACK_ON_FAILURE,
1100       FormControlNames.SDN_C_PRE_LOAD
1101     ];
1102
1103     for(let i = 0 ; i < orderedControls.length ; i++) {
1104       if (controls[i].controlName === 'legacyRegion') {
1105         expect(orderedControls[i]).toEqual('tenantId');
1106       }
1107     }
1108   });
1109
1110   test('getMacroFormControls should return the correct order of controls', () => {
1111     const serviceId: string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
1112     const vnfStoreKey: string = 'VF_vGeraldine 0';
1113     const vfModuleUUID: string = "522159d5-d6e0-4c2a-aa44-5a542a12a830";
1114     const uuidData: Object = {
1115       modelId : "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
1116       modelName :  "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0",
1117       serviceId : "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
1118       type : "VFmodule",
1119       vFModuleStoreKey : "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0vmvzo",
1120       vnfStoreKey : "VF_vGeraldine 0"
1121     };
1122     const controls: FormControlModel[] = service.getMacroFormControls(serviceId, vnfStoreKey, vfModuleUUID, uuidData, true);
1123
1124     const orderedControls : string[] = [
1125       FormControlNames.INSTANCE_NAME,
1126       FormControlNames.VOLUME_GROUP_NAME
1127     ];
1128
1129     for(let i = 0 ; i < orderedControls.length ; i++) {
1130       expect(controls[i].controlName).toEqual(orderedControls[i]);
1131     }
1132   });
1133
1134   test.each`
1135     controllerName
1136     ${'instanceName'}
1137     ${'volumeGroupName'}
1138   `('getAlacartFormControls $controllerName control validator shall have the expected regex', ({controllerName}) => {
1139     const controls:FormControlModel[] = getAlaCarteFormControls();
1140
1141     const instanceNameControl: FormControlModel = <FormControlModel>controls.find(item => item.controlName == controllerName);
1142     const instanceNameValidator: ValidatorModel = instanceNameControl.validations.find(val => val.validatorName === ValidatorOptions.pattern);
1143     expect(instanceNameValidator.validatorArg).toEqual(/^[a-zA-Z0-9._-]*$/);
1144   });
1145
1146   test(' getAlaCarteFormControls gets null service', () => {
1147     const controls:FormControlModel[] = getAlaCarteFormControls();
1148     expect(controls.length).toEqual(7);
1149
1150     const orderedControls : string[] = [
1151       FormControlNames.INSTANCE_NAME,
1152       FormControlNames.VOLUME_GROUP_NAME,
1153       FormControlNames.LCPCLOUD_REGION_ID,
1154       FormControlNames.LEGACY_REGION,
1155       FormControlNames.TENANT_ID,
1156       FormControlNames.ROLLBACK_ON_FAILURE,
1157       FormControlNames.SDN_C_PRE_LOAD
1158     ];
1159
1160     for(let i = 0 ; i < orderedControls.length ; i++) {
1161       expect(controls[i].controlName).toEqual(orderedControls[i]);
1162     }
1163   });
1164 });
1165