blob: 6700ff4254b7b64069ad68208ff75c6b9d29662f [file] [log] [blame]
Ittay Sternf7926712019-07-07 19:23:03 +03001import {JsonBuilder} from "../../support/jsonBuilders/jsonBuilder";
2import {ServiceModel} from "../../support/jsonBuilders/models/service.model";
3
4describe('Drawing board : VRF', function () {
5
6 var jsonBuilderAndMock: JsonBuilder<ServiceModel> = new JsonBuilder<ServiceModel>();
7
8 beforeEach(() => {
Ittay Stern32dbf802019-10-29 12:58:49 +02009 cy.clearSessionStorage();
Ittay Sternf7926712019-07-07 19:23:03 +030010 cy.setReduxState();
11 cy.preventErrorsOnLoading();
12 cy.initAAIMock();
13 cy.initActiveNetworks();
14 cy.initActiveVPNs();
15 cy.initVidMock();
16 cy.login();
17
18 cy.server().route({
19 url: Cypress.config('baseUrl') + '/asyncInstantiation/bulk',
20 method: 'POST',
21 status: 200,
22 response: "[]",
23 }).as("expectedPostAsyncInstantiation");
Ittay Sternf7926712019-07-07 19:23:03 +030024 });
25
26 afterEach(() => {
27 cy.screenshot();
28 });
29
30
31 describe('vrf drawing board', () => {
32 it('should show vrf model and vrf instance correctly', () => {
33 const serviceModelId: string = "f028b2e2-7080-4b13-91b2-94944d4c42d8";
34 const vrfEntryName: string = "VRF Entry Configuration 0";
35 initDrawingBoardWithColectionResource(serviceModelId);
36 cy.get('.vf-type').contains('VRF');
37 cy.getElementByDataTestsId('available-models-tree').getElementByDataTestsId('node-name').contains(vrfEntryName);
38
39 /*
40 Right tree
41 */
42
43 const rightShouldHaves: { [dataTestId: string]: { [dataTestId: string]: string; }; } = {
44 'node-9cac02be-2489-4374-888d-2863b4511a59-VRF Entry Configuration 0:0': {
45 'node-type-indicator': 'VRF',
46 'node-name': '<Automatically Assigned>'
47 },
48 'node-undefined-undefined:0': {
49 'node-type-indicator': 'N',
50 'node-name': 'NETWORK1_INSTANCE_NAME',
51 'status-property-orchStatus': 'Assigned',
52 'status-property-provStatus': 'prov'
53 },
54 'node-undefined-undefined:1': {
55 'node-type-indicator': 'VPN',
56 'node-name': 'VPN1_INSTANCE_NAME',
57 'status-property-orchStatus': 'Assigned',
58 'status-property-provStatus': 'prov'
59 }
60 };
61
62 for (let node in rightShouldHaves) {
63 var [nodeName, nodeEq] = node.split(":");
64 for (let span in rightShouldHaves[node]) {
65 cy.getElementByDataTestsId(nodeName).eq(+nodeEq).find(`[data-tests-id='${span}']`).should('have.text', rightShouldHaves[node][span]);
66
67 }
68 }
69 });
70
71
72 it('vrf on click add should show generic modal ', () => {
73 const serviceModelId: string = "f028b2e2-7080-4b13-91b2-94944d4c42d8";
74 initDrawingBoardWithColectionResource(serviceModelId);
75 cy.getElementByDataTestsId('searchByNetworkRole').click({force: true}).then(() => {
76 cy.get('.allCheckboxAreSelected input').should('have.attr', 'disabled');
77 cy.get('.sdcCheckboxMember input').eq(0).should('not.have.attr', 'disabled');
78
79 cy.get('.sdcCheckboxMember input').eq(0).click({force: true});
80 cy.get('table thead .allCheckboxAreSelected input').should('have.attr', 'disabled');
81 cy.get('.sdcCheckboxMember input').eq(1).should('not.have.attr', 'disabled');
82 cy.getElementByDataTestsId("vnf-members-search").find('input').type("2.0");
83 });
84 });
85
86 it('check VRF popup', () => {
87 const serviceModelId: string = "f028b2e2-7080-4b13-91b2-94944d4c42d8";
88 initDrawingBoardWithColectionResource(serviceModelId);
89 cy.getElementByDataTestsId('searchByNetworkRole').click({force: true}).then(() => {
90 checkNetworkTableHeaders();
91 checkNetworkPopupTitles();
92 cy.validateSelectOptions('roles-criteria', roleOptions);
93 // set Network should be disabled
94 cy.isElementContainsAttr("setMembersBtn", "disabled");
95 cy.get('.sdcCheckboxMember input').eq(0).click({force: true}).then(() => {
96 cy.isElementNotContainsAttr("setMembersBtn", "disabled");
97 cy.getElementByDataTestsId('setMembersBtn').click({force: true}).then(() => {
98 checkVPNTableHeaders();
99 checkVPNPopupTitles();
100 cy.isElementContainsAttr("setMembersBtn", "disabled");
101 cy.get('.sdcCheckboxMember[data-tests-id=\'120d39fb-3627-473d-913c-d228dd0f8e5b\'] input').eq(0).click({force: true}).then(() => {
102 cy.isElementNotContainsAttr("setMembersBtn", "disabled");
103 cy.getElementByDataTestsId('setMembersBtn').click({force: true}).then(() => {
104 cy.isElementNotContainsAttr("deployBtn", "disabled");
105 cy.getElementByDataTestsId('deployBtn').click({force: true}).then(() => {
106 cy.wait('@expectedPostAsyncInstantiation').then(xhr => {
107 cy.readFile('../vid-automation/src/test/resources/vrf/vrfServiceCreateRequest.json').then((expectedResult) => {
108 cy.deepCompare(xhr.request.body, expectedResult);
109 });
110 });
111 });
112 });
113 });
114 });
115 })
116 });
117 });
118
119 it('create new VRF and change associations', () => {
120
121 const oldVPNDataTestId: string = '120d39fb-3627-473d-913c-d228dd0f8e5b';
122 const oldNETWORKDataTestId: string = '10a74149-c9d7-4918-bbcf-d5fb9b1799ce';
123 const newVPNDataTestId: string = '46fcb25a-e7ba-4d96-99ba-3bb6eae6aba7';
124 const newNETWORKDataTestId: string = '3b3308d4-0cd3-43e4-9a7b-d1925c861135';
125
126 const serviceModelId: string = "f028b2e2-7080-4b13-91b2-94944d4c42d8";
127
128 const redux = reduxWithVrf(serviceModelId);
129 redux.service.serviceInstance[serviceModelId].vrfs = <any>{};
130 cy.setReduxState(<any>redux);
131 cy.openIframe(`app/ui/#/servicePlanning?serviceModelId=${serviceModelId}`);
132
133 cy.getElementByDataTestsId('searchByNetworkRole').click({force: true}).then(() => {
134 cy.isElementContainsAttr("setMembersBtn", "disabled");
135 cy.get('.sdcCheckboxMember[data-tests-id="' + newNETWORKDataTestId + '"] input').eq(0).click({force: true}).then(() => {
136 cy.isElementNotContainsAttr("setMembersBtn", "disabled");
137 cy.getElementByDataTestsId('setMembersBtn').click({force: true}).then(() => {
138 cy.isElementContainsAttr("setMembersBtn", "disabled");
139 cy.get('.sdcCheckboxMember[data-tests-id="' + newVPNDataTestId + '"] input').eq(0).click({force: true}).then(() => {
140 cy.isElementNotContainsAttr("setMembersBtn", "disabled");
141 cy.getElementByDataTestsId('setMembersBtn').click({force: true}).then(() => {
142 cy.get('#VRF').should('have.length', 1);
143 cy.get('#VRF .icon-browse').click({force: true}).then(() => {
144 cy.getElementByDataTestsId('context-menu-changeAssociations').click(); // click on change associations
145 cy.getElementByDataTestsId(oldNETWORKDataTestId).get('input').should('be.checked'); // check if selected network is checked.
146 cy.getElementByDataTestsId('setMembersBtn').click({force: true}).then(() => { // click 'NEXT' (set network)
147 cy.getElementByDataTestsId(oldVPNDataTestId).get('input').should('be.checked'); // check if selected VPN is checked
148
149 cy.get(".sdcCheckboxMember[data-tests-id='" + newVPNDataTestId + "'] input").check({force: true}).then(() => { // select other VPN
150 cy.getElementByDataTestsId('cancelBtn').click().then(() => {
151 cy.get(".sdcCheckboxMember[data-tests-id='" + newNETWORKDataTestId + "'] input").check({force: true}).then(() => { // select other VPN
152 cy.getElementByDataTestsId('setMembersBtn').click();
153 cy.get(".sdcCheckboxMember[data-tests-id='" + newVPNDataTestId + "'] input")
154 cy.getElementByDataTestsId('setMembersBtn').click();
155
156 checkSelectedRows(newNETWORKDataTestId, newVPNDataTestId);
157 })
158 });
159 })
160 });
161 });
162 })
163 });
164 });
165 })
166 });
167 });
168
169 it('delete vrf', () => {
170 cy.permissionVidMock();
171 const SUBSCRIBER_ID: string = "e433710f-9217-458d-a79d-1c7aff376d89";
172 const SERVICE_TYPE: string = "TYLER SILVIA";
173 const SERVICE_MODEL_ID: string = '4117a0b6-e234-467d-b5b9-fe2f68c8b0fc';
174 const SERVICE_INSTANCE_ID: string = "f8791436-8d55-4fde-b4d5-72dd2cf13cfb";
175
176 configExpectedPostAsyncInstantiationDelete();
177 configServiceTopologyWithVRF(SUBSCRIBER_ID, SERVICE_TYPE, SERVICE_INSTANCE_ID);
178 configServiceTreeWithMultipleChildren_serviceModel(SERVICE_MODEL_ID);
179
180 cy.readFile('../vid-automation/src/test/resources/VnfGroup/deleteServiceWith2VnfGroupsRequest_AndThreeGroupMembers.json').then((expectedResult) => {
181 cy.openIframe(`app/ui/#/servicePlanning/EDIT?serviceModelId=${SERVICE_MODEL_ID}&subscriberId=${SUBSCRIBER_ID}&serviceType=${SERVICE_TYPE}&serviceInstanceId=${SERVICE_INSTANCE_ID}`);
182 cy.serviceActionDelete();
183 cy.getElementByDataTestsId('delete-status-type-header').should('exist');
184 cy.serviceActionUndoDelete();
185 cy.getElementByDataTestsId('delete-status-type-header').should('not.exist');
186 cy.serviceActionDelete();
187 cy.isNodeDeleted(0);
188 cy.isNodeNotDeleted(1);
189 cy.isNodeNotDeleted(2);
190 cy.isElementNotContainsAttr("deployBtn", "disabled");
191 cy.getDrawingBoardDeployBtn().click();
192 /*cy.wait('@expectedPostAsyncInstantiationDelete').then(xhr => {
193 cy.readFile('../vid-automation/src/test/resources/asyncInstantiation/vidRequestDeleteMacroService.json').then((expectedResult) => {
194 cy.deepCompare(xhr.request.body, expectedResult);
195 });
196 });*/
197 });
198 });
199
200 it('vpn component info', () => {
201 cy.permissionVidMock();
202 const SUBSCRIBER_ID: string = "e433710f-9217-458d-a79d-1c7aff376d89";
203 const SERVICE_TYPE: string = "TYLER SILVIA";
204 const SERVICE_MODEL_ID: string = '4117a0b6-e234-467d-b5b9-fe2f68c8b0fc';
205 const SERVICE_INSTANCE_ID: string = "f8791436-8d55-4fde-b4d5-72dd2cf13cfb";
206
207 configServiceTopologyWithVRF(SUBSCRIBER_ID, SERVICE_TYPE, SERVICE_INSTANCE_ID);
208 configServiceTreeWithMultipleChildren_serviceModel(SERVICE_MODEL_ID);
209
210 cy.openIframe(`app/ui/#/servicePlanning/EDIT?serviceModelId=${SERVICE_MODEL_ID}&subscriberId=${SUBSCRIBER_ID}&serviceType=${SERVICE_TYPE}&serviceInstanceId=${SERVICE_INSTANCE_ID}`);
211 cy.getElementByDataTestsId("node-undefined-undefined").eq(1).click();
212 cy.getElementByDataTestsId("model-item-value-Route target id").should("have.text","mock-global-1");
213 cy.getElementByDataTestsId("model-item-value-Route target role").should("have.text","mock-role-x");
214 cy.getElementByDataTestsId("model-item-value-Customet VPN ID").should("have.text","VPN1260");
215 cy.getElementByDataTestsId("model-item-value-Region").should("have.text","USA,EMEA");
216 });
217
218 });
219
220 it('network component info', () => {
221 cy.permissionVidMock();
222 const SUBSCRIBER_ID: string = "e433710f-9217-458d-a79d-1c7aff376d89";
223 const SERVICE_TYPE: string = "TYLER SILVIA";
224 const SERVICE_MODEL_ID: string = '4117a0b6-e234-467d-b5b9-fe2f68c8b0fc';
225 const SERVICE_INSTANCE_ID: string = "f8791436-8d55-4fde-b4d5-72dd2cf13cfb";
226
227 configServiceTopologyWithVRF(SUBSCRIBER_ID, SERVICE_TYPE, SERVICE_INSTANCE_ID);
228 configServiceTreeWithMultipleChildren_serviceModel(SERVICE_MODEL_ID);
229
230 cy.openIframe(`app/ui/#/servicePlanning/EDIT?serviceModelId=${SERVICE_MODEL_ID}&subscriberId=${SUBSCRIBER_ID}&serviceType=${SERVICE_TYPE}&serviceInstanceId=${SERVICE_INSTANCE_ID}`);
231 cy.getElementByDataTestsId("node-undefined-undefined").eq(0).click();
232 cy.getElementByDataTestsId("model-item-value-Route target id").should("have.text","mock-global-1");
233 cy.getElementByDataTestsId("model-item-value-Route target role").should("have.text","mock-role-x");
234 });
235
236 function configServiceTopologyWithVRF(SUBSCRIBER_ID: string, SERVICE_TYPE: string, SERVICE_INSTANCE_ID: string) {
237 cy.readFile('../vid-automation/src/test/resources/aaiGetInstanceTopology/serviceWithVrfTopology.json').then((res) => {
238 jsonBuilderAndMock.basicJson(
239 res,
240 Cypress.config('baseUrl') + `/aai_get_service_instance_topology/${SUBSCRIBER_ID}/${SERVICE_TYPE}/${SERVICE_INSTANCE_ID}`,
241 200, 0,
242 "serviceWithVRF",
243 )
244 });
245 }
246
247 function configExpectedPostAsyncInstantiationDelete()
248 {
249 cy.server().route({
250 url: Cypress.config('baseUrl') + '/asyncInstantiation/bulk',
251 method: 'POST',
252 status: 200,
253 response: "[]",
254 }).as("expectedPostAsyncInstantiationDelete");
255 }
256
257 function configServiceTreeWithMultipleChildren_serviceModel(SERVICE_MODEL_ID: string) {
258 cy.readFile('../vid-automation/src/test/resources/vrf/vrfServiceRoleResponse.json').then((res) => {
259 jsonBuilderAndMock.basicJson(
260 res,
261 Cypress.config('baseUrl') + `/rest/models/services/${SERVICE_MODEL_ID}`,
262 200,
263 0,
264 "ServiceTreeWithMultipleChildren_serviceModel",
265 )
266 });
267 }
268
269 let roleOptions: string[] = [
270 '-- select an option --',
271 'Not assigned',
272 'oam_calea_net_0',
273 'oam_calea_net_1',
274 'oam_calea_net_2',
275 'oam_calea_net_3',
276 ];
277
278 function checkSelectedRows(networkFataTestId: string, vpnDataTestId: string) {
279 cy.get('#VRF .icon-browse').click({force: true}).then(() => {
280 cy.getElementByDataTestsId('context-menu-changeAssociations').click(); // click on change associations
281 cy.getElementByDataTestsId(networkFataTestId).get('input').should('be.checked'); // check if selected network is checked.
282 cy.getElementByDataTestsId('setMembersBtn').click({force: true}).then(() => { // click 'NEXT' (set network)
283 cy.getElementByDataTestsId(vpnDataTestId).get('input').should('be.checked'); // check if selected VPN is checked
284 cy.getElementByDataTestsId('setMembersBtn').click();
285 cy.getElementByDataTestsId('setMembersBtn').click();
286 });
287 });
288 }
289
290 function reduxWithVrf(serviceModelId: string) {
291 return {
292 "service": {
293 "subscribers": [
294 {
295 "id": "e433710f-9217-458d-a79d-1c7aff376d89",
296 "name": "SILVIA ROBBINS",
297 "isPermitted": true
298 },
299 ],
300 "serviceHierarchy": {
301 [serviceModelId]: {
302 "service": {
303 "uuid": serviceModelId,
304 "invariantUuid": "dfc2c44c-2429-44ca-ae26-1e6dc1f207fb",
305 "name": "infraVPN",
306 "version": "1.0",
307 "toscaModelURL": null,
308 "category": "Network Service",
309 "serviceType": "BONDING",
310 "serviceRole": "INFRASTRUCTURE-VPN",
311 "description": "ddd",
312 "serviceEcompNaming": "true",
313 "instantiationType": "A-La-Carte",
314 "inputs": {},
315 "vidNotions": {
316 "instantiationUI": "macroService",
317 "modelCategory": "other",
318 "viewEditUI": "legacy",
319 "instantiationType": "Macro"
320 }
321 },
322 "vnfs": {},
323 "networks": {},
324 "collectionResources": {},
325 "configurations": {},
326 "fabricConfigurations": {},
327 "serviceProxies": {
328 "misvpn_service_proxy 0": {
329 "uuid": "35186eb0-e6b6-4fa5-86bb-1501b342a7b1",
330 "invariantUuid": "73f89e21-b96c-473f-8884-8b93bcbd2f76",
331 "description": "A Proxy for Service MISVPN_SERVICE",
332 "name": "MISVPN_SERVICE Service Proxy",
333 "version": "3.0",
334 "customizationUuid": "4c2fb7e0-a0a5-4b32-b6ed-6a974e55d923",
335 "inputs": {},
336 "commands": {},
337 "properties": {
338 "ecomp_generated_naming": "false"
339 },
340 "type": "Service Proxy",
341 "sourceModelUuid": "d5cc7d15-c842-450e-95ae-2a69e66dd23b",
342 "sourceModelInvariant": "c126ec86-59fe-48c0-9532-e39a9b3e5272",
343 "sourceModelName": "MISVPN_SERVICE"
344 }
345 },
346 "vfModules": {},
347 "volumeGroups": {},
348 "pnfs": {},
349 "vnfGroups": {},
350 "vrfs": {
351 "VRF Entry Configuration 0": {
352 "uuid": "9cac02be-2489-4374-888d-2863b4511a59",
353 "invariantUuid": "b67a289b-1688-496d-86e8-1583c828be0a",
354 "description": "VRF Entry configuration object",
355 "name": "VRF Entry Configuration",
356 "version": "30.0",
357 "customizationUuid": "dd024d73-9bd1-425d-9db5-476338d53433",
358 "inputs": {},
359 "commands": {},
360 "properties": {
361 "ecomp_generated_naming": "false"
362 },
363 "type": "Configuration",
364 "modelCustomizationName": "VRF Entry Configuration 0",
365 "sourceNodes": [],
366 "collectorNodes": null,
367 "configurationByPolicy": false
368 }
369 }
370 }
371 },
372 "serviceInstance": {
373 [serviceModelId]: {
374 "action": "Create",
375 "isDirty": false,
376 "vrfs": {
377 "VRF Entry Configuration 0": {
378 "originalName": null,
379 "trackById": "VRF1_INSTANCE_ID",
380 "action": "None",
381 "instanceId": "VRF1_INSTANCE_ID",
382 "instanceType": "VRF1_INSTANCE_TYPE",
383 "orchStatus": null,
384 "provStatus": null,
385 "inMaint": false,
386 "modelInfo": {
387 "modelInvariantId": "vnf-instance-model-invariant-id",
388 "modelVersionId": "vnf-instance-model-version-id",
389 "modelCustomizationId": "vnf-instance-model-customization-id",
390 "modelType": "vrf"
391 },
392 "uuid": "vnf-instance-model-version-id",
393 "productFamilyId": null,
394 "lcpCloudRegionId": "olson3",
395 "cloudOwner": "att-nc",
396 "legacyRegion": null,
397 "tenantId": "229bcdc6eaeb4ca59d55221141d01f8e",
398 "lineOfBusiness": null,
399 "platformName": null,
400 "vfModules": {},
401 "networks": {
402 "NETWORK1_INSTANCE_ID": {
403 "originalName": null,
404 "trackById": "NETWORK1_INSTANCE_ID",
405 "instanceName": "NETWORK1_INSTANCE_NAME",
406 "action": "None",
407 "instanceId": "NETWORK1_INSTANCE_ID",
408 "instanceType": "CONTRAIL30_BASIC",
409 "orchStatus": "Assigned",
410 "provStatus": "prov",
411 "inMaint": false,
412 "modelInfo": {
413 "modelInvariantId": "network-instance-model-invariant-id",
414 "modelVersionId": "network-instance-model-version-id",
415 "modelCustomizationId": "network-instance-model-customization-id",
416 "modelName": "modelName",
417 "modelType": "network"
418 },
419 "uuid": "network-instance-model-version-id",
420 "productFamilyId": null,
421 "lcpCloudRegionId": null,
422 "legacyRegion": null,
423 "tenantId": null,
424 "lineOfBusiness": null,
425 "platformName": null
426 }
427 },
428 "vpns": {
429 "VPN1_INSTANCE_ID": {
430 "originalName": null,
431 "trackById": "VPN1_INSTANCE_ID",
432 "instanceName": "VPN1_INSTANCE_NAME",
433 "action": "None",
434 "instanceId": "VPN1_INSTANCE_ID",
435 "instanceType": "CONTRAIL30_BASIC",
436 "orchStatus": "Assigned",
437 "provStatus": "prov",
438 "inMaint": false,
439 "modelInfo": {
440 "modelInvariantId": "network-instance-model-invariant-id",
441 "modelVersionId": "network-instance-model-version-id",
442 "modelCustomizationId": "network-instance-model-customization-id",
443 "modelName": "modelName",
444 "modelType": "vpnBinding"
445 },
446 "uuid": "network-instance-model-version-id",
447 "productFamilyId": null,
448 "lcpCloudRegionId": null,
449 "legacyRegion": null,
450 "tenantId": null,
451 "lineOfBusiness": null,
452 "platformName": null
453 }
454 }
455 }
456 },
457 "vnfs": {},
458 "instanceParams": [
459 {}
460 ],
461 "validationCounter": 0,
462 "existingNames": {
463 "dfd": ""
464 },
465 "existingVNFCounterMap": {},
466 "existingVRFCounterMap": {},
467 "existingVnfGroupCounterMap": {},
468 "existingNetworksCounterMap": {},
469 "optionalGroupMembersMap": {},
470 "networks": {},
471 "vnfGroups": {},
472 "bulkSize": 1,
473 "instanceName": "dfd",
474 "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
475 "subscriptionServiceType": "TYLER SILVIA",
476 "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
477 "lcpCloudRegionId": "lcpCloudRegionId",
478 "tenantName": "tenantName",
479 "projectName": "WATKINS",
480 "rollbackOnFailure": "true",
481 "aicZoneName": null,
482 "owningEntityName": "WayneHolland",
483 "testApi": "VNF_API",
484 "modelInfo": {
485 "modelInvariantId": "dfc2c44c-2429-44ca-ae26-1e6dc1f207fb",
486 "modelVersionId": "f028b2e2-7080-4b13-91b2-94944d4c42d8",
487 "modelName": "infraVPN",
488 "modelVersion": "1.0",
489 "uuid": serviceModelId,
490 "modelUniqueId": "f028b2e2-7080-4b13-91b2-94944d4c42d8"
491 },
492 "isALaCarte": true,
493 "name": "infraVPN",
494 "version": "1.0",
495 "description": "ddd",
496 "category": "Network Service",
497 "uuid": serviceModelId,
498 "invariantUuid": "dfc2c44c-2429-44ca-ae26-1e6dc1f207fb",
499 "serviceType": "BONDING",
500 "serviceRole": "INFRASTRUCTURE-VPN",
501 "vidNotions": {
502 "instantiationUI": "macroService",
503 "modelCategory": "other",
504 "viewEditUI": "legacy",
505 "instantiationType": "Macro"
506 },
507 "isEcompGeneratedNaming": true,
508 "isMultiStepDesign": false
509 }
510 },
511 "categoryParameters": {
512 "owningEntityList": [
513 {
514 "id": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
515 "name": "WayneHolland"
516 }
517 ]
518 },
519 }
520 }
521 }
522
523 function initDrawingBoardWithColectionResource(serviceModelId: string) {
524 const redux = reduxWithVrf(serviceModelId);
525 cy.setReduxState(<any>redux);
526 cy.openIframe(`app/ui/#/servicePlanning?serviceModelId=${serviceModelId}`);
527 return redux;
528 }
529
530
531 function checkNetworkTableHeaders() {
532 cy.get('.header-title').contains('Name');
533 cy.get('.header-title').contains('Type');
534 cy.get('.header-title').contains('Role');
535 cy.get('.header-title').contains('Orch. Status');
536 cy.get('.header-title').contains('Physical name');
537 cy.get('.header-title').contains('Instance ID');
538 cy.get('.header-title').contains('Model UUID');
539 cy.get('.header-title').contains('Service name');
540 cy.get('.header-title').contains('Service UUID');
541 cy.get('.header-title').contains('Tenant');
542 cy.get('.header-title').contains('Region');
543
544 const headerTitles: string[] = [
545 'Network instance name',
546 'Instance version',
547 'Network model'
548 ];
549 }
550
551
552 function checkVPNTableHeaders() {
553 const headerTitles: string[] = [
554 'VPN instance name',
555 'Version',
556 'Instance ID',
557 'Platform',
558 'Region',
559 'Route target',
560 'Route target role',
561 'Customer VPN ID'
562 ];
563
564 headerTitles.forEach((title: string) => {
565 cy.get('.header-title').contains(title);
566 });
567 }
568
569
570 function checkNetworkPopupTitles() {
571 cy.get('.title').contains('Associate network');
572 cy.get('.title-header').contains('Select a network to associate to the VRF Entry');
573 cy.getElementByDataTestsId('setMembersBtn').contains('Next');
574 cy.getElementByDataTestsId('Orch_status').contains('Active');
575 cy.getElementByDataTestsId('Region').contains('lcpCloudRegionId');
576 cy.getElementByDataTestsId('Tenant').contains('tenantName');
577 }
578
579
580 function checkVPNPopupTitles() {
581 cy.get('.title').contains('Associate VPN');
582 cy.get('.title-header').contains('Select a VPN to associate to the VRF Entry');
583 cy.getElementByDataTestsId('setMembersBtn').contains('SET VPN');
584 }
585});