@digital-ai/devops-page-object-deploy 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -1,4 +1,5 @@
1
1
  var $1UEKj$playwrighttest = require("@playwright/test");
2
+ var $1UEKj$rambda = require("rambda");
2
3
 
3
4
  function $parcel$export(e, n, v, s) {
4
5
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
@@ -10,9 +11,9 @@ class $b031bda8df4df200$export$6e2c8f0811a474ce {
10
11
  this.sectionRoot = sectionRootLocator;
11
12
  }
12
13
  /**
13
- * Get child element in the section "this.sectionRoot" refers to
14
- * @param childElementLocator
15
- */ findElementInSection(childElementLocator) {
14
+ * Get child element in the section "this.sectionRoot" refers to
15
+ * @param childElementLocator
16
+ */ findElementInSection(childElementLocator) {
16
17
  return this.sectionRoot.locator(childElementLocator);
17
18
  }
18
19
  }
@@ -24,8 +25,8 @@ class $beb748f674227a72$export$cc4f63927c41742f extends (0, $b031bda8df4df200$ex
24
25
  super(page.getByTestId("primaryNav"));
25
26
  }
26
27
  /**
27
- * Click on side navigation links
28
- */ async clickSideLink(sideLinkLocator) {
28
+ * Click on side navigation links
29
+ */ async clickSideLink(sideLinkLocator) {
29
30
  await this.sectionRoot.locator(sideLinkLocator).click();
30
31
  }
31
32
  }
@@ -47,59 +48,59 @@ class $7c2e5bae754cf9e5$export$110709f040143804 extends (0, $beb748f674227a72$ex
47
48
  this.expandButtonLocator = page.locator("span[title='Expand']");
48
49
  }
49
50
  /**
50
- * Click on go back button on side naviation links
51
- */ async goBack() {
51
+ * Click on go back button on side naviation links
52
+ */ async goBack() {
52
53
  await this.backButtonLocator.waitFor();
53
54
  await this.backButtonLocator.click();
54
55
  }
55
56
  /**
56
- * Click on Explorer from left panel
57
- */ async clickExplorer() {
57
+ * Click on Explorer from left panel
58
+ */ async clickExplorer() {
58
59
  await this.clickSideLink(this.linkExploreLocator);
59
60
  }
60
61
  /**
61
- * Click on Compare from left panel
62
- */ async clickCompare() {
62
+ * Click on Compare from left panel
63
+ */ async clickCompare() {
63
64
  await this.clickSideLink(this.linkCompareLocator);
64
65
  }
65
66
  /**
66
- * Click on Reports from left panel
67
- */ async clickReports() {
67
+ * Click on Reports from left panel
68
+ */ async clickReports() {
68
69
  await this.clickSideLink(this.linkReportsLocator);
69
70
  }
70
71
  /**
71
- * Click on Rules and Macros from left panel
72
- */ async clickRulesAndMacros() {
72
+ * Click on Rules and Macros from left panel
73
+ */ async clickRulesAndMacros() {
73
74
  await this.clickSideLink(this.linkRulesAndMacrosLocator);
74
75
  }
75
76
  /**
76
- * Click on Gitops from left panel
77
- */ async clickGitOps() {
77
+ * Click on Gitops from left panel
78
+ */ async clickGitOps() {
78
79
  await this.clickSideLink(this.linkGitOps);
79
80
  }
80
81
  /**
81
- * Click on Local sources from left panel
82
- */ async clickLocalSources() {
82
+ * Click on Local sources from left panel
83
+ */ async clickLocalSources() {
83
84
  await this.clickSideLink(this.linkLocalSource);
84
85
  }
85
86
  /**
86
- * Click on Plugins from left panel
87
- */ async clickPlugins() {
87
+ * Click on Plugins from left panel
88
+ */ async clickPlugins() {
88
89
  await this.clickSideLink(this.linkPlugins);
89
90
  }
90
91
  /**
91
- * Click on User Managements from left panel
92
- */ async clickUserManagement() {
92
+ * Click on User Managements from left panel
93
+ */ async clickUserManagement() {
93
94
  await this.clickSideLink(this.linkUserManagement);
94
95
  }
95
96
  /**
96
- * Click on Collapse button from left panel
97
- */ async clickCollapse() {
97
+ * Click on Collapse button from left panel
98
+ */ async clickCollapse() {
98
99
  await this.clickSideLink(this.collapseButtonLocator);
99
100
  }
100
101
  /**
101
- * Click on Expand from left panel
102
- */ async clickExpand() {
102
+ * Click on Expand from left panel
103
+ */ async clickExpand() {
103
104
  await this.clickSideLink(this.expandButtonLocator);
104
105
  }
105
106
  }
@@ -125,38 +126,50 @@ class $9d59b5ce8284c3bf$export$7c6e2c02157bb7d2 extends (0, $b031bda8df4df200$ex
125
126
 
126
127
  class $7149ac56b8ddfcf1$export$d9b273488cd8ce6f extends (0, $b031bda8df4df200$export$6e2c8f0811a474ce) {
127
128
  /**
128
- *
129
- * @param menuContentRootLocator menu content root locator
130
- * @param menuLinkLocator Menu link locator thats used to open/close the menu
131
- * @param menuItemsParentLocator Menu items that opens up when menu link is clicked
132
- */ constructor(menuContentRootLocator, menuLinkLocator, menuItemsParentLocator){
129
+ *
130
+ * @param menuContentRootLocator menu content root locator
131
+ * @param menuLinkLocator Menu link locator thats used to open/close the menu
132
+ * @param menuItemsParentLocator Menu items that opens up when menu link is clicked
133
+ */ constructor(menuContentRootLocator, menuLinkLocator, menuItemsParentLocator){
133
134
  super(menuContentRootLocator);
134
135
  this.menuLinkLocator = menuLinkLocator;
135
136
  this.menuItemsParentLocator = menuContentRootLocator.locator(menuItemsParentLocator);
136
137
  }
137
138
  /**
138
- * Click on a menu item
139
- * @param menuItemLocator
140
- */ async clickMenuItem(menuItemLocator) {
139
+ * Click on a menu item
140
+ * @param menuItemLocator
141
+ */ async clickMenuItem(menuItemLocator) {
141
142
  if (!await this.menuItemsParentLocator.locator(menuItemLocator).isVisible()) await this.menuLinkLocator.click();
142
143
  return await this.menuItemsParentLocator.locator(menuItemLocator).click();
143
144
  }
144
145
  /**
145
- * Close a menu item
146
- */ async close() {
146
+ * Close a menu item
147
+ */ async close() {
147
148
  await this.menuLinkLocator.click();
148
149
  }
149
150
  /**
150
- * Note : Support only one level of menu items not being open iow if the link to click
151
- * @param mouseOverLocator
152
- * @param menuItemLocator
153
- */ async hoverFlyoutAndClickMenuItem(mouseOverLocator, menuItemLocator) {
151
+ * Note : Support only one level of menu items not being open iow if the link to click
152
+ * @param mouseOverLocator
153
+ * @param menuItemLocator
154
+ */ async hoverFlyoutAndClickMenuItem(mouseOverLocator, menuItemLocator) {
154
155
  if (!await this.menuItemsParentLocator.locator(menuItemLocator).isVisible()) {
155
156
  await mouseOverLocator.hover();
156
157
  await this.menuLinkLocator.click();
157
158
  }
158
159
  await menuItemLocator.click();
159
160
  }
161
+ /**
162
+ * Open contextual menu dots of ci to work with contextual-menu items.
163
+ */ async openContextualMenuDots() {
164
+ await this.menuLinkLocator.click();
165
+ }
166
+ /**
167
+ * Find exact menu locators using menu parent locators.
168
+ * @param childElementLocator
169
+ * @returns
170
+ */ async findElementInMenu(childElementLocator) {
171
+ return this.menuItemsParentLocator.locator(childElementLocator);
172
+ }
160
173
  }
161
174
 
162
175
 
@@ -170,28 +183,28 @@ class $8a1acfec011ab8c3$export$5929c05a25eed48f extends (0, $7149ac56b8ddfcf1$ex
170
183
  this.getDataForSupport = page.locator('a[title="Get data for support"]');
171
184
  }
172
185
  /**
173
- * Click on online Documentation menu option
174
- */ async clickOnlineDocumentation() {
186
+ * Click on online Documentation menu option
187
+ */ async clickOnlineDocumentation() {
175
188
  await this.clickMenuItem(this.onlineDoc);
176
189
  }
177
190
  /**
178
- * Click on menu option
179
- */ async clickSupportRequest() {
191
+ * Click on menu option
192
+ */ async clickSupportRequest() {
180
193
  await this.clickMenuItem(this.supportRequest);
181
194
  }
182
195
  /**
183
- * Click on Digital.ai website menu option
184
- */ async clickOfficialWebsite() {
196
+ * Click on Digital.ai website menu option
197
+ */ async clickOfficialWebsite() {
185
198
  await this.clickMenuItem(this.website);
186
199
  }
187
200
  /**
188
- * Click on usage matrix menu option
189
- */ async clickUsageMatrix() {
201
+ * Click on usage matrix menu option
202
+ */ async clickUsageMatrix() {
190
203
  await this.clickMenuItem(this.usageMatrix);
191
204
  }
192
205
  /**
193
- * Click on Get data for support menu option
194
- */ async clickGetDataForSupport() {
206
+ * Click on Get data for support menu option
207
+ */ async clickGetDataForSupport() {
195
208
  await this.clickMenuItem(this.getDataForSupport);
196
209
  }
197
210
  }
@@ -224,33 +237,33 @@ class $70698a74230ac35b$export$1d7840d5cdc861d5 extends (0, $7149ac56b8ddfcf1$ex
224
237
  this.systemInformation = page.getByTitle("System information");
225
238
  }
226
239
  /**
227
- * Click on settings menu option
228
- */ async clickSettings() {
240
+ * Click on settings menu option
241
+ */ async clickSettings() {
229
242
  await this.clickMenuItem(this.settings);
230
243
  }
231
244
  /**
232
- * Click on renew license menu option
233
- */ async clickRenewLicense() {
245
+ * Click on renew license menu option
246
+ */ async clickRenewLicense() {
234
247
  await this.clickMenuItem(this.renewLicense);
235
248
  }
236
249
  /**
237
- * Click on view as menu option
238
- */ async clickViewAs() {
250
+ * Click on view as menu option
251
+ */ async clickViewAs() {
239
252
  await this.clickMenuItem(this.viewAs);
240
253
  }
241
254
  /**
242
- * Click on maintenance mode menu option
243
- */ async clickMaintenanceMode() {
255
+ * Click on maintenance mode menu option
256
+ */ async clickMaintenanceMode() {
244
257
  await this.clickMenuItem(this.maintenanceMode);
245
258
  }
246
259
  /**
247
- * Click on About menu option
248
- */ async clickAbout() {
260
+ * Click on About menu option
261
+ */ async clickAbout() {
249
262
  await this.clickMenuItem(this.about);
250
263
  }
251
264
  /**
252
- * Click on System information menu option
253
- */ async clickSystemInfo() {
265
+ * Click on System information menu option
266
+ */ async clickSystemInfo() {
254
267
  await this.clickMenuItem(this.systemInformation);
255
268
  }
256
269
  }
@@ -317,17 +330,393 @@ class $7dcee016eeec0e08$export$f14c0e3f98d164c0 extends (0, $ae23b16684112d0b$ex
317
330
 
318
331
 
319
332
 
333
+ class $dcea22adf7bc9211$export$7db63d2c950874b5 {
334
+ constructor(page1, page){
335
+ this.applicationPage = page1;
336
+ this.page = page;
337
+ }
338
+ /**
339
+ * Create New directory under applications CI.
340
+ * @param appDirectoryName
341
+ * @param expectedCiType
342
+ */ async createNewApplicationDirectory(appDirectoryName, expectedCiType) {
343
+ await this.applicationPage.contextMenu.clickApplicationCi();
344
+ await this.applicationPage.contextMenu.clickMenuPath([
345
+ "new",
346
+ "directory"
347
+ ]);
348
+ await this.applicationPage.form.assertSaveButtonIsDisabled();
349
+ await this.applicationPage.form.assertSaveAndCloseButtonIsDisabled();
350
+ await this.applicationPage.form.enterName(appDirectoryName);
351
+ await this.applicationPage.tab.assertActiveTabSelector("Create " + expectedCiType);
352
+ await this.applicationPage.form.clickSaveAndClose();
353
+ }
354
+ /**
355
+ * Create new application under Application ci
356
+ * @param appName
357
+ * @param expectedCiType
358
+ */ async createNewApplication(appName, expectedCiType) {
359
+ await this.applicationPage.contextMenu.clickApplicationCi();
360
+ await this.applicationPage.contextMenu.clickMenuPath([
361
+ "new",
362
+ "application"
363
+ ]);
364
+ await this.applicationPage.form.assertSaveButtonIsDisabled();
365
+ await this.applicationPage.form.assertSaveAndCloseButtonIsDisabled();
366
+ await this.applicationPage.form.enterName(appName);
367
+ await this.applicationPage.form.clickSaveAndClose();
368
+ await this.applicationPage.tab.assertActiveTabSelector("Create " + expectedCiType);
369
+ }
370
+ /**
371
+ * TODO: It is half done just to check on menu path other than new. Need to create as per scenario.
372
+ */ async createFromFileImport() {
373
+ await this.applicationPage.contextMenu.clickApplicationCi();
374
+ await this.applicationPage.contextMenu.clickMenuPath([
375
+ "import",
376
+ "fromComputer"
377
+ ]);
378
+ }
379
+ }
380
+
381
+
382
+
320
383
 
321
- class $b375bc430f279b15$export$b477143f7ffae077 extends (0, $7149ac56b8ddfcf1$export$d9b273488cd8ce6f) {
384
+ class $0a8f56f4ec9e6ec3$export$3e41faf802a29e71 extends (0, $ae23b16684112d0b$export$2b65d1d97338f32b) {
322
385
  constructor(page){
323
- super(page.locator("#context-menu-popover"), page.locator('.infinite-tree-closed.context-menu-button.pull-right[data-id="Applications"]'), page.locator(".dropdown-menu.multi-level.dropdown-menu-0"));
324
- this.mouseOverLocator = page.locator('css=[data-path=".1"]');
325
- this.newlinkLocator = page.getByRole("link", {
326
- name: "New"
386
+ super(page);
387
+ this.page = page;
388
+ this.parentTabLocator = this.page.locator(".working-panel-section .xl-react-tab-system");
389
+ this.getTabTitleLocator = this.page.locator("li.active .tab-title");
390
+ this.closeIcon = this.page.locator(".xl-icon.close-ico");
391
+ }
392
+ async assertActiveTabSelector(expectedCiType) {
393
+ return await (0, $1UEKj$playwrighttest.expect)(this.parentTabLocator.locator("li.active .tab-title")).toHaveText(expectedCiType, {
394
+ ignoreCase: true
327
395
  });
328
396
  }
329
- async createNewApplicationDirectory() {
330
- await this.hoverFlyoutAndClickMenuItem(this.mouseOverLocator, this.newlinkLocator);
397
+ async closeActiveTabs() {
398
+ if (await this.closeIcon.isVisible()) await this.parentTabLocator.locator(".nav .active .close-icon").click();
399
+ }
400
+ }
401
+
402
+
403
+
404
+ class $9dd8dd888e812fd7$export$133beb65adbc45a3 extends (0, $7149ac56b8ddfcf1$export$d9b273488cd8ce6f) {
405
+ constructor(page){
406
+ super(page.locator("#context-menu-popover"), page.locator("i[data-id=Applications].context-menu-button"), page.locator(".dropdown-menu.multi-level.dropdown-menu-0"));
407
+ this.page = page;
408
+ this.applicationLocator = page.locator('div[data-id="Applications"]');
409
+ this.environmentLocator = page.locator('div[data-id="Environments"]');
410
+ }
411
+ /**
412
+ * Click on application CI in contextual-menu option.
413
+ */ async clickApplicationCi() {
414
+ await this.applicationLocator.click();
415
+ await this.openContextualMenuDots();
416
+ }
417
+ /**
418
+ * Click on application CI in contextual-menu option.
419
+ */ async clickEnvironmentCi() {
420
+ await this.environmentLocator.click();
421
+ await this.openContextualMenuDots();
422
+ }
423
+ /**
424
+ * Click on menu items from contextual-menu option using path navigation option
425
+ * @param path: Provide menu navigation path using array
426
+ * eg: ['new','Application'] -> to click on menu to create new application
427
+ */ async clickMenuPath(path) {
428
+ const count = path.length - 1;
429
+ for(let i = 0; i < count; i++)await this.page.getByRole("link", {
430
+ name: "" + path[i] + ""
431
+ }).click();
432
+ await this.page.locator('.popover-content li[data-path="' + path.join("->") + '"]').click();
433
+ }
434
+ }
435
+
436
+
437
+
438
+
439
+ class $50f6953b9762c03c$export$a7fed597f4b8afd8 extends (0, $b031bda8df4df200$export$6e2c8f0811a474ce) {
440
+ constructor(mainContentRootLocator){
441
+ super(mainContentRootLocator);
442
+ }
443
+ async fillTextInput(textInput, textValue) {
444
+ await textInput.clear();
445
+ await textInput.fill(textValue);
446
+ }
447
+ }
448
+
449
+
450
+ class $f0e8ecb73642aac7$export$13ee474454c1948e extends (0, $50f6953b9762c03c$export$a7fed597f4b8afd8) {
451
+ constructor(page){
452
+ super(page.locator(".dip-view-body"));
453
+ this.page = page;
454
+ this.inputName = page.locator('input[name="name"]');
455
+ this.inputLatestVersion = page.locator('input[name="lastVersion"]');
456
+ this.saveButton = page.getByRole("button", {
457
+ name: "Save",
458
+ exact: true
459
+ });
460
+ this.saveAndCloseButton = page.getByRole("button", {
461
+ name: "Save and close",
462
+ exact: true
463
+ });
464
+ this.cancelButton = page.getByRole("button", {
465
+ name: "Cancel",
466
+ exact: true
467
+ });
468
+ this.errorMessage = page.locator(".error");
469
+ this.formSection = page.locator(".xl-react-components.xl-react-dip-dynamic-form");
470
+ }
471
+ /**
472
+ * Enter name in name field of the application form
473
+ * @param name
474
+ * @returns
475
+ */ async enterName(name) {
476
+ return await this.findElementInSection(this.inputName).fill(name);
477
+ }
478
+ /**
479
+ * Enter latest version field
480
+ * @param version
481
+ * @returns
482
+ */ async enterLatestVersion(version) {
483
+ return await this.findElementInSection(this.inputLatestVersion).fill(version);
484
+ }
485
+ /**
486
+ * Click save button
487
+ * @returns
488
+ */ async clickSave() {
489
+ return await this.findElementInSection(this.saveButton).click();
490
+ }
491
+ /**
492
+ * Click save and close button
493
+ * @returns
494
+ */ async clickSaveAndClose() {
495
+ return await this.findElementInSection(this.saveAndCloseButton).click();
496
+ }
497
+ /**
498
+ * Click cancel button
499
+ * @returns
500
+ */ async clickCancel() {
501
+ return await this.findElementInSection(this.cancelButton).click();
502
+ }
503
+ /**
504
+ * Expecting save button is disabled
505
+ * @returns
506
+ */ async assertSaveButtonIsDisabled() {
507
+ return await (0, $1UEKj$playwrighttest.expect)(this.findElementInSection(this.saveButton)).toBeDisabled();
508
+ }
509
+ /**
510
+ * Expecting Save and close button is disabled
511
+ * @returns
512
+ */ async assertSaveAndCloseButtonIsDisabled() {
513
+ return await (0, $1UEKj$playwrighttest.expect)(this.findElementInSection(this.saveAndCloseButton)).toBeDisabled();
514
+ }
515
+ /**
516
+ * Verify Error message in the form
517
+ * @param errorMsg
518
+ * @returns
519
+ */ async verifyErrorMessage(errorMsg) {
520
+ return (0, $1UEKj$playwrighttest.expect)(await this.findElementInSection(this.errorMessage).textContent()).toContain(errorMsg);
521
+ }
522
+ /**
523
+ * Verify field value in form using field name
524
+ * @param fieldName
525
+ * @param expectedValue
526
+ * @returns
527
+ */ async verifyFieldValue(fieldName, expectedValue) {
528
+ const label = this.formSection.locator('//label[text()="' + fieldName + '"]/parent::div/parent::div');
529
+ const input = label.locator(".xl-react-components-input input");
530
+ const result = await input.getAttribute("value");
531
+ return (0, $1UEKj$playwrighttest.expect)(result).toEqual(expectedValue);
532
+ }
533
+ }
534
+
535
+
536
+
537
+ class $749097e2d65c1527$export$2b77a92f1a5ad772 extends (0, $b031bda8df4df200$export$6e2c8f0811a474ce) {
538
+ constructor(page){
539
+ super(page.locator(".xl-react-modal-content"));
540
+ this.header = page.locator(".modal-header");
541
+ this.body = page.locator(".modal-body");
542
+ this.footer = page.locator(".modal-footer");
543
+ }
544
+ }
545
+
546
+
547
+ class $1b7c532a5b0861f3$export$bd6452a745ffdb18 extends (0, $749097e2d65c1527$export$2b77a92f1a5ad772) {
548
+ constructor(page){
549
+ super(page);
550
+ this.deleteButton = page.getByRole("button", {
551
+ name: "Delete",
552
+ exact: true
553
+ });
554
+ this.cancelButton = page.getByRole("button", {
555
+ name: "Cancel",
556
+ exact: true
557
+ });
558
+ }
559
+ async clickDelete() {
560
+ await this.footer.locator(this.deleteButton).click();
561
+ }
562
+ async clickCancel() {
563
+ await this.footer.locator(this.cancelButton).click();
564
+ }
565
+ }
566
+
567
+
568
+
569
+
570
+
571
+
572
+
573
+ class $26b4a6e9a3909559$export$5a20f96f6e2d29e9 {
574
+ constructor(page){
575
+ this.page = page;
576
+ this.contextMenu = new (0, $9dd8dd888e812fd7$export$133beb65adbc45a3)(page);
577
+ this.tab = new (0, $0a8f56f4ec9e6ec3$export$3e41faf802a29e71)(page);
578
+ this.form = new (0, $f0e8ecb73642aac7$export$13ee474454c1948e)(page);
579
+ this.modal = new (0, $1b7c532a5b0861f3$export$bd6452a745ffdb18)(page);
580
+ }
581
+ /**
582
+ * Create new ci under any explorer package by providing following parameters.
583
+ * @param parentNodeId
584
+ * @param menuPath
585
+ * @param expectedCiType
586
+ * @param fieldName
587
+ */ async createNewCi(parentNodeId, menuPath, fieldName) {
588
+ await this.expandNodePath(parentNodeId);
589
+ await this.page.locator('div[data-id="' + parentNodeId + '"]').click();
590
+ await this.page.locator('i[data-id="' + parentNodeId + '"].context-menu-button').click();
591
+ await this.contextMenu.clickMenuPath(menuPath);
592
+ await this.form.assertSaveButtonIsDisabled();
593
+ await this.form.assertSaveAndCloseButtonIsDisabled();
594
+ await this.tab.assertActiveTabSelector("Create udm." + menuPath[1] + "");
595
+ await this.form.enterName(fieldName);
596
+ await this.form.clickSaveAndClose();
597
+ }
598
+ /**
599
+ * Expand the ci path tree toggler.
600
+ * @param pathnode
601
+ */ async expandNode(pathnode) {
602
+ if (await this.page.locator('div[data-id="' + pathnode + '"] a.infinite-tree-toggler.infinite-tree-closed').isVisible()) await this.page.locator('div[data-id="' + pathnode + '"] a').click();
603
+ }
604
+ /**
605
+ * expands the path of CI by separating path from "/"
606
+ * @param parentNodeId
607
+ */ async expandNodePath(parentNodeId) {
608
+ const nodeIdParts = $1UEKj$rambda.split("/", parentNodeId);
609
+ for(let ind = 0; ind < nodeIdParts.length; ind += 1){
610
+ const path = $1UEKj$rambda.join("/", $1UEKj$rambda.take(ind + 1, nodeIdParts));
611
+ this.expandNode(path);
612
+ }
613
+ }
614
+ /**
615
+ * Collapse the tree toggler of ci path.
616
+ * @param parentNodeId
617
+ */ async collapseNode(parentNodeId) {
618
+ if (await this.page.locator('div[data-id="' + parentNodeId + '"] a.infinite-tree-toggler.infinite-tree-closed').isHidden()) await this.page.locator('div[data-id="' + parentNodeId + '"] a').click();
619
+ }
620
+ /**
621
+ * Delete the ci
622
+ * @param node
623
+ */ async deleteCi(node) {
624
+ await this.page.locator('div[data-id="' + node + '"]').click();
625
+ await this.page.locator('i[data-id="' + node + '"].context-menu-button').click();
626
+ await this.contextMenu.clickMenuPath([
627
+ "delete"
628
+ ]);
629
+ await this.modal.clickDelete();
630
+ }
631
+ /**
632
+ * Click on specific node which is under Application CI.
633
+ * @param nodeId
634
+ */ async clickNode(nodeId) {
635
+ await this.page.locator('div[data-id="' + nodeId + '"]').dblclick();
636
+ }
637
+ /**
638
+ * Click on ci under any explorer package of contextual menus by providing following parameters.
639
+ * @param parentNodeId
640
+ * @param menuPath
641
+ * @param expectedCiType
642
+ * @param fieldName
643
+ */ async clickCi(parentNodeId, menuPath, expectedCiType) {
644
+ await this.expandNodePath(parentNodeId);
645
+ await this.page.locator('div[data-id="' + parentNodeId + '"]').click();
646
+ await this.page.locator('i[data-id="' + parentNodeId + '"].context-menu-button').click();
647
+ await this.contextMenu.clickMenuPath(menuPath);
648
+ await this.form.assertSaveButtonIsDisabled();
649
+ await this.form.assertSaveAndCloseButtonIsDisabled();
650
+ await this.tab.assertActiveTabSelector("Create " + expectedCiType + "");
651
+ }
652
+ }
653
+
654
+
655
+
656
+
657
+ class $b90c33a29683027b$export$60413e28724d3abd extends (0, $50f6953b9762c03c$export$a7fed597f4b8afd8) {
658
+ constructor(page){
659
+ super(page.locator(".dip-view-body"));
660
+ this.page = page;
661
+ this.inputName = page.locator('input[name="name"]');
662
+ this.inputLatestVersion = page.locator('input[name="lastVersion"]');
663
+ this.saveButton = page.getByRole("button", {
664
+ name: "Save",
665
+ exact: true
666
+ });
667
+ this.saveAndCloseButton = page.getByRole("button", {
668
+ name: "Save and close",
669
+ exact: true
670
+ });
671
+ this.cancelButton = page.getByRole("button", {
672
+ name: "Cancel",
673
+ exact: true
674
+ });
675
+ this.formSection = page.locator(".xl-react-components.xl-react-dip-dynamic-form");
676
+ }
677
+ /**
678
+ * Enter name in name field of the application form
679
+ * @param name
680
+ * @returns
681
+ */ async enterName(name) {
682
+ return await this.findElementInSection(this.inputName).fill(name);
683
+ }
684
+ /**
685
+ * Enter latest version field
686
+ * @param version
687
+ * @returns
688
+ */ async enterLatestVersion(version) {
689
+ return await this.findElementInSection(this.inputLatestVersion).fill(version);
690
+ }
691
+ /**
692
+ * Click save button
693
+ * @returns
694
+ */ async clickSave() {
695
+ return await this.findElementInSection(this.saveButton).click();
696
+ }
697
+ /**
698
+ * Click save and close button
699
+ * @returns
700
+ */ async clickSaveAndClose() {
701
+ return await this.findElementInSection(this.saveAndCloseButton).click();
702
+ }
703
+ /**
704
+ * Click cancel button
705
+ * @returns
706
+ */ async clickCancel() {
707
+ return await this.findElementInSection(this.cancelButton).click();
708
+ }
709
+ /**
710
+ * Expecting save button is disabled
711
+ * @returns
712
+ */ async assertSaveButtonIsDisabled() {
713
+ return await (0, $1UEKj$playwrighttest.expect)(this.findElementInSection(this.saveButton)).toBeDisabled();
714
+ }
715
+ /**
716
+ * Expecting Save and close button is disabled
717
+ * @returns
718
+ */ async assertSaveAndCloseButtonIsDisabled() {
719
+ return await (0, $1UEKj$playwrighttest.expect)(this.findElementInSection(this.saveAndCloseButton)).toBeDisabled();
331
720
  }
332
721
  }
333
722
 
@@ -335,7 +724,13 @@ class $b375bc430f279b15$export$b477143f7ffae077 extends (0, $7149ac56b8ddfcf1$ex
335
724
  class $1fae0b7de3d21f52$export$bf4a5dd3be690f6b extends (0, $ae23b16684112d0b$export$2b65d1d97338f32b) {
336
725
  constructor(page){
337
726
  super(page);
338
- this.appMenu = new (0, $b375bc430f279b15$export$b477143f7ffae077)(page);
727
+ this.contextMenu = new (0, $9dd8dd888e812fd7$export$133beb65adbc45a3)(page);
728
+ this.form = new (0, $f0e8ecb73642aac7$export$13ee474454c1948e)(page);
729
+ this.tab = new (0, $0a8f56f4ec9e6ec3$export$3e41faf802a29e71)(page);
730
+ this.util = new (0, $dcea22adf7bc9211$export$7db63d2c950874b5)(this, page);
731
+ this.modal = new (0, $1b7c532a5b0861f3$export$bd6452a745ffdb18)(page);
732
+ this.commonUtil = new (0, $26b4a6e9a3909559$export$5a20f96f6e2d29e9)(page);
733
+ this.appForm = new (0, $b90c33a29683027b$export$60413e28724d3abd)(page);
339
734
  }
340
735
  }
341
736
 
@@ -349,6 +744,292 @@ class $114862ed97d76403$export$36d69433c4f81145 extends (0, $ae23b16684112d0b$ex
349
744
  }
350
745
 
351
746
 
747
+
748
+
749
+
750
+
751
+
752
+
753
+
754
+
755
+
756
+ class $465c25c02ae34e1f$export$855563f8bdb36207 extends (0, $50f6953b9762c03c$export$a7fed597f4b8afd8) {
757
+ constructor(page){
758
+ super(page.locator(".dip-view-body"));
759
+ this.page = page;
760
+ this.inputName = page.locator('input[name="name"]');
761
+ this.inputLatestVersion = page.locator('input[name="lastVersion"]');
762
+ this.saveButton = page.getByRole("button", {
763
+ name: "Save",
764
+ exact: true
765
+ });
766
+ this.saveAndCloseButton = page.getByRole("button", {
767
+ name: "Save and close",
768
+ exact: true
769
+ });
770
+ this.cancelButton = page.getByRole("button", {
771
+ name: "Cancel",
772
+ exact: true
773
+ });
774
+ this.inputHost = page.locator('input[name="host"]');
775
+ this.inputPort = page.getByLabel("Port");
776
+ this.inputUsername = page.locator('input[name="username"]');
777
+ this.inputPassword = page.locator('input[name="password"]');
778
+ this.inputFromAddress = page.locator('input[name="fromAddress"]');
779
+ this.inputTestAddress = page.locator('input[name="testAddress"]');
780
+ this.inputHostName = page.locator('input[name="hostname"]');
781
+ }
782
+ /**
783
+ * Enter name in name field of the configuration form
784
+ * @param name
785
+ * @returns
786
+ */ async enterName(name) {
787
+ return await this.findElementInSection(this.inputName).fill(name);
788
+ }
789
+ /**
790
+ * Enter latest version field
791
+ * @param version
792
+ * @returns
793
+ */ async enterLatestVersion(version) {
794
+ return await this.findElementInSection(this.inputLatestVersion).fill(version);
795
+ }
796
+ /**
797
+ * Click save button
798
+ * @returns
799
+ */ async clickSave() {
800
+ return await this.findElementInSection(this.saveButton).click();
801
+ }
802
+ /**
803
+ * Click save and close button
804
+ * @returns
805
+ */ async clickSaveAndClose() {
806
+ return await this.findElementInSection(this.saveAndCloseButton).click();
807
+ }
808
+ /**
809
+ * Click cancel button
810
+ * @returns
811
+ */ async clickCancel() {
812
+ return await this.findElementInSection(this.cancelButton).click();
813
+ }
814
+ /**
815
+ * Expecting save button is disabled
816
+ * @returns
817
+ */ async assertSaveButtonIsDisabled() {
818
+ return await (0, $1UEKj$playwrighttest.expect)(this.findElementInSection(this.saveButton)).toBeDisabled();
819
+ }
820
+ /**
821
+ * Expecting Save and close button is disabled
822
+ * @returns
823
+ */ async assertSaveAndCloseButtonIsDisabled() {
824
+ return await (0, $1UEKj$playwrighttest.expect)(this.findElementInSection(this.saveAndCloseButton)).toBeDisabled();
825
+ }
826
+ /**
827
+ * Expecting field value with its field name
828
+ * @param fieldName
829
+ * @param value
830
+ * @returns
831
+ */ async expectFieldValue(fieldName, value) {
832
+ (0, $1UEKj$playwrighttest.expect)(await this.page.locator('input[name="' + fieldName + '"]').getAttribute("value")).toEqual(value);
833
+ }
834
+ /**
835
+ * Set Host value to the Host field in configuration form
836
+ * @param host
837
+ * @returns
838
+ */ async setHostValue(host) {
839
+ await this.findElementInSection(this.inputHost).fill(host);
840
+ }
841
+ /**
842
+ * Setting port value in the configuration form
843
+ * @param port
844
+ * @returns
845
+ */ async setPortValue(port) {
846
+ await this.findElementInSection(this.inputPort).fill(port);
847
+ }
848
+ /**
849
+ * Setting from Address field value in configuration form
850
+ * @param address
851
+ * @returns
852
+ */ async setFromAddress(address) {
853
+ await this.findElementInSection(this.inputFromAddress).fill(address);
854
+ }
855
+ /**
856
+ * Setting username in configuration form
857
+ * @param username
858
+ * @returns
859
+ */ async setUserName(username) {
860
+ await this.findElementInSection(this.inputUsername).fill(username);
861
+ }
862
+ /**
863
+ * Setting password in configuration form
864
+ * @param password
865
+ * @returns
866
+ */ async setPassword(password) {
867
+ await this.findElementInSection(this.inputPassword).fill(password);
868
+ }
869
+ /**
870
+ * Setting host name in configuration form
871
+ * @param hostname
872
+ * @returns
873
+ */ async setHostName(hostname) {
874
+ await this.findElementInSection(this.inputHostName).fill(hostname);
875
+ }
876
+ }
877
+
878
+
879
+ class $168ec5e952b92f0d$export$ad55ec59bf82c4fc {
880
+ constructor(page1, page){
881
+ this.configPage = page1;
882
+ this.page = page;
883
+ }
884
+ }
885
+
886
+
887
+ class $0b66c9d41a4ba704$export$8ef81de2d4ebb0b9 extends (0, $ae23b16684112d0b$export$2b65d1d97338f32b) {
888
+ constructor(page){
889
+ super(page);
890
+ this.contextMenu = new (0, $9dd8dd888e812fd7$export$133beb65adbc45a3)(page);
891
+ this.form = new (0, $f0e8ecb73642aac7$export$13ee474454c1948e)(page);
892
+ this.tab = new (0, $0a8f56f4ec9e6ec3$export$3e41faf802a29e71)(page);
893
+ this.modal = new (0, $1b7c532a5b0861f3$export$bd6452a745ffdb18)(page);
894
+ this.commonUtil = new (0, $26b4a6e9a3909559$export$5a20f96f6e2d29e9)(page);
895
+ this.configForm = new (0, $465c25c02ae34e1f$export$855563f8bdb36207)(page);
896
+ this.util = new (0, $168ec5e952b92f0d$export$ad55ec59bf82c4fc)(this, page);
897
+ }
898
+ }
899
+
900
+
901
+
902
+
903
+
904
+
905
+
906
+
907
+
908
+
909
+ class $fef9a424af55e937$export$21cde1e6a73cf500 extends (0, $50f6953b9762c03c$export$a7fed597f4b8afd8) {
910
+ constructor(page){
911
+ super(page.locator(".dip-view-body"));
912
+ this.page = page;
913
+ this.formSection = page.locator(".xl-react-components.xl-react-dip-dynamic-form");
914
+ this.inputName = page.locator('input[name="name"]');
915
+ this.inputLatestVersion = page.locator('input[name="lastVersion"]');
916
+ this.saveButton = page.getByRole("button", {
917
+ name: "Save",
918
+ exact: true
919
+ });
920
+ this.saveAndCloseButton = page.getByRole("button", {
921
+ name: "Save and close",
922
+ exact: true
923
+ });
924
+ this.cancelButton = page.getByRole("button", {
925
+ name: "Cancel",
926
+ exact: true
927
+ });
928
+ this.inputVersion = page.locator("");
929
+ }
930
+ /**
931
+ * Expect the label text is available in form.
932
+ * @param label
933
+ */ async assertLabelText(label) {
934
+ await (0, $1UEKj$playwrighttest.expect)(this.page.getByText(label, {
935
+ exact: true
936
+ })).toBeVisible();
937
+ }
938
+ /**
939
+ * Enter name in name field of the application form
940
+ * @param name
941
+ * @returns
942
+ */ async enterName(name) {
943
+ return await this.findElementInSection(this.inputName).fill(name);
944
+ }
945
+ /**
946
+ * Enter latest version field
947
+ * @param version
948
+ * @returns
949
+ */ async enterLatestVersion(version) {
950
+ return await this.findElementInSection(this.inputLatestVersion).fill(version);
951
+ }
952
+ /**
953
+ * Click save button
954
+ * @returns
955
+ */ async clickSave() {
956
+ return await this.findElementInSection(this.saveButton).click();
957
+ }
958
+ /**
959
+ * Click save and close button
960
+ * @returns
961
+ */ async clickSaveAndClose() {
962
+ return await this.findElementInSection(this.saveAndCloseButton).click();
963
+ }
964
+ /**
965
+ * Click cancel button
966
+ * @returns
967
+ */ async clickCancel() {
968
+ return await this.findElementInSection(this.cancelButton).click();
969
+ }
970
+ /**
971
+ * Expecting save button is disabled
972
+ * @returns
973
+ */ async assertSaveButtonIsDisabled() {
974
+ return await (0, $1UEKj$playwrighttest.expect)(this.findElementInSection(this.saveButton)).toBeDisabled();
975
+ }
976
+ /**
977
+ * Expecting Save and close button is disabled
978
+ * @returns
979
+ */ async assertSaveAndCloseButtonIsDisabled() {
980
+ return await (0, $1UEKj$playwrighttest.expect)(this.findElementInSection(this.saveAndCloseButton)).toBeDisabled();
981
+ }
982
+ /**
983
+ * Enter options in the input field of dropdown to match with suggestion list in form
984
+ * @param fieldName
985
+ * @param value
986
+ */ async selectVersionOption(fieldName, value) {
987
+ const label = this.formSection.locator('//label[text()="' + fieldName + '"]/parent::div/parent::div');
988
+ await label.locator(".xl-react-components-input input").fill(value);
989
+ }
990
+ }
991
+
992
+
993
+ class $46c3ae45662ff7ad$export$b8a8d62f66d27fa1 {
994
+ constructor(page1, page){
995
+ this.environmentPage = page1;
996
+ this.page = page;
997
+ }
998
+ }
999
+
1000
+
1001
+ class $6d811907766c6ed0$export$2c95c5c5be4fb9b0 extends (0, $ae23b16684112d0b$export$2b65d1d97338f32b) {
1002
+ constructor(page){
1003
+ super(page);
1004
+ this.contextMenu = new (0, $9dd8dd888e812fd7$export$133beb65adbc45a3)(page);
1005
+ this.form = new (0, $f0e8ecb73642aac7$export$13ee474454c1948e)(page);
1006
+ this.tab = new (0, $0a8f56f4ec9e6ec3$export$3e41faf802a29e71)(page);
1007
+ this.modal = new (0, $1b7c532a5b0861f3$export$bd6452a745ffdb18)(page);
1008
+ this.commonUtil = new (0, $26b4a6e9a3909559$export$5a20f96f6e2d29e9)(page);
1009
+ this.envForm = new (0, $fef9a424af55e937$export$21cde1e6a73cf500)(page);
1010
+ this.util = new (0, $46c3ae45662ff7ad$export$b8a8d62f66d27fa1)(this, page);
1011
+ }
1012
+ }
1013
+
1014
+
1015
+
1016
+
1017
+
1018
+
1019
+
1020
+
1021
+ class $2176608eec52f17d$export$1f6beddb119e759b extends (0, $ae23b16684112d0b$export$2b65d1d97338f32b) {
1022
+ constructor(page){
1023
+ super(page);
1024
+ this.contextMenu = new (0, $9dd8dd888e812fd7$export$133beb65adbc45a3)(page);
1025
+ this.form = new (0, $f0e8ecb73642aac7$export$13ee474454c1948e)(page);
1026
+ this.tab = new (0, $0a8f56f4ec9e6ec3$export$3e41faf802a29e71)(page);
1027
+ this.modal = new (0, $1b7c532a5b0861f3$export$bd6452a745ffdb18)(page);
1028
+ this.commonUtil = new (0, $26b4a6e9a3909559$export$5a20f96f6e2d29e9)(page);
1029
+ }
1030
+ }
1031
+
1032
+
352
1033
  const $3352700e95ddc19e$export$e0969da9b8fb378d = (0, $1UEKj$playwrighttest.test).extend({
353
1034
  loginPage: async ({ page: page }, use)=>{
354
1035
  // Set up the fixture.
@@ -365,6 +1046,26 @@ const $3352700e95ddc19e$export$e0969da9b8fb378d = (0, $1UEKj$playwrighttest.test
365
1046
  const applicationPage = new (0, $1fae0b7de3d21f52$export$bf4a5dd3be690f6b)(page);
366
1047
  await use(applicationPage);
367
1048
  return applicationPage;
1049
+ },
1050
+ tab: async ({ page: page }, use)=>{
1051
+ const tab = new (0, $0a8f56f4ec9e6ec3$export$3e41faf802a29e71)(page);
1052
+ await use(tab);
1053
+ return tab;
1054
+ },
1055
+ environmentPage: async ({ page: page }, use)=>{
1056
+ const environmentPage = new (0, $6d811907766c6ed0$export$2c95c5c5be4fb9b0)(page);
1057
+ await use(environmentPage);
1058
+ return environmentPage;
1059
+ },
1060
+ configurePage: async ({ page: page }, use)=>{
1061
+ const configurePage = new (0, $0b66c9d41a4ba704$export$8ef81de2d4ebb0b9)(page);
1062
+ await use(configurePage);
1063
+ return configurePage;
1064
+ },
1065
+ infraPage: async ({ page: page }, use)=>{
1066
+ const infraPage = new (0, $2176608eec52f17d$export$1f6beddb119e759b)(page);
1067
+ await use(infraPage);
1068
+ return infraPage;
368
1069
  }
369
1070
  });
370
1071