@digital-ai/devops-page-object-deploy 0.0.3 → 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/CHANGELOG.md +11 -0
- package/dist/main.js +520 -94
- package/dist/main.js.map +1 -1
- package/dist/module.js +520 -94
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +327 -42
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -325,24 +325,83 @@ class $c2c31ea6199a3576$export$f14c0e3f98d164c0 extends (0, $7d546dcaafadc158$ex
|
|
|
325
325
|
|
|
326
326
|
|
|
327
327
|
|
|
328
|
+
class $85032414fe55e0f1$export$7db63d2c950874b5 {
|
|
329
|
+
constructor(page1, page){
|
|
330
|
+
this.applicationPage = page1;
|
|
331
|
+
this.page = page;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Create New directory under applications CI.
|
|
335
|
+
* @param appDirectoryName
|
|
336
|
+
* @param expectedCiType
|
|
337
|
+
*/ async createNewApplicationDirectory(appDirectoryName, expectedCiType) {
|
|
338
|
+
await this.applicationPage.contextMenu.clickApplicationCi();
|
|
339
|
+
await this.applicationPage.contextMenu.clickMenuPath([
|
|
340
|
+
"new",
|
|
341
|
+
"directory"
|
|
342
|
+
]);
|
|
343
|
+
await this.applicationPage.form.assertSaveButtonIsDisabled();
|
|
344
|
+
await this.applicationPage.form.assertSaveAndCloseButtonIsDisabled();
|
|
345
|
+
await this.applicationPage.form.enterName(appDirectoryName);
|
|
346
|
+
await this.applicationPage.tab.assertActiveTabSelector("Create " + expectedCiType);
|
|
347
|
+
await this.applicationPage.form.clickSaveAndClose();
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Create new application under Application ci
|
|
351
|
+
* @param appName
|
|
352
|
+
* @param expectedCiType
|
|
353
|
+
*/ async createNewApplication(appName, expectedCiType) {
|
|
354
|
+
await this.applicationPage.contextMenu.clickApplicationCi();
|
|
355
|
+
await this.applicationPage.contextMenu.clickMenuPath([
|
|
356
|
+
"new",
|
|
357
|
+
"application"
|
|
358
|
+
]);
|
|
359
|
+
await this.applicationPage.form.assertSaveButtonIsDisabled();
|
|
360
|
+
await this.applicationPage.form.assertSaveAndCloseButtonIsDisabled();
|
|
361
|
+
await this.applicationPage.form.enterName(appName);
|
|
362
|
+
await this.applicationPage.form.clickSaveAndClose();
|
|
363
|
+
await this.applicationPage.tab.assertActiveTabSelector("Create " + expectedCiType);
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* TODO: It is half done just to check on menu path other than new. Need to create as per scenario.
|
|
367
|
+
*/ async createFromFileImport() {
|
|
368
|
+
await this.applicationPage.contextMenu.clickApplicationCi();
|
|
369
|
+
await this.applicationPage.contextMenu.clickMenuPath([
|
|
370
|
+
"import",
|
|
371
|
+
"fromComputer"
|
|
372
|
+
]);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
328
378
|
|
|
329
|
-
class $
|
|
379
|
+
class $f6d52f442cf07ec8$export$3e41faf802a29e71 extends (0, $7d546dcaafadc158$export$2b65d1d97338f32b) {
|
|
330
380
|
constructor(page){
|
|
331
|
-
super(page
|
|
381
|
+
super(page);
|
|
332
382
|
this.page = page;
|
|
333
|
-
this.
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
383
|
+
this.parentTabLocator = this.page.locator(".working-panel-section .xl-react-tab-system");
|
|
384
|
+
this.getTabTitleLocator = this.page.locator("li.active .tab-title");
|
|
385
|
+
this.closeIcon = this.page.locator(".xl-icon.close-ico");
|
|
386
|
+
}
|
|
387
|
+
async assertActiveTabSelector(expectedCiType) {
|
|
388
|
+
return await (0, $lE6ZQ$expect)(this.parentTabLocator.locator("li.active .tab-title")).toHaveText(expectedCiType, {
|
|
389
|
+
ignoreCase: true
|
|
340
390
|
});
|
|
391
|
+
}
|
|
392
|
+
async closeActiveTabs() {
|
|
393
|
+
if (await this.closeIcon.isVisible()) await this.parentTabLocator.locator(".nav .active .close-icon").click();
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
class $6d0b1fc17db4a5fb$export$133beb65adbc45a3 extends (0, $54bcd1bcf08dd053$export$d9b273488cd8ce6f) {
|
|
400
|
+
constructor(page){
|
|
401
|
+
super(page.locator("#context-menu-popover"), page.locator("i[data-id=Applications].context-menu-button"), page.locator(".dropdown-menu.multi-level.dropdown-menu-0"));
|
|
402
|
+
this.page = page;
|
|
341
403
|
this.applicationLocator = page.locator('div[data-id="Applications"]');
|
|
342
|
-
this.
|
|
343
|
-
name: "Delete",
|
|
344
|
-
exact: true
|
|
345
|
-
});
|
|
404
|
+
this.environmentLocator = page.locator('div[data-id="Environments"]');
|
|
346
405
|
}
|
|
347
406
|
/**
|
|
348
407
|
* Click on application CI in contextual-menu option.
|
|
@@ -351,6 +410,12 @@ class $b6dcf2a94c3ae3f4$export$b477143f7ffae077 extends (0, $54bcd1bcf08dd053$ex
|
|
|
351
410
|
await this.openContextualMenuDots();
|
|
352
411
|
}
|
|
353
412
|
/**
|
|
413
|
+
* Click on application CI in contextual-menu option.
|
|
414
|
+
*/ async clickEnvironmentCi() {
|
|
415
|
+
await this.environmentLocator.click();
|
|
416
|
+
await this.openContextualMenuDots();
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
354
419
|
* Click on menu items from contextual-menu option using path navigation option
|
|
355
420
|
* @param path: Provide menu navigation path using array
|
|
356
421
|
* eg: ['new','Application'] -> to click on menu to create new application
|
|
@@ -377,7 +442,7 @@ class $9f5bc0f6324fb5ea$export$a7fed597f4b8afd8 extends (0, $b464119f5ec5aad0$ex
|
|
|
377
442
|
}
|
|
378
443
|
|
|
379
444
|
|
|
380
|
-
class $
|
|
445
|
+
class $4baf6ba7e224a0ed$export$13ee474454c1948e extends (0, $9f5bc0f6324fb5ea$export$a7fed597f4b8afd8) {
|
|
381
446
|
constructor(page){
|
|
382
447
|
super(page.locator(".dip-view-body"));
|
|
383
448
|
this.page = page;
|
|
@@ -395,6 +460,8 @@ class $6cefee8b9be33b2d$export$60413e28724d3abd extends (0, $9f5bc0f6324fb5ea$ex
|
|
|
395
460
|
name: "Cancel",
|
|
396
461
|
exact: true
|
|
397
462
|
});
|
|
463
|
+
this.errorMessage = page.locator(".error");
|
|
464
|
+
this.formSection = page.locator(".xl-react-components.xl-react-dip-dynamic-form");
|
|
398
465
|
}
|
|
399
466
|
/**
|
|
400
467
|
* Enter name in name field of the application form
|
|
@@ -440,72 +507,88 @@ class $6cefee8b9be33b2d$export$60413e28724d3abd extends (0, $9f5bc0f6324fb5ea$ex
|
|
|
440
507
|
*/ async assertSaveAndCloseButtonIsDisabled() {
|
|
441
508
|
return await (0, $lE6ZQ$expect)(this.findElementInSection(this.saveAndCloseButton)).toBeDisabled();
|
|
442
509
|
}
|
|
510
|
+
/**
|
|
511
|
+
* Verify Error message in the form
|
|
512
|
+
* @param errorMsg
|
|
513
|
+
* @returns
|
|
514
|
+
*/ async verifyErrorMessage(errorMsg) {
|
|
515
|
+
return (0, $lE6ZQ$expect)(await this.findElementInSection(this.errorMessage).textContent()).toContain(errorMsg);
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Verify field value in form using field name
|
|
519
|
+
* @param fieldName
|
|
520
|
+
* @param expectedValue
|
|
521
|
+
* @returns
|
|
522
|
+
*/ async verifyFieldValue(fieldName, expectedValue) {
|
|
523
|
+
const label = this.formSection.locator('//label[text()="' + fieldName + '"]/parent::div/parent::div');
|
|
524
|
+
const input = label.locator(".xl-react-components-input input");
|
|
525
|
+
const result = await input.getAttribute("value");
|
|
526
|
+
return (0, $lE6ZQ$expect)(result).toEqual(expectedValue);
|
|
527
|
+
}
|
|
443
528
|
}
|
|
444
529
|
|
|
445
530
|
|
|
446
531
|
|
|
447
|
-
class $
|
|
448
|
-
constructor(
|
|
449
|
-
|
|
450
|
-
this.
|
|
532
|
+
class $1f57a739e2592b82$export$2b77a92f1a5ad772 extends (0, $b464119f5ec5aad0$export$6e2c8f0811a474ce) {
|
|
533
|
+
constructor(page){
|
|
534
|
+
super(page.locator(".xl-react-modal-content"));
|
|
535
|
+
this.header = page.locator(".modal-header");
|
|
536
|
+
this.body = page.locator(".modal-body");
|
|
537
|
+
this.footer = page.locator(".modal-footer");
|
|
451
538
|
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
"
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
await this.applicationPage.appForm.clickSaveAndClose();
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
class $9a8685efb2ff62b1$export$bd6452a745ffdb18 extends (0, $1f57a739e2592b82$export$2b77a92f1a5ad772) {
|
|
543
|
+
constructor(page){
|
|
544
|
+
super(page);
|
|
545
|
+
this.deleteButton = page.getByRole("button", {
|
|
546
|
+
name: "Delete",
|
|
547
|
+
exact: true
|
|
548
|
+
});
|
|
549
|
+
this.cancelButton = page.getByRole("button", {
|
|
550
|
+
name: "Cancel",
|
|
551
|
+
exact: true
|
|
552
|
+
});
|
|
467
553
|
}
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
* @param appName
|
|
471
|
-
* @param expectedCiType
|
|
472
|
-
*/ async createNewApplication(appName, expectedCiType) {
|
|
473
|
-
await this.applicationPage.appMenu.clickApplicationCi();
|
|
474
|
-
await this.applicationPage.appMenu.clickMenuPath([
|
|
475
|
-
"new",
|
|
476
|
-
"application"
|
|
477
|
-
]);
|
|
478
|
-
await this.applicationPage.appForm.assertSaveButtonIsDisabled();
|
|
479
|
-
await this.applicationPage.appForm.assertSaveAndCloseButtonIsDisabled();
|
|
480
|
-
await this.applicationPage.appForm.enterName(appName);
|
|
481
|
-
await this.applicationPage.appForm.clickSaveAndClose();
|
|
482
|
-
await this.applicationPage.tab.assertActiveTabSelector(expectedCiType);
|
|
554
|
+
async clickDelete() {
|
|
555
|
+
await this.footer.locator(this.deleteButton).click();
|
|
483
556
|
}
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
557
|
+
async clickCancel() {
|
|
558
|
+
await this.footer.locator(this.cancelButton).click();
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
class $0ced90cc8a4c42e6$export$5a20f96f6e2d29e9 {
|
|
569
|
+
constructor(page){
|
|
570
|
+
this.page = page;
|
|
571
|
+
this.contextMenu = new (0, $6d0b1fc17db4a5fb$export$133beb65adbc45a3)(page);
|
|
572
|
+
this.tab = new (0, $f6d52f442cf07ec8$export$3e41faf802a29e71)(page);
|
|
573
|
+
this.form = new (0, $4baf6ba7e224a0ed$export$13ee474454c1948e)(page);
|
|
574
|
+
this.modal = new (0, $9a8685efb2ff62b1$export$bd6452a745ffdb18)(page);
|
|
492
575
|
}
|
|
493
576
|
/**
|
|
494
|
-
* Create new ci
|
|
577
|
+
* Create new ci under any explorer package by providing following parameters.
|
|
495
578
|
* @param parentNodeId
|
|
496
579
|
* @param menuPath
|
|
497
580
|
* @param expectedCiType
|
|
498
|
-
* @param
|
|
499
|
-
*/ async createNewCi(parentNodeId, menuPath,
|
|
581
|
+
* @param fieldName
|
|
582
|
+
*/ async createNewCi(parentNodeId, menuPath, fieldName) {
|
|
500
583
|
await this.expandNodePath(parentNodeId);
|
|
501
584
|
await this.page.locator('div[data-id="' + parentNodeId + '"]').click();
|
|
502
585
|
await this.page.locator('i[data-id="' + parentNodeId + '"].context-menu-button').click();
|
|
503
|
-
await this.
|
|
504
|
-
await this.
|
|
505
|
-
await this.
|
|
506
|
-
await this.
|
|
507
|
-
await this.
|
|
508
|
-
await this.
|
|
586
|
+
await this.contextMenu.clickMenuPath(menuPath);
|
|
587
|
+
await this.form.assertSaveButtonIsDisabled();
|
|
588
|
+
await this.form.assertSaveAndCloseButtonIsDisabled();
|
|
589
|
+
await this.tab.assertActiveTabSelector("Create udm." + menuPath[1] + "");
|
|
590
|
+
await this.form.enterName(fieldName);
|
|
591
|
+
await this.form.clickSaveAndClose();
|
|
509
592
|
}
|
|
510
593
|
/**
|
|
511
594
|
* Expand the ci path tree toggler.
|
|
@@ -535,85 +618,413 @@ class $85032414fe55e0f1$export$7db63d2c950874b5 {
|
|
|
535
618
|
*/ async deleteCi(node) {
|
|
536
619
|
await this.page.locator('div[data-id="' + node + '"]').click();
|
|
537
620
|
await this.page.locator('i[data-id="' + node + '"].context-menu-button').click();
|
|
538
|
-
await this.
|
|
621
|
+
await this.contextMenu.clickMenuPath([
|
|
539
622
|
"delete"
|
|
540
623
|
]);
|
|
541
|
-
await this.
|
|
624
|
+
await this.modal.clickDelete();
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* Click on specific node which is under Application CI.
|
|
628
|
+
* @param nodeId
|
|
629
|
+
*/ async clickNode(nodeId) {
|
|
630
|
+
await this.page.locator('div[data-id="' + nodeId + '"]').dblclick();
|
|
631
|
+
}
|
|
632
|
+
/**
|
|
633
|
+
* Click on ci under any explorer package of contextual menus by providing following parameters.
|
|
634
|
+
* @param parentNodeId
|
|
635
|
+
* @param menuPath
|
|
636
|
+
* @param expectedCiType
|
|
637
|
+
* @param fieldName
|
|
638
|
+
*/ async clickCi(parentNodeId, menuPath, expectedCiType) {
|
|
639
|
+
await this.expandNodePath(parentNodeId);
|
|
640
|
+
await this.page.locator('div[data-id="' + parentNodeId + '"]').click();
|
|
641
|
+
await this.page.locator('i[data-id="' + parentNodeId + '"].context-menu-button').click();
|
|
642
|
+
await this.contextMenu.clickMenuPath(menuPath);
|
|
643
|
+
await this.form.assertSaveButtonIsDisabled();
|
|
644
|
+
await this.form.assertSaveAndCloseButtonIsDisabled();
|
|
645
|
+
await this.tab.assertActiveTabSelector("Create " + expectedCiType + "");
|
|
542
646
|
}
|
|
543
647
|
}
|
|
544
648
|
|
|
545
649
|
|
|
546
650
|
|
|
547
651
|
|
|
548
|
-
class $
|
|
652
|
+
class $6cefee8b9be33b2d$export$60413e28724d3abd extends (0, $9f5bc0f6324fb5ea$export$a7fed597f4b8afd8) {
|
|
549
653
|
constructor(page){
|
|
550
|
-
super(page);
|
|
654
|
+
super(page.locator(".dip-view-body"));
|
|
551
655
|
this.page = page;
|
|
552
|
-
this.
|
|
553
|
-
this.
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
ignoreCase: true
|
|
656
|
+
this.inputName = page.locator('input[name="name"]');
|
|
657
|
+
this.inputLatestVersion = page.locator('input[name="lastVersion"]');
|
|
658
|
+
this.saveButton = page.getByRole("button", {
|
|
659
|
+
name: "Save",
|
|
660
|
+
exact: true
|
|
558
661
|
});
|
|
662
|
+
this.saveAndCloseButton = page.getByRole("button", {
|
|
663
|
+
name: "Save and close",
|
|
664
|
+
exact: true
|
|
665
|
+
});
|
|
666
|
+
this.cancelButton = page.getByRole("button", {
|
|
667
|
+
name: "Cancel",
|
|
668
|
+
exact: true
|
|
669
|
+
});
|
|
670
|
+
this.formSection = page.locator(".xl-react-components.xl-react-dip-dynamic-form");
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* Enter name in name field of the application form
|
|
674
|
+
* @param name
|
|
675
|
+
* @returns
|
|
676
|
+
*/ async enterName(name) {
|
|
677
|
+
return await this.findElementInSection(this.inputName).fill(name);
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* Enter latest version field
|
|
681
|
+
* @param version
|
|
682
|
+
* @returns
|
|
683
|
+
*/ async enterLatestVersion(version) {
|
|
684
|
+
return await this.findElementInSection(this.inputLatestVersion).fill(version);
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Click save button
|
|
688
|
+
* @returns
|
|
689
|
+
*/ async clickSave() {
|
|
690
|
+
return await this.findElementInSection(this.saveButton).click();
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* Click save and close button
|
|
694
|
+
* @returns
|
|
695
|
+
*/ async clickSaveAndClose() {
|
|
696
|
+
return await this.findElementInSection(this.saveAndCloseButton).click();
|
|
697
|
+
}
|
|
698
|
+
/**
|
|
699
|
+
* Click cancel button
|
|
700
|
+
* @returns
|
|
701
|
+
*/ async clickCancel() {
|
|
702
|
+
return await this.findElementInSection(this.cancelButton).click();
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Expecting save button is disabled
|
|
706
|
+
* @returns
|
|
707
|
+
*/ async assertSaveButtonIsDisabled() {
|
|
708
|
+
return await (0, $lE6ZQ$expect)(this.findElementInSection(this.saveButton)).toBeDisabled();
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* Expecting Save and close button is disabled
|
|
712
|
+
* @returns
|
|
713
|
+
*/ async assertSaveAndCloseButtonIsDisabled() {
|
|
714
|
+
return await (0, $lE6ZQ$expect)(this.findElementInSection(this.saveAndCloseButton)).toBeDisabled();
|
|
559
715
|
}
|
|
560
716
|
}
|
|
561
717
|
|
|
562
718
|
|
|
563
|
-
|
|
564
|
-
class $1f57a739e2592b82$export$2b77a92f1a5ad772 extends (0, $b464119f5ec5aad0$export$6e2c8f0811a474ce) {
|
|
719
|
+
class $4e7e9f7ca5788871$export$bf4a5dd3be690f6b extends (0, $7d546dcaafadc158$export$2b65d1d97338f32b) {
|
|
565
720
|
constructor(page){
|
|
566
|
-
super(page
|
|
567
|
-
this.
|
|
568
|
-
this.
|
|
569
|
-
this.
|
|
721
|
+
super(page);
|
|
722
|
+
this.contextMenu = new (0, $6d0b1fc17db4a5fb$export$133beb65adbc45a3)(page);
|
|
723
|
+
this.form = new (0, $4baf6ba7e224a0ed$export$13ee474454c1948e)(page);
|
|
724
|
+
this.tab = new (0, $f6d52f442cf07ec8$export$3e41faf802a29e71)(page);
|
|
725
|
+
this.util = new (0, $85032414fe55e0f1$export$7db63d2c950874b5)(this, page);
|
|
726
|
+
this.modal = new (0, $9a8685efb2ff62b1$export$bd6452a745ffdb18)(page);
|
|
727
|
+
this.commonUtil = new (0, $0ced90cc8a4c42e6$export$5a20f96f6e2d29e9)(page);
|
|
728
|
+
this.appForm = new (0, $6cefee8b9be33b2d$export$60413e28724d3abd)(page);
|
|
570
729
|
}
|
|
571
730
|
}
|
|
572
731
|
|
|
573
732
|
|
|
574
|
-
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
class $736a7a3b2d786796$export$36d69433c4f81145 extends (0, $7d546dcaafadc158$export$2b65d1d97338f32b) {
|
|
575
736
|
constructor(page){
|
|
576
737
|
super(page);
|
|
577
|
-
|
|
578
|
-
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
class $07a0aa0673096895$export$855563f8bdb36207 extends (0, $9f5bc0f6324fb5ea$export$a7fed597f4b8afd8) {
|
|
752
|
+
constructor(page){
|
|
753
|
+
super(page.locator(".dip-view-body"));
|
|
754
|
+
this.page = page;
|
|
755
|
+
this.inputName = page.locator('input[name="name"]');
|
|
756
|
+
this.inputLatestVersion = page.locator('input[name="lastVersion"]');
|
|
757
|
+
this.saveButton = page.getByRole("button", {
|
|
758
|
+
name: "Save",
|
|
759
|
+
exact: true
|
|
760
|
+
});
|
|
761
|
+
this.saveAndCloseButton = page.getByRole("button", {
|
|
762
|
+
name: "Save and close",
|
|
579
763
|
exact: true
|
|
580
764
|
});
|
|
581
765
|
this.cancelButton = page.getByRole("button", {
|
|
582
766
|
name: "Cancel",
|
|
583
767
|
exact: true
|
|
584
768
|
});
|
|
769
|
+
this.inputHost = page.locator('input[name="host"]');
|
|
770
|
+
this.inputPort = page.getByLabel("Port");
|
|
771
|
+
this.inputUsername = page.locator('input[name="username"]');
|
|
772
|
+
this.inputPassword = page.locator('input[name="password"]');
|
|
773
|
+
this.inputFromAddress = page.locator('input[name="fromAddress"]');
|
|
774
|
+
this.inputTestAddress = page.locator('input[name="testAddress"]');
|
|
775
|
+
this.inputHostName = page.locator('input[name="hostname"]');
|
|
585
776
|
}
|
|
586
|
-
|
|
587
|
-
|
|
777
|
+
/**
|
|
778
|
+
* Enter name in name field of the configuration form
|
|
779
|
+
* @param name
|
|
780
|
+
* @returns
|
|
781
|
+
*/ async enterName(name) {
|
|
782
|
+
return await this.findElementInSection(this.inputName).fill(name);
|
|
588
783
|
}
|
|
589
|
-
|
|
590
|
-
|
|
784
|
+
/**
|
|
785
|
+
* Enter latest version field
|
|
786
|
+
* @param version
|
|
787
|
+
* @returns
|
|
788
|
+
*/ async enterLatestVersion(version) {
|
|
789
|
+
return await this.findElementInSection(this.inputLatestVersion).fill(version);
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* Click save button
|
|
793
|
+
* @returns
|
|
794
|
+
*/ async clickSave() {
|
|
795
|
+
return await this.findElementInSection(this.saveButton).click();
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* Click save and close button
|
|
799
|
+
* @returns
|
|
800
|
+
*/ async clickSaveAndClose() {
|
|
801
|
+
return await this.findElementInSection(this.saveAndCloseButton).click();
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* Click cancel button
|
|
805
|
+
* @returns
|
|
806
|
+
*/ async clickCancel() {
|
|
807
|
+
return await this.findElementInSection(this.cancelButton).click();
|
|
808
|
+
}
|
|
809
|
+
/**
|
|
810
|
+
* Expecting save button is disabled
|
|
811
|
+
* @returns
|
|
812
|
+
*/ async assertSaveButtonIsDisabled() {
|
|
813
|
+
return await (0, $lE6ZQ$expect)(this.findElementInSection(this.saveButton)).toBeDisabled();
|
|
814
|
+
}
|
|
815
|
+
/**
|
|
816
|
+
* Expecting Save and close button is disabled
|
|
817
|
+
* @returns
|
|
818
|
+
*/ async assertSaveAndCloseButtonIsDisabled() {
|
|
819
|
+
return await (0, $lE6ZQ$expect)(this.findElementInSection(this.saveAndCloseButton)).toBeDisabled();
|
|
820
|
+
}
|
|
821
|
+
/**
|
|
822
|
+
* Expecting field value with its field name
|
|
823
|
+
* @param fieldName
|
|
824
|
+
* @param value
|
|
825
|
+
* @returns
|
|
826
|
+
*/ async expectFieldValue(fieldName, value) {
|
|
827
|
+
(0, $lE6ZQ$expect)(await this.page.locator('input[name="' + fieldName + '"]').getAttribute("value")).toEqual(value);
|
|
828
|
+
}
|
|
829
|
+
/**
|
|
830
|
+
* Set Host value to the Host field in configuration form
|
|
831
|
+
* @param host
|
|
832
|
+
* @returns
|
|
833
|
+
*/ async setHostValue(host) {
|
|
834
|
+
await this.findElementInSection(this.inputHost).fill(host);
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* Setting port value in the configuration form
|
|
838
|
+
* @param port
|
|
839
|
+
* @returns
|
|
840
|
+
*/ async setPortValue(port) {
|
|
841
|
+
await this.findElementInSection(this.inputPort).fill(port);
|
|
842
|
+
}
|
|
843
|
+
/**
|
|
844
|
+
* Setting from Address field value in configuration form
|
|
845
|
+
* @param address
|
|
846
|
+
* @returns
|
|
847
|
+
*/ async setFromAddress(address) {
|
|
848
|
+
await this.findElementInSection(this.inputFromAddress).fill(address);
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* Setting username in configuration form
|
|
852
|
+
* @param username
|
|
853
|
+
* @returns
|
|
854
|
+
*/ async setUserName(username) {
|
|
855
|
+
await this.findElementInSection(this.inputUsername).fill(username);
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* Setting password in configuration form
|
|
859
|
+
* @param password
|
|
860
|
+
* @returns
|
|
861
|
+
*/ async setPassword(password) {
|
|
862
|
+
await this.findElementInSection(this.inputPassword).fill(password);
|
|
863
|
+
}
|
|
864
|
+
/**
|
|
865
|
+
* Setting host name in configuration form
|
|
866
|
+
* @param hostname
|
|
867
|
+
* @returns
|
|
868
|
+
*/ async setHostName(hostname) {
|
|
869
|
+
await this.findElementInSection(this.inputHostName).fill(hostname);
|
|
591
870
|
}
|
|
592
871
|
}
|
|
593
872
|
|
|
594
873
|
|
|
595
|
-
class $
|
|
874
|
+
class $e0ba9f6e7147a59d$export$ad55ec59bf82c4fc {
|
|
875
|
+
constructor(page1, page){
|
|
876
|
+
this.configPage = page1;
|
|
877
|
+
this.page = page;
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
class $c4efd1bbc33bdc4e$export$8ef81de2d4ebb0b9 extends (0, $7d546dcaafadc158$export$2b65d1d97338f32b) {
|
|
596
883
|
constructor(page){
|
|
597
884
|
super(page);
|
|
598
|
-
this.
|
|
599
|
-
this.
|
|
885
|
+
this.contextMenu = new (0, $6d0b1fc17db4a5fb$export$133beb65adbc45a3)(page);
|
|
886
|
+
this.form = new (0, $4baf6ba7e224a0ed$export$13ee474454c1948e)(page);
|
|
600
887
|
this.tab = new (0, $f6d52f442cf07ec8$export$3e41faf802a29e71)(page);
|
|
601
|
-
this.
|
|
602
|
-
this.
|
|
888
|
+
this.modal = new (0, $9a8685efb2ff62b1$export$bd6452a745ffdb18)(page);
|
|
889
|
+
this.commonUtil = new (0, $0ced90cc8a4c42e6$export$5a20f96f6e2d29e9)(page);
|
|
890
|
+
this.configForm = new (0, $07a0aa0673096895$export$855563f8bdb36207)(page);
|
|
891
|
+
this.util = new (0, $e0ba9f6e7147a59d$export$ad55ec59bf82c4fc)(this, page);
|
|
603
892
|
}
|
|
604
893
|
}
|
|
605
894
|
|
|
606
895
|
|
|
607
896
|
|
|
608
897
|
|
|
609
|
-
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
class $6bd08aebb33e3379$export$21cde1e6a73cf500 extends (0, $9f5bc0f6324fb5ea$export$a7fed597f4b8afd8) {
|
|
905
|
+
constructor(page){
|
|
906
|
+
super(page.locator(".dip-view-body"));
|
|
907
|
+
this.page = page;
|
|
908
|
+
this.formSection = page.locator(".xl-react-components.xl-react-dip-dynamic-form");
|
|
909
|
+
this.inputName = page.locator('input[name="name"]');
|
|
910
|
+
this.inputLatestVersion = page.locator('input[name="lastVersion"]');
|
|
911
|
+
this.saveButton = page.getByRole("button", {
|
|
912
|
+
name: "Save",
|
|
913
|
+
exact: true
|
|
914
|
+
});
|
|
915
|
+
this.saveAndCloseButton = page.getByRole("button", {
|
|
916
|
+
name: "Save and close",
|
|
917
|
+
exact: true
|
|
918
|
+
});
|
|
919
|
+
this.cancelButton = page.getByRole("button", {
|
|
920
|
+
name: "Cancel",
|
|
921
|
+
exact: true
|
|
922
|
+
});
|
|
923
|
+
this.inputVersion = page.locator("");
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* Expect the label text is available in form.
|
|
927
|
+
* @param label
|
|
928
|
+
*/ async assertLabelText(label) {
|
|
929
|
+
await (0, $lE6ZQ$expect)(this.page.getByText(label, {
|
|
930
|
+
exact: true
|
|
931
|
+
})).toBeVisible();
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* Enter name in name field of the application form
|
|
935
|
+
* @param name
|
|
936
|
+
* @returns
|
|
937
|
+
*/ async enterName(name) {
|
|
938
|
+
return await this.findElementInSection(this.inputName).fill(name);
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* Enter latest version field
|
|
942
|
+
* @param version
|
|
943
|
+
* @returns
|
|
944
|
+
*/ async enterLatestVersion(version) {
|
|
945
|
+
return await this.findElementInSection(this.inputLatestVersion).fill(version);
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* Click save button
|
|
949
|
+
* @returns
|
|
950
|
+
*/ async clickSave() {
|
|
951
|
+
return await this.findElementInSection(this.saveButton).click();
|
|
952
|
+
}
|
|
953
|
+
/**
|
|
954
|
+
* Click save and close button
|
|
955
|
+
* @returns
|
|
956
|
+
*/ async clickSaveAndClose() {
|
|
957
|
+
return await this.findElementInSection(this.saveAndCloseButton).click();
|
|
958
|
+
}
|
|
959
|
+
/**
|
|
960
|
+
* Click cancel button
|
|
961
|
+
* @returns
|
|
962
|
+
*/ async clickCancel() {
|
|
963
|
+
return await this.findElementInSection(this.cancelButton).click();
|
|
964
|
+
}
|
|
965
|
+
/**
|
|
966
|
+
* Expecting save button is disabled
|
|
967
|
+
* @returns
|
|
968
|
+
*/ async assertSaveButtonIsDisabled() {
|
|
969
|
+
return await (0, $lE6ZQ$expect)(this.findElementInSection(this.saveButton)).toBeDisabled();
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* Expecting Save and close button is disabled
|
|
973
|
+
* @returns
|
|
974
|
+
*/ async assertSaveAndCloseButtonIsDisabled() {
|
|
975
|
+
return await (0, $lE6ZQ$expect)(this.findElementInSection(this.saveAndCloseButton)).toBeDisabled();
|
|
976
|
+
}
|
|
977
|
+
/**
|
|
978
|
+
* Enter options in the input field of dropdown to match with suggestion list in form
|
|
979
|
+
* @param fieldName
|
|
980
|
+
* @param value
|
|
981
|
+
*/ async selectVersionOption(fieldName, value) {
|
|
982
|
+
const label = this.formSection.locator('//label[text()="' + fieldName + '"]/parent::div/parent::div');
|
|
983
|
+
await label.locator(".xl-react-components-input input").fill(value);
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
|
|
988
|
+
class $31f14a5153b274ab$export$b8a8d62f66d27fa1 {
|
|
989
|
+
constructor(page1, page){
|
|
990
|
+
this.environmentPage = page1;
|
|
991
|
+
this.page = page;
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
|
|
996
|
+
class $5a95c11425d050d8$export$2c95c5c5be4fb9b0 extends (0, $7d546dcaafadc158$export$2b65d1d97338f32b) {
|
|
610
997
|
constructor(page){
|
|
611
998
|
super(page);
|
|
999
|
+
this.contextMenu = new (0, $6d0b1fc17db4a5fb$export$133beb65adbc45a3)(page);
|
|
1000
|
+
this.form = new (0, $4baf6ba7e224a0ed$export$13ee474454c1948e)(page);
|
|
1001
|
+
this.tab = new (0, $f6d52f442cf07ec8$export$3e41faf802a29e71)(page);
|
|
1002
|
+
this.modal = new (0, $9a8685efb2ff62b1$export$bd6452a745ffdb18)(page);
|
|
1003
|
+
this.commonUtil = new (0, $0ced90cc8a4c42e6$export$5a20f96f6e2d29e9)(page);
|
|
1004
|
+
this.envForm = new (0, $6bd08aebb33e3379$export$21cde1e6a73cf500)(page);
|
|
1005
|
+
this.util = new (0, $31f14a5153b274ab$export$b8a8d62f66d27fa1)(this, page);
|
|
612
1006
|
}
|
|
613
1007
|
}
|
|
614
1008
|
|
|
615
1009
|
|
|
616
1010
|
|
|
1011
|
+
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
class $bf1ec3be2f174e87$export$1f6beddb119e759b extends (0, $7d546dcaafadc158$export$2b65d1d97338f32b) {
|
|
1017
|
+
constructor(page){
|
|
1018
|
+
super(page);
|
|
1019
|
+
this.contextMenu = new (0, $6d0b1fc17db4a5fb$export$133beb65adbc45a3)(page);
|
|
1020
|
+
this.form = new (0, $4baf6ba7e224a0ed$export$13ee474454c1948e)(page);
|
|
1021
|
+
this.tab = new (0, $f6d52f442cf07ec8$export$3e41faf802a29e71)(page);
|
|
1022
|
+
this.modal = new (0, $9a8685efb2ff62b1$export$bd6452a745ffdb18)(page);
|
|
1023
|
+
this.commonUtil = new (0, $0ced90cc8a4c42e6$export$5a20f96f6e2d29e9)(page);
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
|
|
617
1028
|
const $114b0b206b8d644f$export$e0969da9b8fb378d = (0, $lE6ZQ$test).extend({
|
|
618
1029
|
loginPage: async ({ page: page }, use)=>{
|
|
619
1030
|
// Set up the fixture.
|
|
@@ -635,6 +1046,21 @@ const $114b0b206b8d644f$export$e0969da9b8fb378d = (0, $lE6ZQ$test).extend({
|
|
|
635
1046
|
const tab = new (0, $f6d52f442cf07ec8$export$3e41faf802a29e71)(page);
|
|
636
1047
|
await use(tab);
|
|
637
1048
|
return tab;
|
|
1049
|
+
},
|
|
1050
|
+
environmentPage: async ({ page: page }, use)=>{
|
|
1051
|
+
const environmentPage = new (0, $5a95c11425d050d8$export$2c95c5c5be4fb9b0)(page);
|
|
1052
|
+
await use(environmentPage);
|
|
1053
|
+
return environmentPage;
|
|
1054
|
+
},
|
|
1055
|
+
configurePage: async ({ page: page }, use)=>{
|
|
1056
|
+
const configurePage = new (0, $c4efd1bbc33bdc4e$export$8ef81de2d4ebb0b9)(page);
|
|
1057
|
+
await use(configurePage);
|
|
1058
|
+
return configurePage;
|
|
1059
|
+
},
|
|
1060
|
+
infraPage: async ({ page: page }, use)=>{
|
|
1061
|
+
const infraPage = new (0, $bf1ec3be2f174e87$export$1f6beddb119e759b)(page);
|
|
1062
|
+
await use(infraPage);
|
|
1063
|
+
return infraPage;
|
|
638
1064
|
}
|
|
639
1065
|
});
|
|
640
1066
|
|