@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/main.js
CHANGED
|
@@ -330,24 +330,83 @@ class $7dcee016eeec0e08$export$f14c0e3f98d164c0 extends (0, $ae23b16684112d0b$ex
|
|
|
330
330
|
|
|
331
331
|
|
|
332
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
|
+
|
|
333
383
|
|
|
334
|
-
class $
|
|
384
|
+
class $0a8f56f4ec9e6ec3$export$3e41faf802a29e71 extends (0, $ae23b16684112d0b$export$2b65d1d97338f32b) {
|
|
335
385
|
constructor(page){
|
|
336
|
-
super(page
|
|
386
|
+
super(page);
|
|
337
387
|
this.page = page;
|
|
338
|
-
this.
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
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
|
|
345
395
|
});
|
|
396
|
+
}
|
|
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;
|
|
346
408
|
this.applicationLocator = page.locator('div[data-id="Applications"]');
|
|
347
|
-
this.
|
|
348
|
-
name: "Delete",
|
|
349
|
-
exact: true
|
|
350
|
-
});
|
|
409
|
+
this.environmentLocator = page.locator('div[data-id="Environments"]');
|
|
351
410
|
}
|
|
352
411
|
/**
|
|
353
412
|
* Click on application CI in contextual-menu option.
|
|
@@ -356,6 +415,12 @@ class $b375bc430f279b15$export$b477143f7ffae077 extends (0, $7149ac56b8ddfcf1$ex
|
|
|
356
415
|
await this.openContextualMenuDots();
|
|
357
416
|
}
|
|
358
417
|
/**
|
|
418
|
+
* Click on application CI in contextual-menu option.
|
|
419
|
+
*/ async clickEnvironmentCi() {
|
|
420
|
+
await this.environmentLocator.click();
|
|
421
|
+
await this.openContextualMenuDots();
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
359
424
|
* Click on menu items from contextual-menu option using path navigation option
|
|
360
425
|
* @param path: Provide menu navigation path using array
|
|
361
426
|
* eg: ['new','Application'] -> to click on menu to create new application
|
|
@@ -382,7 +447,7 @@ class $50f6953b9762c03c$export$a7fed597f4b8afd8 extends (0, $b031bda8df4df200$ex
|
|
|
382
447
|
}
|
|
383
448
|
|
|
384
449
|
|
|
385
|
-
class $
|
|
450
|
+
class $f0e8ecb73642aac7$export$13ee474454c1948e extends (0, $50f6953b9762c03c$export$a7fed597f4b8afd8) {
|
|
386
451
|
constructor(page){
|
|
387
452
|
super(page.locator(".dip-view-body"));
|
|
388
453
|
this.page = page;
|
|
@@ -400,6 +465,8 @@ class $b90c33a29683027b$export$60413e28724d3abd extends (0, $50f6953b9762c03c$ex
|
|
|
400
465
|
name: "Cancel",
|
|
401
466
|
exact: true
|
|
402
467
|
});
|
|
468
|
+
this.errorMessage = page.locator(".error");
|
|
469
|
+
this.formSection = page.locator(".xl-react-components.xl-react-dip-dynamic-form");
|
|
403
470
|
}
|
|
404
471
|
/**
|
|
405
472
|
* Enter name in name field of the application form
|
|
@@ -445,72 +512,88 @@ class $b90c33a29683027b$export$60413e28724d3abd extends (0, $50f6953b9762c03c$ex
|
|
|
445
512
|
*/ async assertSaveAndCloseButtonIsDisabled() {
|
|
446
513
|
return await (0, $1UEKj$playwrighttest.expect)(this.findElementInSection(this.saveAndCloseButton)).toBeDisabled();
|
|
447
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
|
+
}
|
|
448
533
|
}
|
|
449
534
|
|
|
450
535
|
|
|
451
536
|
|
|
452
|
-
class $
|
|
453
|
-
constructor(
|
|
454
|
-
|
|
455
|
-
this.
|
|
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");
|
|
456
543
|
}
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
"
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
await this.applicationPage.appForm.clickSaveAndClose();
|
|
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
|
+
});
|
|
472
558
|
}
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
* @param appName
|
|
476
|
-
* @param expectedCiType
|
|
477
|
-
*/ async createNewApplication(appName, expectedCiType) {
|
|
478
|
-
await this.applicationPage.appMenu.clickApplicationCi();
|
|
479
|
-
await this.applicationPage.appMenu.clickMenuPath([
|
|
480
|
-
"new",
|
|
481
|
-
"application"
|
|
482
|
-
]);
|
|
483
|
-
await this.applicationPage.appForm.assertSaveButtonIsDisabled();
|
|
484
|
-
await this.applicationPage.appForm.assertSaveAndCloseButtonIsDisabled();
|
|
485
|
-
await this.applicationPage.appForm.enterName(appName);
|
|
486
|
-
await this.applicationPage.appForm.clickSaveAndClose();
|
|
487
|
-
await this.applicationPage.tab.assertActiveTabSelector(expectedCiType);
|
|
559
|
+
async clickDelete() {
|
|
560
|
+
await this.footer.locator(this.deleteButton).click();
|
|
488
561
|
}
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
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);
|
|
497
580
|
}
|
|
498
581
|
/**
|
|
499
|
-
* Create new ci
|
|
582
|
+
* Create new ci under any explorer package by providing following parameters.
|
|
500
583
|
* @param parentNodeId
|
|
501
584
|
* @param menuPath
|
|
502
585
|
* @param expectedCiType
|
|
503
|
-
* @param
|
|
504
|
-
*/ async createNewCi(parentNodeId, menuPath,
|
|
586
|
+
* @param fieldName
|
|
587
|
+
*/ async createNewCi(parentNodeId, menuPath, fieldName) {
|
|
505
588
|
await this.expandNodePath(parentNodeId);
|
|
506
589
|
await this.page.locator('div[data-id="' + parentNodeId + '"]').click();
|
|
507
590
|
await this.page.locator('i[data-id="' + parentNodeId + '"].context-menu-button').click();
|
|
508
|
-
await this.
|
|
509
|
-
await this.
|
|
510
|
-
await this.
|
|
511
|
-
await this.
|
|
512
|
-
await this.
|
|
513
|
-
await this.
|
|
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();
|
|
514
597
|
}
|
|
515
598
|
/**
|
|
516
599
|
* Expand the ci path tree toggler.
|
|
@@ -540,85 +623,413 @@ class $dcea22adf7bc9211$export$7db63d2c950874b5 {
|
|
|
540
623
|
*/ async deleteCi(node) {
|
|
541
624
|
await this.page.locator('div[data-id="' + node + '"]').click();
|
|
542
625
|
await this.page.locator('i[data-id="' + node + '"].context-menu-button').click();
|
|
543
|
-
await this.
|
|
626
|
+
await this.contextMenu.clickMenuPath([
|
|
544
627
|
"delete"
|
|
545
628
|
]);
|
|
546
|
-
await this.
|
|
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 + "");
|
|
547
651
|
}
|
|
548
652
|
}
|
|
549
653
|
|
|
550
654
|
|
|
551
655
|
|
|
552
656
|
|
|
553
|
-
class $
|
|
657
|
+
class $b90c33a29683027b$export$60413e28724d3abd extends (0, $50f6953b9762c03c$export$a7fed597f4b8afd8) {
|
|
554
658
|
constructor(page){
|
|
555
|
-
super(page);
|
|
659
|
+
super(page.locator(".dip-view-body"));
|
|
556
660
|
this.page = page;
|
|
557
|
-
this.
|
|
558
|
-
this.
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
ignoreCase: true
|
|
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
|
|
563
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();
|
|
564
720
|
}
|
|
565
721
|
}
|
|
566
722
|
|
|
567
723
|
|
|
568
|
-
|
|
569
|
-
class $749097e2d65c1527$export$2b77a92f1a5ad772 extends (0, $b031bda8df4df200$export$6e2c8f0811a474ce) {
|
|
724
|
+
class $1fae0b7de3d21f52$export$bf4a5dd3be690f6b extends (0, $ae23b16684112d0b$export$2b65d1d97338f32b) {
|
|
570
725
|
constructor(page){
|
|
571
|
-
super(page
|
|
572
|
-
this.
|
|
573
|
-
this.
|
|
574
|
-
this.
|
|
726
|
+
super(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);
|
|
575
734
|
}
|
|
576
735
|
}
|
|
577
736
|
|
|
578
737
|
|
|
579
|
-
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
class $114862ed97d76403$export$36d69433c4f81145 extends (0, $ae23b16684112d0b$export$2b65d1d97338f32b) {
|
|
580
741
|
constructor(page){
|
|
581
742
|
super(page);
|
|
582
|
-
|
|
583
|
-
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
|
|
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",
|
|
584
768
|
exact: true
|
|
585
769
|
});
|
|
586
770
|
this.cancelButton = page.getByRole("button", {
|
|
587
771
|
name: "Cancel",
|
|
588
772
|
exact: true
|
|
589
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"]');
|
|
590
781
|
}
|
|
591
|
-
|
|
592
|
-
|
|
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);
|
|
593
788
|
}
|
|
594
|
-
|
|
595
|
-
|
|
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);
|
|
596
875
|
}
|
|
597
876
|
}
|
|
598
877
|
|
|
599
878
|
|
|
600
|
-
class $
|
|
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) {
|
|
601
888
|
constructor(page){
|
|
602
889
|
super(page);
|
|
603
|
-
this.
|
|
604
|
-
this.
|
|
890
|
+
this.contextMenu = new (0, $9dd8dd888e812fd7$export$133beb65adbc45a3)(page);
|
|
891
|
+
this.form = new (0, $f0e8ecb73642aac7$export$13ee474454c1948e)(page);
|
|
605
892
|
this.tab = new (0, $0a8f56f4ec9e6ec3$export$3e41faf802a29e71)(page);
|
|
606
|
-
this.
|
|
607
|
-
this.
|
|
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);
|
|
608
897
|
}
|
|
609
898
|
}
|
|
610
899
|
|
|
611
900
|
|
|
612
901
|
|
|
613
902
|
|
|
614
|
-
|
|
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) {
|
|
615
1002
|
constructor(page){
|
|
616
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);
|
|
617
1011
|
}
|
|
618
1012
|
}
|
|
619
1013
|
|
|
620
1014
|
|
|
621
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
|
+
|
|
622
1033
|
const $3352700e95ddc19e$export$e0969da9b8fb378d = (0, $1UEKj$playwrighttest.test).extend({
|
|
623
1034
|
loginPage: async ({ page: page }, use)=>{
|
|
624
1035
|
// Set up the fixture.
|
|
@@ -640,6 +1051,21 @@ const $3352700e95ddc19e$export$e0969da9b8fb378d = (0, $1UEKj$playwrighttest.test
|
|
|
640
1051
|
const tab = new (0, $0a8f56f4ec9e6ec3$export$3e41faf802a29e71)(page);
|
|
641
1052
|
await use(tab);
|
|
642
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;
|
|
643
1069
|
}
|
|
644
1070
|
});
|
|
645
1071
|
|