@digital-ai/devops-page-object-release 0.0.17 → 0.0.18

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/module.js CHANGED
@@ -394,18 +394,12 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
394
394
  }
395
395
  async expectDependencyText(dependencies) {
396
396
  await (0, $hOLA6$expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
397
- await (0, $hOLA6$expect)(this.page.getByRole("link", {
398
- name: dependencies,
399
- exact: true
400
- }).first()).toBeVisible();
397
+ await (0, $hOLA6$expect)(this.page.locator(`.gate-task-dependencies`).getByLabel(dependencies).first()).toBeVisible();
401
398
  }
402
399
  async clickEditDependency(dependencies) {
403
400
  const depOptionsIcon = this.page.locator(".dependency").filter({
404
- has: this.page.getByRole("link", {
405
- name: dependencies,
406
- exact: true
407
- })
408
- }).locator(".icon-options");
401
+ has: this.page.getByLabel(dependencies)
402
+ }).locator(".actions");
409
403
  await depOptionsIcon.isVisible();
410
404
  await depOptionsIcon.click();
411
405
  const frame = this.page.getByTestId("undefined-menu");
@@ -460,12 +454,18 @@ class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$ex
460
454
  async setPhase(phaseTitle) {
461
455
  await this.phase.click();
462
456
  await this.phase.fill("");
463
- await this.page.getByRole("option", {
457
+ const count = await this.page.getByRole("option", {
464
458
  name: phaseTitle
465
- }).waitFor();
466
- await this.page.getByRole("option", {
459
+ }).count();
460
+ if (count > 0) await this.page.getByRole("option", {
467
461
  name: phaseTitle
468
462
  }).click();
463
+ else {
464
+ await this.page.locator(".phase-dependency").getByLabel("Open").click();
465
+ await this.page.getByRole("option", {
466
+ name: phaseTitle
467
+ }).click();
468
+ }
469
469
  }
470
470
  async setTask(taskTitle) {
471
471
  await this.task.click();
@@ -593,6 +593,9 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
593
593
  name: "arrow-down icon",
594
594
  exact: true
595
595
  });
596
+ this.completeButton = this.page.getByRole("button", {
597
+ name: "Complete"
598
+ });
596
599
  }
597
600
  async openOverviewRail() {
598
601
  await this.openRail("Overview");
@@ -639,6 +642,11 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
639
642
  await this.commentBox.fill(comment);
640
643
  await this.confirm.click();
641
644
  }
645
+ async completeTask(comment) {
646
+ await this.completeButton.click();
647
+ await this.commentBox.fill(comment);
648
+ await this.confirm.click();
649
+ }
642
650
  async expectTaskTitle(taskTitle) {
643
651
  (0, $hOLA6$expect)(await this.page.locator(".task-drawer .task-title-input .dot-view-mode-typography").innerText()).toContain(taskTitle);
644
652
  }
@@ -666,6 +674,42 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
666
674
  name: username
667
675
  })).toBeVisible();
668
676
  }
677
+ async expectStartNowButtonToBeVisible() {
678
+ await (0, $hOLA6$expect)(this.page.getByTestId("single-action-button")).toBeVisible();
679
+ }
680
+ async startNow(comment) {
681
+ await this.page.getByTestId("single-action-button").click();
682
+ await this.page.getByTestId("task-action-comment").fill(comment);
683
+ await this.page.getByTestId("dot-button").click();
684
+ await (0, $hOLA6$expect)(this.page.getByTestId("single-action-button")).not.toBeVisible();
685
+ }
686
+ async expectCommentsToContain(text) {
687
+ await (0, $hOLA6$expect)(this.page.locator(".task-comment-body .markdown-wrapper p")).toContainText(text);
688
+ }
689
+ async switchWaitForScheduledDate() {
690
+ await this.page.locator(".wait-for-start input").click();
691
+ }
692
+ async expectWaitForScheduledDateToBeChecked() {
693
+ await (0, $hOLA6$expect)(this.page.locator(".wait-for-start input")).toBeChecked();
694
+ }
695
+ async expectWaitForScheduledDateToBeUnchecked() {
696
+ await (0, $hOLA6$expect)(this.page.locator(".wait-for-start input")).not.toBeChecked();
697
+ }
698
+ // Other locators are flaky and it can be replaced if we get locator change in the frontend
699
+ async clickOnStartDate() {
700
+ await this.page.getByTestId("month-and-year").first().click();
701
+ }
702
+ async removeStartDate() {
703
+ await this.page.getByRole("button", {
704
+ name: "Set by user"
705
+ }).locator(".MuiChip-deleteIcon").click();
706
+ }
707
+ async setStartDate(date) {
708
+ await this.clickOnStartDate();
709
+ await this.page.locator(".MuiPickersDay-root", {
710
+ hasText: date
711
+ }).click();
712
+ }
669
713
  async assignToMe(userName, existingUsername) {
670
714
  await this.page.getByRole("button", {
671
715
  name: existingUsername
@@ -921,6 +965,49 @@ class $71075ce65fcede1d$export$9b575f14aa5e09a1 extends (0, $9626bc9256ce31f7$ex
921
965
  const value = await input.inputValue();
922
966
  (0, $hOLA6$expect)(value).toBe(formattedDate);
923
967
  }
968
+ /**
969
+ *
970
+ * @returns Getting current month and year in the format "MonthName YYYY"
971
+ */ async getCurrentMonthYear() {
972
+ const monthNames = [
973
+ "January",
974
+ "February",
975
+ "March",
976
+ "April",
977
+ "May",
978
+ "June",
979
+ "July",
980
+ "August",
981
+ "September",
982
+ "October",
983
+ "November",
984
+ "December"
985
+ ];
986
+ const d = new Date();
987
+ const month = monthNames[d.getMonth()];
988
+ const year = d.getFullYear();
989
+ return `${month} ${year}`;
990
+ }
991
+ /**
992
+ *
993
+ * @returns Getting current date in the format "dd MonthName YYYY"
994
+ */ async getCurrentDate() {
995
+ const d = new Date();
996
+ const date = d.getDate();
997
+ const monthYear = await this.getCurrentMonthYear();
998
+ return `${date} ${monthYear}`;
999
+ }
1000
+ /**
1001
+ *
1002
+ * @param days Number of days to add to current date within the current month
1003
+ * @returns
1004
+ */ async getFutureDate(days) {
1005
+ const d = new Date();
1006
+ d.setDate(d.getDate() + days);
1007
+ const date = d.getDate();
1008
+ const monthYear = await this.getCurrentMonthYear();
1009
+ return `${date} ${monthYear}`;
1010
+ }
924
1011
  }
925
1012
 
926
1013
 
@@ -951,6 +1038,9 @@ class $87bbb6d35ad31a00$export$f8f26dd395d7e1bd extends (0, $9626bc9256ce31f7$ex
951
1038
  await (0, $hOLA6$expect)(icExpandTreeview1).not.toBeVisible();
952
1039
  }
953
1040
  async openSideNavMenu(menuItem) {
1041
+ await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
1042
+ exact: true
1043
+ }).scrollIntoViewIfNeeded();
954
1044
  await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
955
1045
  exact: true
956
1046
  }).click();
@@ -1012,6 +1102,13 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
1012
1102
  timeout: 10000
1013
1103
  });
1014
1104
  }
1105
+ async waitForTaskCompletedInAdvance(taskTitle) {
1106
+ await (0, $hOLA6$expect)(this.page.locator(".task.completed_in_advance").getByText(taskTitle, {
1107
+ exact: true
1108
+ })).toBeVisible({
1109
+ timeout: 10000
1110
+ });
1111
+ }
1015
1112
  async waitForTaskInProgress(taskTitle) {
1016
1113
  await (0, $hOLA6$expect)(this.page.locator(".task.in_progress").getByText(taskTitle, {
1017
1114
  exact: true
@@ -1062,6 +1159,21 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
1062
1159
  async waitForTaskPlanned(title) {
1063
1160
  await (0, $hOLA6$expect)(this.page.locator(`.task:has-text('${title}').planned`)).toBeVisible();
1064
1161
  }
1162
+ async expectTaskCompletedInAdvance(taskTitle) {
1163
+ await (0, $hOLA6$expect)(this.page.locator("#release-content").getByRole("list").locator("div").filter({
1164
+ hasText: taskTitle
1165
+ }).locator('span.pull-right.ng-binding.ng-scope:has-text("Completed on")')).toBeVisible();
1166
+ }
1167
+ async expectTaskPending(taskTitle) {
1168
+ await (0, $hOLA6$expect)(this.page.locator(".task.pending").getByText(taskTitle, {
1169
+ exact: true
1170
+ })).toBeVisible();
1171
+ }
1172
+ async expectCurrentTaskToContain(taskTitle) {
1173
+ await (0, $hOLA6$expect)(this.page.locator(".task.active .task-title").getByText(taskTitle, {
1174
+ exact: true
1175
+ })).toBeVisible();
1176
+ }
1065
1177
  async openManualTaskDetails(title) {
1066
1178
  await this.page.locator(`text=${title}`).click({
1067
1179
  force: true
@@ -1239,6 +1351,7 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
1239
1351
  });
1240
1352
  this.commentBox = this.page.locator(`.input-block-level`);
1241
1353
  this.confirm = this.page.getByTestId("dot-button");
1354
+ this.contextMenuButton = this.page.locator("#context-menu-container li");
1242
1355
  this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
1243
1356
  }
1244
1357
  async setTitle(title) {
@@ -1247,18 +1360,55 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
1247
1360
  await this.phaseLocator.locator(".phase-header input").fill(title);
1248
1361
  await this.phaseLocator.locator(".phase-header input").blur();
1249
1362
  }
1363
+ async isMenuItemEnabled(menuName, taskTitle) {
1364
+ await this.openContextMenuForTask(taskTitle);
1365
+ await (0, $hOLA6$expect)(this.contextMenuButton.filter({
1366
+ hasText: menuName
1367
+ })).not.toHaveClass(/disabled/);
1368
+ await (0, $hOLA6$expect)(this.contextMenuButton.filter({
1369
+ hasText: menuName
1370
+ }).locator("a")).not.toBeDisabled();
1371
+ await this.closeContextMenu();
1372
+ }
1373
+ async isMenuItemDisabled(menuName, taskTitle) {
1374
+ await this.openContextMenuForTask(taskTitle);
1375
+ await (0, $hOLA6$expect)(this.contextMenuButton.filter({
1376
+ hasText: menuName
1377
+ })).toHaveClass(/disabled/);
1378
+ await (0, $hOLA6$expect)(this.contextMenuButton.filter({
1379
+ hasText: menuName
1380
+ }).locator("a")).toBeDisabled();
1381
+ await this.closeContextMenu();
1382
+ }
1383
+ async expectMenuItemIsNotVisible(menuName, taskTitle) {
1384
+ await this.openContextMenuForTask(taskTitle);
1385
+ await (0, $hOLA6$expect)(this.page.locator("#context-menu-container li").filter({
1386
+ hasText: menuName
1387
+ })).not.toBeVisible();
1388
+ await this.closeContextMenu();
1389
+ }
1390
+ async expectMenuItemIsVisible(menuName, taskTitle) {
1391
+ await this.openContextMenuForTask(taskTitle);
1392
+ await (0, $hOLA6$expect)(this.page.locator("#context-menu-container li").filter({
1393
+ hasText: menuName
1394
+ })).toBeVisible();
1395
+ await this.closeContextMenu();
1396
+ }
1397
+ async closeContextMenu() {
1398
+ await this.page.locator("#release-header").click();
1399
+ }
1250
1400
  async expectTaskBorderWithColor(taskName, color) {
1251
1401
  await (0, $hOLA6$expect)(this.page.locator(`.task-box:has-text('${taskName}')`)).toHaveCSS("border-top-color", color);
1252
1402
  }
1253
1403
  async addTaskInPhase(taskTitle, taskGroup, taskType) {
1254
1404
  await this.phaseLocator.getByText("Add task").click();
1255
- await this.phaseLocator.getByLabel("Open", {
1256
- exact: true
1257
- }).click();
1258
- await this.phaseLocator.getByPlaceholder("Start typing to filter task").fill(taskGroup);
1405
+ await this.page.locator("#task-selector").hover();
1406
+ await this.page.locator('button[aria-label="Clear"]').click();
1407
+ await this.page.locator("#task-selector").fill(taskGroup);
1259
1408
  await this.page.getByTestId(taskType).click();
1260
- await this.phaseLocator.locator("#task-title").fill(taskTitle);
1261
- await this.phaseLocator.getByTestId("save-select-task-btn").click();
1409
+ await this.page.locator(".icon-close").click();
1410
+ await this.page.locator("#task-title").fill(taskTitle);
1411
+ await this.page.getByTestId("save-select-task-btn").click();
1262
1412
  await (0, $hOLA6$expect)(this.phaseLocator.getByText(taskTitle)).toBeVisible();
1263
1413
  }
1264
1414
  async getNumberOfTasks() {
@@ -1270,11 +1420,6 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
1270
1420
  async expectToHaveTitle(phaseTitle) {
1271
1421
  await (0, $hOLA6$expect)(this.phaseLocator.locator(".phase-title")).toContainText(phaseTitle);
1272
1422
  }
1273
- async expectTemplateLabelNotToBePresent() {
1274
- await (0, $hOLA6$expect)(this.page.locator(".dot-chip").filter({
1275
- hasText: "TEMPLATE"
1276
- })).not.toBeVisible();
1277
- }
1278
1423
  async openContextMenuForTask(taskTitle) {
1279
1424
  await this.phaseLocator.locator(".task").filter({
1280
1425
  hasText: taskTitle
@@ -1289,6 +1434,11 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
1289
1434
  exact: true
1290
1435
  }).click();
1291
1436
  }
1437
+ async expectTemplateLabelNotToBePresent() {
1438
+ await (0, $hOLA6$expect)(this.page.locator(".dot-chip").filter({
1439
+ hasText: "TEMPLATE"
1440
+ })).not.toBeVisible();
1441
+ }
1292
1442
  async openPhaseDetails() {
1293
1443
  await this.phaseLocator.locator(".phase-details").click();
1294
1444
  }
@@ -1415,6 +1565,7 @@ class $b14c3492cf934ea2$export$e40b5d3c74b04c89 {
1415
1565
 
1416
1566
 
1417
1567
 
1568
+
1418
1569
  class $d13e78163af94d50$export$9b9454a7f137e99b extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1419
1570
  constructor(page){
1420
1571
  super(page);
@@ -1459,12 +1610,14 @@ class $d13e78163af94d50$export$9b9454a7f137e99b extends (0, $9626bc9256ce31f7$ex
1459
1610
  await this.clickNewDeliveryPattern();
1460
1611
  await this.setPatternName(patternName);
1461
1612
  await this.setPatternDescription(patternDescription);
1462
- await (0, $hOLA6$expect)(this.page.locator("#action-toolbar").filter({
1613
+ await (0, $hOLA6$expect)(this.page.locator(".action-toolbar-actions button").filter({
1463
1614
  hasText: "Create"
1464
1615
  })).toBeEnabled();
1465
- await this.page.locator("#action-toolbar").filter({
1616
+ await this.page.locator(".action-toolbar-actions button").filter({
1466
1617
  hasText: "Create"
1467
- }).dblclick();
1618
+ }).click({
1619
+ force: true
1620
+ });
1468
1621
  await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Delivery flow")).toBeVisible();
1469
1622
  }
1470
1623
  async clickEditPatternIcon(patternName) {
@@ -1497,8 +1650,7 @@ class $d13e78163af94d50$export$9b9454a7f137e99b extends (0, $9626bc9256ce31f7$ex
1497
1650
  }
1498
1651
  async copyPattern(existingPatternName, NewPatternName) {
1499
1652
  await this.clickCopyPatternIcon(existingPatternName);
1500
- await this.page.locator('.confirmation-content .xl-react-component-input-wrapper input[placeholder="Add..."]').click();
1501
- await this.page.locator(".confirmation-content .close-icon").click();
1653
+ await this.page.locator(".xl-icon.close-icon").first().click();
1502
1654
  await this.addName.fill(NewPatternName);
1503
1655
  await this.page.getByRole("button", {
1504
1656
  name: "Continue"
@@ -1556,14 +1708,162 @@ class $d13e78163af94d50$var$Properties extends (0, $9626bc9256ce31f7$export$2b65
1556
1708
  }
1557
1709
 
1558
1710
 
1559
- class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1711
+
1712
+
1713
+
1714
+
1715
+ class $27cd192f30944b0c$export$572f40d328c1d028 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1560
1716
  constructor(page){
1561
1717
  super(page);
1562
- this.patternPage = new (0, $d13e78163af94d50$export$9b9454a7f137e99b)(page);
1718
+ this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
1563
1719
  this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
1720
+ this.newReleaseGroupButton = page.getByTestId("dot-button");
1721
+ this.dateMonth = new Date();
1722
+ }
1723
+ async createGroup(groupName, startDate, endDate) {
1724
+ await this.newReleaseGroupButton.click();
1725
+ await (0, $hOLA6$expect)(this.page.getByText("Create new release group")).toBeVisible();
1726
+ await this.enterGroupName(groupName);
1727
+ const monthYear = await this.dateUtil.getCurrentMonthYear();
1728
+ if (startDate) await this.enterStartDate(startDate, monthYear);
1729
+ if (endDate) await this.enterEndDate(endDate, monthYear);
1730
+ await this.clickCreate();
1731
+ await this.expectSuccessMessageOnReleaseGroupCreation();
1732
+ }
1733
+ async addReleaseToGroup(releaseName) {
1734
+ await (0, $hOLA6$expect)(this.page.locator(".action-toolbar-actions button").filter({
1735
+ hasText: "Add release"
1736
+ })).toBeEnabled();
1737
+ await this.page.locator(".action-toolbar-actions button").filter({
1738
+ hasText: "Add release"
1739
+ }).click({
1740
+ force: true
1741
+ });
1742
+ await this.page.getByPlaceholder("Search for a release...").click();
1743
+ await this.page.getByPlaceholder("Search for a release...").fill(releaseName);
1744
+ await this.page.keyboard.press("Enter");
1745
+ await this.page.locator("release-list-modal-release-row").filter({
1746
+ hasText: releaseName
1747
+ }).getByRole("checkbox").check();
1748
+ await this.page.getByRole("button", {
1749
+ name: "Add"
1750
+ }).click();
1751
+ await this.expectSuccessMessageOnAddingReleaseToGroup();
1752
+ await (0, $hOLA6$expect)(this.page.getByRole("link", {
1753
+ name: releaseName
1754
+ })).toBeVisible();
1755
+ }
1756
+ async editReleaseGroupName(newGroupName) {
1757
+ await this.page.locator("#title").click();
1758
+ await this.page.locator("#title").clear();
1759
+ await this.page.locator("#title").fill(newGroupName);
1760
+ }
1761
+ async enterGroupName(groupName) {
1762
+ await this.page.locator("#title").click();
1763
+ await this.page.locator("#title").fill(groupName);
1764
+ }
1765
+ async enterStartDate(date, monthYear) {
1766
+ await this.page.locator(".form-group").filter({
1767
+ hasText: "start date"
1768
+ }).locator(".date input").click();
1769
+ await this.dateUtil.setDate(date, monthYear);
1770
+ }
1771
+ async enterEndDate(date, monthYear) {
1772
+ await this.page.locator(".form-group").filter({
1773
+ hasText: "end date"
1774
+ }).locator(".date input").click();
1775
+ await this.dateUtil.setDate(date, monthYear);
1776
+ }
1777
+ async clickCreate() {
1778
+ await this.page.getByRole("button", {
1779
+ name: "Create"
1780
+ }).click();
1781
+ }
1782
+ async expectSuccessMessageOnReleaseGroupCreation() {
1783
+ await (0, $hOLA6$expect)(this.page.getByLabel("success")).toBeVisible();
1784
+ await (0, $hOLA6$expect)(this.page.locator(".success").filter({
1785
+ hasText: "Created release group successfully"
1786
+ })).toBeVisible();
1787
+ }
1788
+ async expectSuccessMessageOnAddingReleaseToGroup() {
1789
+ await (0, $hOLA6$expect)(this.page.getByLabel("success")).toBeVisible();
1790
+ await (0, $hOLA6$expect)(this.page.locator(".success").filter({
1791
+ hasText: "Added release to release group successfully"
1792
+ })).toBeVisible();
1793
+ }
1794
+ async expectSuccessMessageOnUpdatingGroup() {
1795
+ await (0, $hOLA6$expect)(this.page.getByLabel("success")).toBeVisible();
1796
+ await (0, $hOLA6$expect)(this.page.locator(".success").filter({
1797
+ hasText: "Updated release group successfully"
1798
+ })).toBeVisible();
1799
+ }
1800
+ async searchReleaseGroupByTitle(title) {
1801
+ await this.page.getByPlaceholder("Search for groups...", {
1802
+ exact: true
1803
+ }).click();
1804
+ await this.page.getByPlaceholder("Search for groups...", {
1805
+ exact: true
1806
+ }).fill(title);
1807
+ await this.page.getByPlaceholder("Search for groups...", {
1808
+ exact: true
1809
+ }).press("Enter");
1810
+ await (0, $hOLA6$expect)(this.page.locator(".fc-list-item-title")).toContainText(title);
1811
+ }
1812
+ async deleteReleaseGroup(title) {
1813
+ await this.page.locator(".fc-list-item-line").filter({
1814
+ hasText: title
1815
+ }).locator(".fc-item-delete").click();
1816
+ await this.page.getByRole("button", {
1817
+ name: "Delete"
1818
+ }).click();
1819
+ }
1820
+ async clickReleaseGroupEdit(title) {
1821
+ await this.page.locator(".fc-list-item-line").filter({
1822
+ hasText: title
1823
+ }).locator(".fc-item-update").click();
1824
+ }
1825
+ async clickSave() {
1826
+ await this.page.getByRole("button", {
1827
+ name: "Save"
1828
+ }).click();
1829
+ }
1830
+ async clickCancel() {
1831
+ await this.page.getByRole("button", {
1832
+ name: "Cancel"
1833
+ }).click();
1834
+ }
1835
+ async clickOnStatusField() {
1836
+ await this.page.locator(".ci-filter-status.ng-isolate-scope").click();
1837
+ }
1838
+ async statusFilter(statusNames) {
1839
+ await this.clickOnStatusClearAll();
1840
+ await this.clickOnStatusField();
1841
+ for(let i = 0; i < statusNames.length; i++)await this.page.locator(`i.xl-icon.icon-s.checkbox[data='${statusNames[i]}']`).click();
1842
+ }
1843
+ async clickOnStatusClearAll() {
1844
+ await this.clickOnStatusField();
1845
+ await this.page.locator("a.xl-react-link", {
1846
+ hasText: "Clear all"
1847
+ }).click();
1848
+ }
1849
+ async clickOnStatusSelectAll() {
1850
+ await this.clickOnStatusField();
1851
+ await this.page.locator("a.xl-react-link", {
1852
+ hasText: "Select all"
1853
+ }).click();
1854
+ }
1855
+ }
1856
+
1857
+
1858
+ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1859
+ constructor(page){
1860
+ super(page);
1564
1861
  this.expandButton = this.page.getByRole("button", {
1565
1862
  name: " Expand"
1566
1863
  });
1864
+ this.folderGroupsPage = new (0, $27cd192f30944b0c$export$572f40d328c1d028)(page);
1865
+ this.patternPage = new (0, $d13e78163af94d50$export$9b9454a7f137e99b)(page);
1866
+ this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
1567
1867
  }
1568
1868
  async openFoldersPage() {
1569
1869
  await this.page.goto("./#/folders");
@@ -1577,20 +1877,33 @@ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$ex
1577
1877
  return this;
1578
1878
  }
1579
1879
  async createFolder(folderName) {
1580
- await this.page.locator("button.btn-add-folder").click();
1581
- await this.page.locator("div.xl-react-component-input-wrapper").type(folderName);
1582
- await this.page.locator("button.xl-react-button.button.primary").click();
1583
- await this.page.locator(`//button[normalize-space()='Add release']`).isVisible();
1880
+ await this.page.getByRole("button", {
1881
+ name: " Add folder"
1882
+ }).click();
1883
+ await (0, $hOLA6$expect)(this.page.getByText("Create a new folder in root")).toBeVisible();
1884
+ await this.page.getByRole("textbox").fill(folderName);
1885
+ await this.page.getByRole("button", {
1886
+ name: "Create"
1887
+ }).click();
1888
+ await (0, $hOLA6$expect)(this.page.getByRole("link", {
1889
+ name: folderName
1890
+ })).toBeVisible();
1584
1891
  return this;
1585
1892
  }
1586
1893
  async openFolder(folderName) {
1587
- await this.page.locator(`.folder-row-wrapper span:text-is('${folderName}')`).click();
1894
+ await this.page.getByTitle(folderName).waitFor({
1895
+ timeout: 500
1896
+ });
1897
+ await this.page.getByTitle(folderName).click();
1898
+ await (0, $hOLA6$expect)(this.page.locator(".MuiBreadcrumbs-li").getByRole("link", {
1899
+ name: `${folderName}`
1900
+ })).toBeVisible();
1588
1901
  return this;
1589
1902
  }
1590
1903
  async openGroups() {
1591
1904
  await this.util.openSideNavMenu("Groups");
1592
1905
  await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Groups")).toBeVisible();
1593
- return this;
1906
+ return this.folderGroupsPage;
1594
1907
  }
1595
1908
  async createGroup(groupName) {
1596
1909
  await this.page.locator("//button[normalize-space()='New release group']").click();
@@ -1612,7 +1925,7 @@ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$ex
1612
1925
  return this;
1613
1926
  }
1614
1927
  async createSubFolder(parentFolder, subFolderName) {
1615
- await this.expandButton.click();
1928
+ await this.clickExpandButton();
1616
1929
  await this.page.getByRole("link", {
1617
1930
  name: parentFolder
1618
1931
  }).hover();
@@ -1626,7 +1939,7 @@ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$ex
1626
1939
  })).toBeVisible();
1627
1940
  }
1628
1941
  async renameFolder(existingFolderName, newFolderName) {
1629
- await this.expandButton.click();
1942
+ await this.clickExpandButton();
1630
1943
  await this.page.getByRole("link", {
1631
1944
  name: existingFolderName
1632
1945
  }).hover();
@@ -1639,7 +1952,7 @@ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$ex
1639
1952
  })).toBeVisible();
1640
1953
  }
1641
1954
  async deleteFolder(folderName) {
1642
- await this.expandButton.click();
1955
+ await this.clickExpandButton();
1643
1956
  await this.page.getByRole("link", {
1644
1957
  name: folderName
1645
1958
  }).hover();
@@ -1674,6 +1987,9 @@ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$ex
1674
1987
  hasText: folderName
1675
1988
  }).locator(`.xl-icon.${option}-icon`).click();
1676
1989
  }
1990
+ async clickExpandButton() {
1991
+ if (await this.expandButton.isEnabled()) await this.expandButton.click();
1992
+ }
1677
1993
  }
1678
1994
 
1679
1995
 
@@ -2437,11 +2753,52 @@ class $c37c93912f458e81$export$60c3bfa6385e2a10 extends (0, $9626bc9256ce31f7$ex
2437
2753
  async clickOnAssigneeButton(title) {
2438
2754
  await this.page.locator(`.btn-group-filter.btn-group button.btn.btn-flat[title="${title}"]`).click();
2439
2755
  }
2440
- async expectTaskNotDisplayed(taskTitle) {
2756
+ async clickOnAssignedToMe() {
2757
+ await this.page.locator(`button[title="Assigned to me"]`).click();
2758
+ }
2759
+ async clickOnAssignedToMyTeams() {
2760
+ await this.page.locator(`button[title="Assigned to my teams"]`).click();
2761
+ }
2762
+ async clickOnAssignedToAllAvailable() {
2763
+ await this.page.locator(`button[title="All available"]`).click();
2764
+ }
2765
+ async expectTaskToNotBeDisplayed(taskTitle) {
2441
2766
  await (0, $hOLA6$expect)(this.page.locator(`.row.task-inner`).filter({
2442
2767
  hasText: taskTitle
2443
2768
  }).getByText(taskTitle)).toHaveCount(0);
2444
2769
  }
2770
+ async expectTaskToBeDisplayed(taskTitle) {
2771
+ await (0, $hOLA6$expect)(this.page.locator(`.row.task-inner`).filter({
2772
+ hasText: taskTitle
2773
+ }).getByText(taskTitle)).toHaveCount(1);
2774
+ }
2775
+ async expectTasksToBeDisplayed(tasks) {
2776
+ for (const [taskTitle, shouldBeDisplayed] of Object.entries(tasks))if (shouldBeDisplayed) await this.expectTaskToBeDisplayed(taskTitle);
2777
+ else await this.expectTaskToNotBeDisplayed(taskTitle);
2778
+ }
2779
+ async expectTasksDisplayedInOrder(expectedTasks) {
2780
+ for (const task of expectedTasks){
2781
+ const taskElement = await this.page.locator(`[data-release-title='${task.releaseTitle}'] .row .task`).nth(task.taskPosition);
2782
+ await (0, $hOLA6$expect)(taskElement).toHaveAttribute("data-task-title", task.taskTitle);
2783
+ }
2784
+ }
2785
+ async setOrderBy(orderBy) {
2786
+ await this.page.locator(".order-selector .btn:first-child").click();
2787
+ await this.page.locator(`.order-selector .bootstrap-link:has-text('${orderBy}')`).click();
2788
+ }
2789
+ async expectTaskCountForRelease(releaseTitle, expectedCount) {
2790
+ await (0, $hOLA6$expect)(this.page.locator(`#tasks-content #task-list-grouped-view div:has-text('${releaseTitle}') .task`)).toHaveCount(expectedCount);
2791
+ }
2792
+ async setSearchFilter(filterText) {
2793
+ await this.page.locator(".searchFilter").fill(filterText);
2794
+ }
2795
+ async clearSearchFilter() {
2796
+ await this.page.locator(".searchFilter").clear();
2797
+ }
2798
+ async setTagsFilter(filterText) {
2799
+ await this.page.locator(".tag-input").fill(filterText);
2800
+ await this.page.locator(".tag-input").press("Enter");
2801
+ }
2445
2802
  async clickOnStatusField() {
2446
2803
  await this.page.locator(".ci-filter-status.ng-isolate-scope").click();
2447
2804
  }
@@ -2831,13 +3188,13 @@ class $0c4084f199d70d72$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
2831
3188
  * @param taskTypeSelector : Selector of the task
2832
3189
  */ async addTaskInPhase(taskTitle, taskGroup, taskType) {
2833
3190
  await this.phaseLocator.getByText("Add task").click();
2834
- await this.phaseLocator.getByLabel("Open", {
2835
- exact: true
2836
- }).click();
2837
- await this.phaseLocator.getByPlaceholder("Start typing to filter task").fill(taskGroup);
3191
+ await this.page.locator("#task-selector").hover();
3192
+ await this.page.locator('button[aria-label="Clear"]').click();
3193
+ await this.page.locator("#task-selector").fill(taskGroup);
2838
3194
  await this.page.getByTestId(taskType).click();
2839
- await this.phaseLocator.locator("#task-title").fill(taskTitle);
2840
- await this.phaseLocator.getByTestId("save-select-task-btn").click();
3195
+ await this.page.locator(".icon-close").click();
3196
+ await this.page.locator("#task-title").fill(taskTitle);
3197
+ await this.page.getByTestId("save-select-task-btn").click();
2841
3198
  await (0, $hOLA6$expect)(this.phaseLocator.getByText(taskTitle)).toBeVisible();
2842
3199
  }
2843
3200
  async getNumberOfTasks() {
@@ -2910,16 +3267,16 @@ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$ex
2910
3267
  await this.page.getByRole("button", {
2911
3268
  name: "Continue"
2912
3269
  }).click();
2913
- await (0, $hOLA6$expect)(this.page.locator(".dot-chip").filter({
2914
- hasText: "TEMPLATE"
2915
- })).toBeVisible();
3270
+ await (0, $hOLA6$expect)(this.page.getByTestId("template-workflow-pill").getByText("Template")).toBeVisible();
2916
3271
  }
2917
3272
  async move(templateName, targetFolder) {
2918
- await this.page.locator(".title").filter({
3273
+ await this.page.locator(".template").filter({
2919
3274
  hasText: templateName
2920
- }).locator(".move").click();
3275
+ }).locator(".template-actions .move").click();
2921
3276
  await (0, $hOLA6$expect)(this.page.getByText("Move template to")).toBeVisible();
2922
- await this.page.getByRole("button", {
3277
+ if (await this.page.getByRole("button", {
3278
+ name: "Expand"
3279
+ }).isEnabled()) await this.page.getByRole("button", {
2923
3280
  name: "Expand"
2924
3281
  }).click();
2925
3282
  await this.page.getByPlaceholder("Search folder...").click();
@@ -3026,6 +3383,8 @@ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$ex
3026
3383
  class $e72552cbf941ecfa$export$b8a61e5c71402559 {
3027
3384
  constructor(page){
3028
3385
  this.page = page;
3386
+ this.dataRandomGenerator = new (0, $b14c3492cf934ea2$export$e40b5d3c74b04c89)();
3387
+ this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
3029
3388
  this.folderPage = new (0, $50c91328c9110668$export$b453f08936c58edb)(page);
3030
3389
  this.globalvariable = new (0, $3df1257265fba073$export$74ca1eaaa9a0054)(page);
3031
3390
  this.homePage = new (0, $2174535b78371022$export$36d69433c4f81145)(page);
@@ -3143,12 +3502,12 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
3143
3502
  return new (0, $43cbcdfccb6c2a76$export$f43492e8ac3c566)(this.page);
3144
3503
  }
3145
3504
  async collapseSideView() {
3146
- await this.page.locator(".icon-collapse").click();
3147
- await (0, $hOLA6$expect)(this.page.locator(".icon-collapse")).not.toBeVisible();
3505
+ await this.page.getByLabel("Collapse Q").click();
3506
+ await (0, $hOLA6$expect)(this.page.getByLabel("Collapse Q")).not.toBeVisible();
3148
3507
  }
3149
3508
  async expandSideView() {
3150
- await this.page.locator(".icon-expand").click();
3151
- await (0, $hOLA6$expect)(this.page.locator(".icon-expand")).not.toBeVisible();
3509
+ await this.page.getByLabel("Expand Q").click();
3510
+ await (0, $hOLA6$expect)(this.page.getByLabel("Expand Q")).not.toBeVisible();
3152
3511
  }
3153
3512
  }
3154
3513
 
@@ -3427,6 +3786,13 @@ class $80c3ae34677b4324$var$Fixtures {
3427
3786
  permissions(rolePermissions) {
3428
3787
  return this.doPost("fixtures/roles/permissions/global", rolePermissions);
3429
3788
  }
3789
+ updateUserProfile(username, profile) {
3790
+ profile.id = username;
3791
+ profile.type = "xlrelease.UserProfile";
3792
+ profile.canonicalId = username.toLowerCase();
3793
+ if (this.userProfiles.indexOf(profile.canonicalId) === -1) this.userProfiles.push(profile.canonicalId);
3794
+ return this.doPut("fixtures/userProfile", profile);
3795
+ }
3430
3796
  deleteRole(roleName) {
3431
3797
  return this.doDelete(`fixtures/role/${roleName}`);
3432
3798
  }