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