@digital-ai/devops-page-object-release 0.0.15 → 0.0.16
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 +215 -10
- package/dist/main.js.map +1 -1
- package/dist/module.js +215 -10
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +31 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -2,8 +2,8 @@ import {test as $hOLA6$test, expect as $hOLA6$expect} from "@playwright/test";
|
|
|
2
2
|
import {execFile as $hOLA6$execFile} from "child_process";
|
|
3
3
|
import $hOLA6$lodashisNil from "lodash/isNil";
|
|
4
4
|
import {env as $hOLA6$env} from "process";
|
|
5
|
-
import {promises as $hOLA6$promises} from "fs";
|
|
6
5
|
import $hOLA6$moment from "moment";
|
|
6
|
+
import {promises as $hOLA6$promises} from "fs";
|
|
7
7
|
import $hOLA6$lodashisUndefined from "lodash/isUndefined";
|
|
8
8
|
import $hOLA6$lodasheach from "lodash/each";
|
|
9
9
|
import $hOLA6$lodashforEach from "lodash/forEach";
|
|
@@ -504,13 +504,18 @@ class $9c357602b6f466e7$export$aa59788fdecae2f2 extends (0, $9626bc9256ce31f7$ex
|
|
|
504
504
|
hasText: fileName
|
|
505
505
|
}).click();
|
|
506
506
|
await this.page.getByLabel("delete file").click();
|
|
507
|
+
await this.page.getByRole("button", {
|
|
508
|
+
name: "Delete"
|
|
509
|
+
}).waitFor({
|
|
510
|
+
state: "visible"
|
|
511
|
+
});
|
|
507
512
|
await this.page.getByRole("button", {
|
|
508
513
|
name: "Delete"
|
|
509
514
|
}).click();
|
|
510
515
|
}
|
|
511
516
|
async expectWithNoAttachment(tempFile) {
|
|
512
|
-
const test = await this.page.locator(".task-attachments-grid .file-item-text").
|
|
513
|
-
if (test) await (0, $hOLA6$expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toContainText(tempFile);
|
|
517
|
+
const test = await this.page.locator(".task-attachments-grid .file-item-text").count();
|
|
518
|
+
if (test > 0) await (0, $hOLA6$expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toContainText(tempFile);
|
|
514
519
|
else await (0, $hOLA6$expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toBeVisible();
|
|
515
520
|
}
|
|
516
521
|
}
|
|
@@ -591,11 +596,40 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
|
|
|
591
596
|
await this.page.locator(".icon-fullscreen-exit").click();
|
|
592
597
|
await (0, $hOLA6$expect)(this.page.locator(".icon-fullscreen-exit")).not.toBeVisible();
|
|
593
598
|
}
|
|
599
|
+
async expectAssignedTo(username) {
|
|
600
|
+
await (0, $hOLA6$expect)(this.page.getByRole("button", {
|
|
601
|
+
name: username
|
|
602
|
+
})).toBeVisible();
|
|
603
|
+
}
|
|
604
|
+
async assignToMe(userName, existingUsername) {
|
|
605
|
+
await this.page.getByRole("button", {
|
|
606
|
+
name: existingUsername
|
|
607
|
+
}).click();
|
|
608
|
+
await this.page.getByTestId(`render-option-${userName}`).click();
|
|
609
|
+
}
|
|
610
|
+
async setFlag(flagName, flagComment) {
|
|
611
|
+
await this.page.getByTestId("flag-btn").click();
|
|
612
|
+
await this.page.getByLabel(flagName).click();
|
|
613
|
+
await this.page.getByPlaceholder("Set message").click();
|
|
614
|
+
await this.page.getByPlaceholder("Set message").fill(flagComment);
|
|
615
|
+
await this.page.getByPlaceholder("Set message").press("Enter");
|
|
616
|
+
await (0, $hOLA6$expect)(this.page.getByRole("button", {
|
|
617
|
+
name: `flag icon ${flagComment}`
|
|
618
|
+
})).toBeVisible();
|
|
619
|
+
}
|
|
620
|
+
async expectFlaggedWith(flagName, flagComment) {
|
|
621
|
+
await this.page.getByRole("button", {
|
|
622
|
+
name: "flag icon"
|
|
623
|
+
}).click();
|
|
624
|
+
const regexPattern = new RegExp(`${flagComment}.*${flagName}`, "i");
|
|
625
|
+
await (0, $hOLA6$expect)(this.page.getByText(regexPattern)).toBeVisible();
|
|
626
|
+
}
|
|
594
627
|
}
|
|
595
628
|
|
|
596
629
|
|
|
597
630
|
|
|
598
631
|
|
|
632
|
+
|
|
599
633
|
class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
600
634
|
constructor(page){
|
|
601
635
|
super(page);
|
|
@@ -628,9 +662,10 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
|
|
|
628
662
|
async save() {
|
|
629
663
|
await this.page.getByRole("button", {
|
|
630
664
|
name: "Save"
|
|
631
|
-
}).
|
|
632
|
-
|
|
633
|
-
|
|
665
|
+
}).waitFor();
|
|
666
|
+
await this.page.getByRole("button", {
|
|
667
|
+
name: "Save"
|
|
668
|
+
}).click();
|
|
634
669
|
await (0, $hOLA6$expect)(this.page.locator(".form-footer .last-saved")).toBeVisible();
|
|
635
670
|
}
|
|
636
671
|
async reset() {
|
|
@@ -676,6 +711,98 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
|
|
|
676
711
|
}).locator("span").click();
|
|
677
712
|
await this.page.getByText("Remove").click();
|
|
678
713
|
}
|
|
714
|
+
async expectVariableDisplayed(variable, present) {
|
|
715
|
+
if (present) await (0, $hOLA6$expect)(this.page.locator(`#release-properties .form-group`, {
|
|
716
|
+
hasText: variable
|
|
717
|
+
})).toHaveCount(1);
|
|
718
|
+
else await (0, $hOLA6$expect)(this.page.locator(`#release-properties .form-group`, {
|
|
719
|
+
hasText: variable
|
|
720
|
+
})).toHaveCount(0);
|
|
721
|
+
}
|
|
722
|
+
async setScheduledStartDate(date, monthYear) {
|
|
723
|
+
await this.page.locator(`.scheduled-start-date .date`).click();
|
|
724
|
+
const prev = this.page.locator(".datepicker-days .prev");
|
|
725
|
+
const next = this.page.locator(".datepicker-days .next");
|
|
726
|
+
const monYear = this.page.locator(".datepicker-days .datepicker-switch");
|
|
727
|
+
const thisMonth = (0, $hOLA6$moment)(monthYear, "MMMM YYYY").isBefore();
|
|
728
|
+
while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
|
|
729
|
+
else await next.click();
|
|
730
|
+
await this.page.getByRole("cell", {
|
|
731
|
+
name: "" + date + ""
|
|
732
|
+
}).first().click();
|
|
733
|
+
}
|
|
734
|
+
async setScheduledStartTime(hrs, mins, meridian) {
|
|
735
|
+
await this.page.locator(".scheduled-start-date .time-picker-holder").click();
|
|
736
|
+
if (typeof hrs !== "undefined") {
|
|
737
|
+
await this.page.locator(".bootstrap-timepicker-hour").click();
|
|
738
|
+
await this.page.locator(".bootstrap-timepicker-hour").clear();
|
|
739
|
+
await this.page.locator(".bootstrap-timepicker-hour").fill(hrs);
|
|
740
|
+
}
|
|
741
|
+
if (typeof mins !== "undefined") {
|
|
742
|
+
await this.page.locator(".bootstrap-timepicker-minute").click();
|
|
743
|
+
await this.page.locator(".bootstrap-timepicker-minute").clear();
|
|
744
|
+
await this.page.locator(".bootstrap-timepicker-minute").fill(mins);
|
|
745
|
+
}
|
|
746
|
+
if (typeof meridian !== "undefined") {
|
|
747
|
+
await this.page.locator(".bootstrap-timepicker-meridian").click();
|
|
748
|
+
await this.page.locator(".bootstrap-timepicker-meridian").clear();
|
|
749
|
+
await this.page.locator(".bootstrap-timepicker-meridian").fill(meridian);
|
|
750
|
+
}
|
|
751
|
+
await this.page.keyboard.press("Escape");
|
|
752
|
+
}
|
|
753
|
+
async setDuration(days, hours, mins) {
|
|
754
|
+
await this.page.locator(".duration-editor").click();
|
|
755
|
+
if (typeof days !== "undefined") {
|
|
756
|
+
await this.page.locator(".days").click();
|
|
757
|
+
await this.page.locator(".days").clear();
|
|
758
|
+
await this.page.locator(".days").fill(days);
|
|
759
|
+
}
|
|
760
|
+
if (typeof hours !== "undefined") {
|
|
761
|
+
await this.page.locator(".hours").click();
|
|
762
|
+
await this.page.locator(".hours").clear();
|
|
763
|
+
await this.page.locator(".hours").fill(hours);
|
|
764
|
+
}
|
|
765
|
+
if (typeof mins !== "undefined") {
|
|
766
|
+
await this.page.locator(".minutes").click();
|
|
767
|
+
await this.page.locator(".minutes").clear();
|
|
768
|
+
await this.page.locator(".minutes").fill(mins);
|
|
769
|
+
}
|
|
770
|
+
await this.page.keyboard.press("Escape");
|
|
771
|
+
}
|
|
772
|
+
async expectScheduledStartDateToBe(date) {
|
|
773
|
+
(0, $hOLA6$expect)(await this.page.locator(`.scheduled-start-date .date input`).getAttribute("value")).toContain(date);
|
|
774
|
+
}
|
|
775
|
+
async expectScheduledStartTimeToBe(date) {
|
|
776
|
+
(0, $hOLA6$expect)(await this.page.locator(`.scheduled-start-date .time input`).getAttribute("value")).toContain(date);
|
|
777
|
+
}
|
|
778
|
+
async expectDueDateToBe(date) {
|
|
779
|
+
(0, $hOLA6$expect)(await this.page.locator(".due-date .date input").getAttribute("value")).toContain(date);
|
|
780
|
+
}
|
|
781
|
+
async expectedDueDateTime(time) {
|
|
782
|
+
(0, $hOLA6$expect)(await this.page.locator(".due-date .time input").getAttribute("value")).toContain(time);
|
|
783
|
+
}
|
|
784
|
+
async expectDurationToBe(duration) {
|
|
785
|
+
(0, $hOLA6$expect)(await this.page.locator(".duration-editor").textContent()).toBe(duration);
|
|
786
|
+
}
|
|
787
|
+
async setDueDate(hrs, min, meridian) {
|
|
788
|
+
await this.page.locator(".due-date .time-picker-holder").click();
|
|
789
|
+
if (typeof hrs !== "undefined") {
|
|
790
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-hour").click();
|
|
791
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-hour").clear();
|
|
792
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-hour").fill(hrs);
|
|
793
|
+
}
|
|
794
|
+
if (typeof min !== "undefined") {
|
|
795
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-minute").click();
|
|
796
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-minute").clear();
|
|
797
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-minute").fill(min);
|
|
798
|
+
}
|
|
799
|
+
if (typeof meridian !== "undefined") {
|
|
800
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-meridian").click();
|
|
801
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-meridian").clear();
|
|
802
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-meridian").fill(meridian);
|
|
803
|
+
}
|
|
804
|
+
await this.page.keyboard.press("Escape");
|
|
805
|
+
}
|
|
679
806
|
}
|
|
680
807
|
|
|
681
808
|
|
|
@@ -700,6 +827,16 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
700
827
|
getPhase(phaseName) {
|
|
701
828
|
return new $43cbcdfccb6c2a76$var$Phase(this.page, phaseName);
|
|
702
829
|
}
|
|
830
|
+
async expectNotFlagged() {
|
|
831
|
+
await (0, $hOLA6$expect)(this.page.locator(".flag-none-icon")).toBeHidden();
|
|
832
|
+
}
|
|
833
|
+
async expectFlagOnTaskCard() {
|
|
834
|
+
await (0, $hOLA6$expect)(this.page.locator(".risk-flag-icon")).toBeVisible();
|
|
835
|
+
}
|
|
836
|
+
async refresh() {
|
|
837
|
+
await this.page.reload();
|
|
838
|
+
await this.page.waitForSelector("#release");
|
|
839
|
+
}
|
|
703
840
|
async start() {
|
|
704
841
|
await this.page.getByTestId("start-btn").click();
|
|
705
842
|
await this.page.getByRole("button", {
|
|
@@ -753,6 +890,25 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
753
890
|
timeout: 10000
|
|
754
891
|
});
|
|
755
892
|
}
|
|
893
|
+
async waitForTaskPlanned(title) {
|
|
894
|
+
await (0, $hOLA6$expect)(this.page.locator(`.task:has-text('${title}').planned`)).toBeVisible();
|
|
895
|
+
}
|
|
896
|
+
async openManualTaskDetails(title) {
|
|
897
|
+
await this.page.locator(`text=${title}`).click({
|
|
898
|
+
force: true
|
|
899
|
+
});
|
|
900
|
+
await (0, $hOLA6$expect)(this.page.locator("div").filter({
|
|
901
|
+
hasText: title
|
|
902
|
+
}).first()).toBeVisible();
|
|
903
|
+
}
|
|
904
|
+
async reopenTask(comment) {
|
|
905
|
+
await this.page.locator("div").filter({
|
|
906
|
+
hasText: /^Reopen$/
|
|
907
|
+
}).click();
|
|
908
|
+
await this.page.getByTestId("task-action-comment").click();
|
|
909
|
+
await this.page.getByTestId("task-action-comment").fill(comment);
|
|
910
|
+
await this.page.getByTestId("task-action-confirm").click();
|
|
911
|
+
}
|
|
756
912
|
async openTaskDrawer(taskName) {
|
|
757
913
|
await this.page.locator(".task-header").getByText(taskName, {
|
|
758
914
|
exact: true
|
|
@@ -849,7 +1005,12 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
849
1005
|
}
|
|
850
1006
|
}
|
|
851
1007
|
async expectTitleToBeInBreadcrumbLink(title) {
|
|
852
|
-
(0, $hOLA6$expect)(this.page.locator(".dot-breadcrumbs a", {
|
|
1008
|
+
await (0, $hOLA6$expect)(this.page.locator(".dot-breadcrumbs a", {
|
|
1009
|
+
hasText: title
|
|
1010
|
+
})).toBeVisible();
|
|
1011
|
+
}
|
|
1012
|
+
async expectHasPhase(title) {
|
|
1013
|
+
await (0, $hOLA6$expect)(this.page.locator(`#release-content .phase-title`, {
|
|
853
1014
|
hasText: title
|
|
854
1015
|
})).toBeVisible();
|
|
855
1016
|
}
|
|
@@ -1305,7 +1466,23 @@ class $c37c93912f458e81$export$60c3bfa6385e2a10 extends (0, $9626bc9256ce31f7$ex
|
|
|
1305
1466
|
}
|
|
1306
1467
|
async openTask(taskName) {
|
|
1307
1468
|
await this.filterTaskByTitle(taskName);
|
|
1308
|
-
await this.page.getByText(taskName).click();
|
|
1469
|
+
await this.page.getByText(taskName).first().click();
|
|
1470
|
+
}
|
|
1471
|
+
async skip(taskName, comment) {
|
|
1472
|
+
await this.page.locator(`.row.task-inner`, {
|
|
1473
|
+
hasText: taskName
|
|
1474
|
+
}).locator("span.skip").click();
|
|
1475
|
+
await this.page.getByPlaceholder("Give feedback or place a comment...").click();
|
|
1476
|
+
await this.page.getByPlaceholder("Give feedback or place a comment...").fill(comment);
|
|
1477
|
+
await this.page.getByRole("button", {
|
|
1478
|
+
name: "Skip",
|
|
1479
|
+
exact: true
|
|
1480
|
+
}).click();
|
|
1481
|
+
}
|
|
1482
|
+
async waitForTaskInProgress(taskName) {
|
|
1483
|
+
await (0, $hOLA6$expect)(this.page.locator(`.row.task-inner`, {
|
|
1484
|
+
hasText: taskName
|
|
1485
|
+
}).getByText("In progress")).toBeVisible();
|
|
1309
1486
|
}
|
|
1310
1487
|
async openTaskInReleaseView(taskName) {
|
|
1311
1488
|
await this.page.locator(`.row.task-inner`, {
|
|
@@ -1317,13 +1494,18 @@ class $c37c93912f458e81$export$60c3bfa6385e2a10 extends (0, $9626bc9256ce31f7$ex
|
|
|
1317
1494
|
hasText: taskName
|
|
1318
1495
|
}).locator(`.calendar-link a`).click();
|
|
1319
1496
|
}
|
|
1497
|
+
async openTaskDrawer(taskName) {
|
|
1498
|
+
await this.page.locator(`.row.task-inner`, {
|
|
1499
|
+
hasText: taskName
|
|
1500
|
+
}).getByText(taskName).click();
|
|
1501
|
+
}
|
|
1320
1502
|
async filterTaskByTitle(taskname) {
|
|
1321
|
-
await this.page.locator(".
|
|
1503
|
+
await this.page.locator(".searchFilter").click();
|
|
1322
1504
|
await this.page.locator(".searchFilter").fill(taskname);
|
|
1323
1505
|
await this.page.locator(".searchFilter").press("Enter");
|
|
1324
1506
|
await (0, $hOLA6$expect)(this.page.locator("//div[@data-task-title]").filter({
|
|
1325
1507
|
hasText: taskname
|
|
1326
|
-
})).toBeVisible();
|
|
1508
|
+
}).first()).toBeVisible();
|
|
1327
1509
|
}
|
|
1328
1510
|
async filterTasksByTag(tag, taskTitleForValidation) {
|
|
1329
1511
|
await this.page.locator(".toggle-search-filter").click();
|
|
@@ -1358,6 +1540,24 @@ class $c37c93912f458e81$export$60c3bfa6385e2a10 extends (0, $9626bc9256ce31f7$ex
|
|
|
1358
1540
|
await (0, $hOLA6$expect)(this.page.locator(".view-in-release")).not.toBeVisible();
|
|
1359
1541
|
}
|
|
1360
1542
|
}
|
|
1543
|
+
async openTaskList() {
|
|
1544
|
+
await this.page.goto("./#/tasks");
|
|
1545
|
+
}
|
|
1546
|
+
async clickOnAssigneeButton(title) {
|
|
1547
|
+
await this.page.locator(`.btn-group-filter.btn-group button.btn.btn-flat[title="${title}"]`).click();
|
|
1548
|
+
}
|
|
1549
|
+
async assignTaskToMe(title) {
|
|
1550
|
+
await this.page.locator(`.task-line`).filter({
|
|
1551
|
+
hasText: title
|
|
1552
|
+
}).locator(`.assign-to-me`).click();
|
|
1553
|
+
await this.page.locator('.modal:visible >> text="Assign to me"').click();
|
|
1554
|
+
}
|
|
1555
|
+
async expectTaskAssignedToMe(title) {
|
|
1556
|
+
await this.expectTaskAssignedTo(title, "me");
|
|
1557
|
+
}
|
|
1558
|
+
async expectTaskAssignedTo(title, user) {
|
|
1559
|
+
await (0, $hOLA6$expect)(this.page.locator(`.task-line:has-text("${title}") >> text="${user}"`).first()).toHaveCount(1);
|
|
1560
|
+
}
|
|
1361
1561
|
async expectTaskTitle(taskTitle) {
|
|
1362
1562
|
(0, $hOLA6$expect)(await this.page.locator("#tasks0").innerText()).toContain(taskTitle);
|
|
1363
1563
|
}
|
|
@@ -2017,6 +2217,7 @@ class $4444bee76761dfb1$export$f14c0e3f98d164c0 extends (0, $9626bc9256ce31f7$ex
|
|
|
2017
2217
|
timeout: 10000
|
|
2018
2218
|
});
|
|
2019
2219
|
await this.page.waitForTimeout(1000);
|
|
2220
|
+
await this.closePendoModalWindow();
|
|
2020
2221
|
}
|
|
2021
2222
|
/**
|
|
2022
2223
|
* Logout as authenticated user
|
|
@@ -2039,6 +2240,10 @@ class $4444bee76761dfb1$export$f14c0e3f98d164c0 extends (0, $9626bc9256ce31f7$ex
|
|
|
2039
2240
|
const val = await this.page.locator("top-toolbar .avatar-wrapper span.dot-tooltip").getAttribute("aria-label");
|
|
2040
2241
|
(0, $hOLA6$expect)(val).toContain(username);
|
|
2041
2242
|
}
|
|
2243
|
+
async closePendoModalWindow() {
|
|
2244
|
+
await this.page.waitForTimeout(1000);
|
|
2245
|
+
if (await this.page.locator("._pendo-close-guide").count() > 0) await this.page.locator("._pendo-close-guide").click();
|
|
2246
|
+
}
|
|
2042
2247
|
}
|
|
2043
2248
|
|
|
2044
2249
|
|