@digital-ai/devops-page-object-release 0.0.16 → 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/main.js CHANGED
@@ -961,7 +961,45 @@ class $f8721861c660dd88$export$2b65d1d97338f32b {
961
961
  }
962
962
 
963
963
 
964
+
965
+ class $3d3f3946c54f5897$export$34addcca3f0ae43f extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
966
+ constructor(page){
967
+ super(page);
968
+ }
969
+ async setName(releaseName) {
970
+ await this.page.locator("#release-form-title").click();
971
+ await this.page.locator("#release-form-title").fill(releaseName);
972
+ }
973
+ async setDescription(description) {
974
+ await this.page.locator(".release-description").hover();
975
+ await this.page.locator(".display").filter({
976
+ hasText: "Set description"
977
+ }).locator(".edit-icon").click();
978
+ await this.page.locator("textarea").click();
979
+ await this.page.locator("textarea").clear();
980
+ await this.page.locator("textarea").fill(description);
981
+ await this.page.getByText("Save", {
982
+ exact: true
983
+ }).click();
984
+ }
985
+ async create() {
986
+ await this.page.getByRole("button", {
987
+ name: "Create"
988
+ }).waitFor({
989
+ state: "visible"
990
+ });
991
+ await this.page.getByRole("button", {
992
+ name: "Create"
993
+ }).click();
994
+ }
995
+ }
996
+
997
+
964
998
  class $87643f2d97b0644e$export$a678525e79c4ccc4 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
999
+ constructor(page){
1000
+ super(page);
1001
+ this.releaseCreatePage = new (0, $3d3f3946c54f5897$export$34addcca3f0ae43f)(page);
1002
+ }
965
1003
  async expectNumberOfReleases(releaseTitle, amount) {
966
1004
  await this.filterReleaseByTitle(releaseTitle);
967
1005
  if (amount === 1) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible({
@@ -969,6 +1007,10 @@ class $87643f2d97b0644e$export$a678525e79c4ccc4 extends (0, $f8721861c660dd88$ex
969
1007
  });
970
1008
  else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release").getByText(releaseTitle).count()).toBe(amount);
971
1009
  }
1010
+ async filterReleaseByAllStatus() {
1011
+ await this.page.locator(".ci-status .remaining-tags").getByText("more").click();
1012
+ await this.page.locator(".ci-status .xl-react-link").getByText("Select all").click();
1013
+ }
972
1014
  async openReleaseByName(releaseTitle) {
973
1015
  await this.page.locator(".release-line .row-wrapper .release-title-wrapper a", {
974
1016
  hasText: releaseTitle
@@ -981,6 +1023,12 @@ class $87643f2d97b0644e$export$a678525e79c4ccc4 extends (0, $f8721861c660dd88$ex
981
1023
  await this.page.locator(".searchFilter").press("Enter");
982
1024
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible();
983
1025
  }
1026
+ async createNewRelease(releaseName, description) {
1027
+ await this.releaseCreatePage.setName(releaseName);
1028
+ await this.releaseCreatePage.setDescription(description);
1029
+ await this.releaseCreatePage.create();
1030
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Flow")).toBeVisible();
1031
+ }
984
1032
  }
985
1033
 
986
1034
 
@@ -1248,7 +1296,7 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1248
1296
  await this.page.getByTestId("single-action-button").click();
1249
1297
  await this.page.getByTestId("task-action-comment").click();
1250
1298
  await this.page.getByTestId("task-action-comment").fill(comment);
1251
- await this.page.getByTestId("task-action-confirm").click();
1299
+ await this.page.getByTestId("dot-button").click();
1252
1300
  }
1253
1301
  async expectDependenciesDisplayed(dependencies) {
1254
1302
  await this.railLocator.locator(".gate-task-dependencies").waitFor();
@@ -1257,24 +1305,19 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1257
1305
  })).toBeVisible();
1258
1306
  }
1259
1307
  async expectCanDeleteDependency(title, canDelete = true) {
1260
- if (canDelete) {
1261
- const locat = this.page.locator(".dependency").filter({
1262
- has: this.page.getByRole("link", {
1263
- name: title,
1264
- exact: true
1265
- })
1266
- }).locator(".icon-options");
1267
- await locat.isVisible();
1268
- await locat.click();
1269
- await (0, $kKeXs$playwrighttest.expect)(this.railLocator.getByRole("menuitem", {
1270
- name: "Remove"
1271
- })).toBeVisible();
1272
- } else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dependency").filter({
1308
+ const depOptionsIcon = this.page.locator(".dependency").filter({
1273
1309
  has: this.page.getByRole("link", {
1274
1310
  name: title,
1275
1311
  exact: true
1276
1312
  })
1277
- }).locator(".icon-options")).not.toBeVisible();
1313
+ }).locator(".icon-options");
1314
+ if (canDelete) {
1315
+ await depOptionsIcon.isVisible();
1316
+ await depOptionsIcon.click();
1317
+ await (0, $kKeXs$playwrighttest.expect)(this.railLocator.getByRole("menuitem", {
1318
+ name: "Remove"
1319
+ })).toBeVisible();
1320
+ } else await (0, $kKeXs$playwrighttest.expect)(depOptionsIcon).not.toBeVisible();
1278
1321
  }
1279
1322
  async getDependencyCount() {
1280
1323
  await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
@@ -1287,26 +1330,20 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1287
1330
  }
1288
1331
  async expectDependencyText(dependencies) {
1289
1332
  await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
1290
- await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
1291
- name: dependencies,
1292
- exact: true
1293
- }).first()).toBeVisible();
1333
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.gate-task-dependencies`).getByLabel(dependencies).first()).toBeVisible();
1294
1334
  }
1295
1335
  async clickEditDependency(dependencies) {
1296
- const locat = this.page.locator(".dependency").filter({
1297
- has: this.page.getByRole("link", {
1298
- name: dependencies,
1299
- exact: true
1300
- })
1301
- }).locator(".icon-options");
1302
- await locat.isVisible();
1303
- await locat.click();
1336
+ const depOptionsIcon = this.page.locator(".dependency").filter({
1337
+ has: this.page.getByLabel(dependencies)
1338
+ }).locator(".actions");
1339
+ await depOptionsIcon.isVisible();
1340
+ await depOptionsIcon.click();
1304
1341
  const frame = this.page.getByTestId("undefined-menu");
1305
1342
  if (await frame.isVisible()) await this.railLocator.getByRole("menuitem", {
1306
1343
  name: "Edit"
1307
1344
  }).click();
1308
1345
  else {
1309
- await locat.nth(1).click();
1346
+ await depOptionsIcon.click();
1310
1347
  await this.railLocator.getByRole("menuitem", {
1311
1348
  name: "Edit"
1312
1349
  }).click();
@@ -1339,24 +1376,32 @@ class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$ex
1339
1376
  async setRelease(releaseTitle) {
1340
1377
  await this.release.click();
1341
1378
  await this.release.fill(releaseTitle);
1379
+ await this.page.getByRole("option", {
1380
+ name: releaseTitle
1381
+ }).waitFor();
1342
1382
  await this.page.getByRole("option", {
1343
1383
  name: releaseTitle
1344
1384
  }).click();
1345
1385
  }
1346
1386
  async save() {
1347
- await (0, $kKeXs$playwrighttest.expect)(this.dependencyLocator.getByRole("button", {
1348
- name: "OK"
1349
- })).toBeEnabled();
1350
- await this.dependencyLocator.getByRole("button", {
1351
- name: "OK"
1352
- }).click();
1387
+ await (0, $kKeXs$playwrighttest.expect)(this.dependencyLocator.getByTestId("save-button")).toBeVisible();
1388
+ await this.dependencyLocator.getByTestId("save-button").click();
1353
1389
  }
1354
1390
  async setPhase(phaseTitle) {
1355
1391
  await this.phase.click();
1356
1392
  await this.phase.fill("");
1357
- await this.page.getByRole("option", {
1393
+ const count = await this.page.getByRole("option", {
1394
+ name: phaseTitle
1395
+ }).count();
1396
+ if (count > 0) await this.page.getByRole("option", {
1358
1397
  name: phaseTitle
1359
1398
  }).click();
1399
+ else {
1400
+ await this.page.locator(".phase-dependency").getByLabel("Open").click();
1401
+ await this.page.getByRole("option", {
1402
+ name: phaseTitle
1403
+ }).click();
1404
+ }
1360
1405
  }
1361
1406
  async setTask(taskTitle) {
1362
1407
  await this.task.click();
@@ -1374,6 +1419,7 @@ class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$ex
1374
1419
  (0, $kKeXs$playwrighttest.expect)(variablemode).toBe("" + mode + "");
1375
1420
  }
1376
1421
  async clickVariable() {
1422
+ await this.dependencyLocator.getByLabel("input-variable").waitFor();
1377
1423
  await this.dependencyLocator.getByLabel("input-variable").click();
1378
1424
  }
1379
1425
  //TODO: getAttribute('value') is not working as expected. Need to be fixed with better alternative.
@@ -1467,7 +1513,7 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
1467
1513
  });
1468
1514
  this.cancelButton = this.page.getByTestId("task-action-cancel");
1469
1515
  this.commentBox = this.page.getByTestId("task-action-comment");
1470
- this.confirm = this.page.getByTestId("task-action-confirm");
1516
+ this.confirm = this.page.getByTestId("dot-button");
1471
1517
  this.activity = new (0, $6c924a95a765a086$export$15d3f9b095bb5188)(page);
1472
1518
  this.attachment = new (0, $f9016705c1a1eb20$export$aa59788fdecae2f2)(page);
1473
1519
  this.config = new (0, $8be2ce0eccbe6d27$export$64c93bc7fb9ca44e)(page);
@@ -1476,6 +1522,16 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
1476
1522
  this.skipMenu = this.page.getByRole("menuitem", {
1477
1523
  name: "Skip"
1478
1524
  });
1525
+ this.failMenu = this.page.getByRole("menuitem", {
1526
+ name: "Fail"
1527
+ });
1528
+ this.openMenu = this.page.getByRole("button", {
1529
+ name: "arrow-down icon",
1530
+ exact: true
1531
+ });
1532
+ this.completeButton = this.page.getByRole("button", {
1533
+ name: "Complete"
1534
+ });
1479
1535
  }
1480
1536
  async openOverviewRail() {
1481
1537
  await this.openRail("Overview");
@@ -1505,19 +1561,28 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
1505
1561
  await this.taskDrawerLocator.locator(".task-drawer-header").getByTestId("close-btn").click();
1506
1562
  }
1507
1563
  async retryTask(comment) {
1564
+ await this.page.waitForTimeout(1000);
1508
1565
  await this.retryButton.click();
1509
1566
  await this.commentBox.fill(comment);
1510
1567
  await this.confirm.click();
1511
1568
  }
1512
1569
  async skipTask(comment) {
1513
- await this.page.getByRole("button", {
1514
- name: "arrow-down icon",
1515
- exact: true
1516
- }).click();
1570
+ await this.openMenu.click();
1517
1571
  await this.skipMenu.click();
1518
1572
  await this.commentBox.fill(comment);
1519
1573
  await this.confirm.click();
1520
1574
  }
1575
+ async failTask(comment) {
1576
+ await this.openMenu.click();
1577
+ await this.failMenu.click();
1578
+ await this.commentBox.fill(comment);
1579
+ await this.confirm.click();
1580
+ }
1581
+ async completeTask(comment) {
1582
+ await this.completeButton.click();
1583
+ await this.commentBox.fill(comment);
1584
+ await this.confirm.click();
1585
+ }
1521
1586
  async expectTaskTitle(taskTitle) {
1522
1587
  (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".task-drawer .task-title-input .dot-view-mode-typography").innerText()).toContain(taskTitle);
1523
1588
  }
@@ -1525,18 +1590,62 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
1525
1590
  (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".task-drawer .task-type").innerText()).toContain(taskType);
1526
1591
  }
1527
1592
  async clickExpand() {
1528
- await this.page.locator(".icon-fullscreen-enter").click();
1529
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".icon-fullscreen-enter")).not.toBeVisible();
1593
+ await this.page.getByRole("tooltip", {
1594
+ name: "Expand"
1595
+ }).getByTestId("expand-btn").click();
1596
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("tooltip", {
1597
+ name: "Shrink"
1598
+ }).getByTestId("expand-btn")).toBeVisible();
1530
1599
  }
1531
1600
  async clickShrink() {
1532
- await this.page.locator(".icon-fullscreen-exit").click();
1533
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".icon-fullscreen-exit")).not.toBeVisible();
1601
+ await this.page.getByRole("tooltip", {
1602
+ name: "Shrink"
1603
+ }).getByTestId("expand-btn").click();
1604
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("tooltip", {
1605
+ name: "Expand"
1606
+ }).getByTestId("expand-btn")).toBeVisible();
1534
1607
  }
1535
1608
  async expectAssignedTo(username) {
1536
1609
  await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("button", {
1537
1610
  name: username
1538
1611
  })).toBeVisible();
1539
1612
  }
1613
+ async expectStartNowButtonToBeVisible() {
1614
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("single-action-button")).toBeVisible();
1615
+ }
1616
+ async startNow(comment) {
1617
+ await this.page.getByTestId("single-action-button").click();
1618
+ await this.page.getByTestId("task-action-comment").fill(comment);
1619
+ await this.page.getByTestId("dot-button").click();
1620
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("single-action-button")).not.toBeVisible();
1621
+ }
1622
+ async expectCommentsToContain(text) {
1623
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-comment-body .markdown-wrapper p")).toContainText(text);
1624
+ }
1625
+ async switchWaitForScheduledDate() {
1626
+ await this.page.locator(".wait-for-start input").click();
1627
+ }
1628
+ async expectWaitForScheduledDateToBeChecked() {
1629
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".wait-for-start input")).toBeChecked();
1630
+ }
1631
+ async expectWaitForScheduledDateToBeUnchecked() {
1632
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".wait-for-start input")).not.toBeChecked();
1633
+ }
1634
+ // Other locators are flaky and it can be replaced if we get locator change in the frontend
1635
+ async clickOnStartDate() {
1636
+ await this.page.getByTestId("month-and-year").first().click();
1637
+ }
1638
+ async removeStartDate() {
1639
+ await this.page.getByRole("button", {
1640
+ name: "Set by user"
1641
+ }).locator(".MuiChip-deleteIcon").click();
1642
+ }
1643
+ async setStartDate(date) {
1644
+ await this.clickOnStartDate();
1645
+ await this.page.locator(".MuiPickersDay-root", {
1646
+ hasText: date
1647
+ }).click();
1648
+ }
1540
1649
  async assignToMe(userName, existingUsername) {
1541
1650
  await this.page.getByRole("button", {
1542
1651
  name: existingUsername
@@ -1560,6 +1669,15 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
1560
1669
  const regexPattern = new RegExp(`${flagComment}.*${flagName}`, "i");
1561
1670
  await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(regexPattern)).toBeVisible();
1562
1671
  }
1672
+ async expectStartDateToBeDisplayed() {
1673
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("start-date-title")).toHaveCount(1);
1674
+ }
1675
+ async expectEndDateToBeDisplayed() {
1676
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("end-date-title")).toHaveCount(1);
1677
+ }
1678
+ async expectStartDateAndEndDateToBeDisplayed() {
1679
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("month-and-year")).toHaveCount(2);
1680
+ }
1563
1681
  }
1564
1682
 
1565
1683
 
@@ -1742,12 +1860,141 @@ class $8681d8a3f46f87b7$export$d1077068a9cc9f17 extends (0, $f8721861c660dd88$ex
1742
1860
  }
1743
1861
 
1744
1862
 
1863
+
1864
+
1865
+
1866
+ class $880df57ffbf6e614$export$9b575f14aa5e09a1 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
1867
+ constructor(page){
1868
+ super(page);
1869
+ }
1870
+ async openDatePicker(selector) {
1871
+ await this.page.locator(`${selector} .date`).click();
1872
+ }
1873
+ /**
1874
+ * Setting date, month and year from calendar picker
1875
+ */ async setDate(date, monthYear) {
1876
+ const prev = this.page.locator(".datepicker-days .prev");
1877
+ const next = this.page.locator(".datepicker-days .next");
1878
+ const monYear = this.page.locator(".datepicker-days .datepicker-switch");
1879
+ const thisMonth = (0, ($parcel$interopDefault($kKeXs$moment)))(monthYear, "MMMM YYYY").isBefore();
1880
+ while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
1881
+ else await next.click();
1882
+ await this.page.getByRole("cell", {
1883
+ name: "" + date + ""
1884
+ }).first().click();
1885
+ }
1886
+ async expectDurationToBe(duration) {
1887
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".duration-editor").textContent()).toBe(duration);
1888
+ }
1889
+ async setDuration(days, hours, mins) {
1890
+ await this.page.locator(".duration-editor").click();
1891
+ if (typeof days !== "undefined") await this.page.locator(".days").fill(days);
1892
+ if (typeof hours !== "undefined") await this.page.locator(".hours").fill(hours);
1893
+ if (typeof mins !== "undefined") await this.page.locator(".minutes").fill(mins);
1894
+ await this.page.keyboard.press("Enter");
1895
+ }
1896
+ async expectTimeToBe(selector, format, date) {
1897
+ if (typeof date === "string") date = new Date(date);
1898
+ const formattedDate = (0, ($parcel$interopDefault($kKeXs$moment)))(date).format(format);
1899
+ const input = this.page.locator(`${selector}`);
1900
+ await (0, $kKeXs$playwrighttest.expect)(input).toBeVisible();
1901
+ const value = await input.inputValue();
1902
+ (0, $kKeXs$playwrighttest.expect)(value).toBe(formattedDate);
1903
+ }
1904
+ /**
1905
+ *
1906
+ * @returns Getting current month and year in the format "MonthName YYYY"
1907
+ */ async getCurrentMonthYear() {
1908
+ const monthNames = [
1909
+ "January",
1910
+ "February",
1911
+ "March",
1912
+ "April",
1913
+ "May",
1914
+ "June",
1915
+ "July",
1916
+ "August",
1917
+ "September",
1918
+ "October",
1919
+ "November",
1920
+ "December"
1921
+ ];
1922
+ const d = new Date();
1923
+ const month = monthNames[d.getMonth()];
1924
+ const year = d.getFullYear();
1925
+ return `${month} ${year}`;
1926
+ }
1927
+ /**
1928
+ *
1929
+ * @returns Getting current date in the format "dd MonthName YYYY"
1930
+ */ async getCurrentDate() {
1931
+ const d = new Date();
1932
+ const date = d.getDate();
1933
+ const monthYear = await this.getCurrentMonthYear();
1934
+ return `${date} ${monthYear}`;
1935
+ }
1936
+ /**
1937
+ *
1938
+ * @param days Number of days to add to current date within the current month
1939
+ * @returns
1940
+ */ async getFutureDate(days) {
1941
+ const d = new Date();
1942
+ d.setDate(d.getDate() + days);
1943
+ const date = d.getDate();
1944
+ const monthYear = await this.getCurrentMonthYear();
1945
+ return `${date} ${monthYear}`;
1946
+ }
1947
+ }
1948
+
1949
+
1950
+
1951
+
1952
+
1953
+ class $2c89ba54932fbba8$export$f8f26dd395d7e1bd extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
1954
+ constructor(page){
1955
+ super(page);
1956
+ this.tempDir = "";
1957
+ this.content = "";
1958
+ this.closeIcon = this.page.locator(".xl-icon.close-icon");
1959
+ }
1960
+ async createTempFile(fileName, testInfo) {
1961
+ const content = fileName.toString();
1962
+ const tempDir = testInfo.outputPath(fileName.toString());
1963
+ $kKeXs$fs.promises.writeFile(tempDir, content, "utf8");
1964
+ }
1965
+ async expandAllFolders() {
1966
+ const icExpandTreeview1 = this.page.locator(".rstm-toggle-icon.xl-icon.arrow-right-icon");
1967
+ for (const element of (await icExpandTreeview1.all())){
1968
+ const blnVal = await element.isVisible();
1969
+ if (blnVal) {
1970
+ await element.click();
1971
+ await this.expandAllFolders();
1972
+ }
1973
+ }
1974
+ await (0, $kKeXs$playwrighttest.expect)(icExpandTreeview1).not.toBeVisible();
1975
+ }
1976
+ async openSideNavMenu(menuItem) {
1977
+ await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
1978
+ exact: true
1979
+ }).scrollIntoViewIfNeeded();
1980
+ await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
1981
+ exact: true
1982
+ }).click();
1983
+ }
1984
+ async clickCloseIcon() {
1985
+ await this.closeIcon.click();
1986
+ }
1987
+ }
1988
+
1989
+
1745
1990
  class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
1746
1991
  constructor(page){
1747
1992
  super(page);
1748
1993
  this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
1994
+ this.phaseTitle = this.page.locator(".phase .phase-title");
1749
1995
  this.properties = new (0, $8681d8a3f46f87b7$export$d1077068a9cc9f17)(page);
1750
1996
  this.variables = new (0, $fd4eef3ad2b2e612$export$a87f0ae8695e74be)(page);
1997
+ this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
1751
1998
  }
1752
1999
  async openTriggers() {
1753
2000
  await this.openSubPage("Triggers");
@@ -1791,6 +2038,18 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
1791
2038
  timeout: 10000
1792
2039
  });
1793
2040
  }
2041
+ async waitForTaskCompletedInAdvance(taskTitle) {
2042
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.completed_in_advance").getByText(taskTitle, {
2043
+ exact: true
2044
+ })).toBeVisible({
2045
+ timeout: 10000
2046
+ });
2047
+ }
2048
+ async waitForTaskInProgress(taskTitle) {
2049
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.in_progress").getByText(taskTitle, {
2050
+ exact: true
2051
+ })).toBeVisible();
2052
+ }
1794
2053
  async waitForTaskFailed(taskTitle) {
1795
2054
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.failed").getByText(taskTitle, {
1796
2055
  exact: true
@@ -1805,6 +2064,13 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
1805
2064
  timeout: 10000
1806
2065
  });
1807
2066
  }
2067
+ async waitForTaskSkippedInAdvance(taskTitle) {
2068
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.skipped_in_advance").getByText(taskTitle, {
2069
+ exact: true
2070
+ })).toBeVisible({
2071
+ timeout: 10000
2072
+ });
2073
+ }
1808
2074
  async waitForTaskAborted(taskTitle) {
1809
2075
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.aborted").getByText(taskTitle, {
1810
2076
  exact: true
@@ -1829,6 +2095,21 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
1829
2095
  async waitForTaskPlanned(title) {
1830
2096
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.task:has-text('${title}').planned`)).toBeVisible();
1831
2097
  }
2098
+ async expectTaskCompletedInAdvance(taskTitle) {
2099
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#release-content").getByRole("list").locator("div").filter({
2100
+ hasText: taskTitle
2101
+ }).locator('span.pull-right.ng-binding.ng-scope:has-text("Completed on")')).toBeVisible();
2102
+ }
2103
+ async expectTaskPending(taskTitle) {
2104
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.pending").getByText(taskTitle, {
2105
+ exact: true
2106
+ })).toBeVisible();
2107
+ }
2108
+ async expectCurrentTaskToContain(taskTitle) {
2109
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.active .task-title").getByText(taskTitle, {
2110
+ exact: true
2111
+ })).toBeVisible();
2112
+ }
1832
2113
  async openManualTaskDetails(title) {
1833
2114
  await this.page.locator(`text=${title}`).click({
1834
2115
  force: true
@@ -1843,7 +2124,7 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
1843
2124
  }).click();
1844
2125
  await this.page.getByTestId("task-action-comment").click();
1845
2126
  await this.page.getByTestId("task-action-comment").fill(comment);
1846
- await this.page.getByTestId("task-action-confirm").click();
2127
+ await this.page.getByTestId("dot-button").click();
1847
2128
  }
1848
2129
  async openTaskDrawer(taskName) {
1849
2130
  await this.page.locator(".task-header").getByText(taskName, {
@@ -1864,25 +2145,32 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
1864
2145
  return this.taskDrawer;
1865
2146
  }
1866
2147
  async openVariables() {
1867
- await this.openReleaseMenu("Variables");
2148
+ await this.util.openSideNavMenu("Variables");
2149
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Variables")).toBeVisible();
1868
2150
  }
1869
2151
  async openProperties() {
1870
- await this.openReleaseMenu("Properties");
2152
+ await this.util.openSideNavMenu("Properties");
2153
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Properties")).toBeVisible();
1871
2154
  }
1872
2155
  async openReleaseFlow() {
1873
- await this.openReleaseMenu("Release flow");
2156
+ await this.util.openSideNavMenu("Flow");
2157
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Flow")).toBeVisible();
1874
2158
  }
1875
2159
  async openRelationships() {
1876
- await this.openReleaseMenu("Relationships");
2160
+ await this.util.openSideNavMenu("Relationships");
2161
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Relationships")).toBeVisible();
1877
2162
  }
1878
2163
  async openTeamsPermissions() {
1879
- await this.openReleaseMenu("Teams & Permissions");
2164
+ await this.util.openSideNavMenu("Teams & Permissions");
2165
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Teams & Permissions")).toBeVisible();
1880
2166
  }
1881
2167
  async openDashboard() {
1882
- await this.openReleaseMenu("Dashboard");
2168
+ await this.util.openSideNavMenu("Dashboard");
2169
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Dashboard")).toBeVisible();
1883
2170
  }
1884
2171
  async openActivityLogs() {
1885
- await this.openReleaseMenu("ActivityLogs");
2172
+ await this.util.openSideNavMenu("Activity logs");
2173
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Activity logs")).toBeVisible();
1886
2174
  }
1887
2175
  async openReleaseMenu(menuItem) {
1888
2176
  await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
@@ -1919,15 +2207,17 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
1919
2207
  }
1920
2208
  }
1921
2209
  }
1922
- async backToRelease() {
1923
- await this.page.locator(".icon-back").click();
2210
+ async expectTemplateLabelNotToBePresent() {
2211
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-chip").filter({
2212
+ hasText: "TEMPLATE"
2213
+ })).not.toBeVisible();
1924
2214
  }
1925
2215
  async openTableView() {
1926
- await this.page.locator(".xl-icon.table-icon").click();
2216
+ await this.util.openSideNavMenu("Table");
1927
2217
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-grid-container")).toBeVisible();
1928
2218
  }
1929
2219
  async openPlannerView() {
1930
- await this.page.locator(".xl-icon.planner-icon").click();
2220
+ await this.util.openSideNavMenu("Planner");
1931
2221
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".gantt-container")).toBeVisible();
1932
2222
  }
1933
2223
  async expandGanttFolder() {
@@ -1940,6 +2230,9 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
1940
2230
  }
1941
2231
  }
1942
2232
  }
2233
+ async backToRelease() {
2234
+ await this.page.locator(".icon-back").click();
2235
+ }
1943
2236
  async expectTitleToBeInBreadcrumbLink(title) {
1944
2237
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-breadcrumbs a", {
1945
2238
  hasText: title
@@ -1950,6 +2243,41 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
1950
2243
  hasText: title
1951
2244
  })).toBeVisible();
1952
2245
  }
2246
+ async addNewPhase(phaseName) {
2247
+ await this.page.getByTestId("add-phase-btn").click();
2248
+ if (phaseName) {
2249
+ await this.phaseTitle.getByText("New Phase").click();
2250
+ await this.phaseTitle.getByRole("textbox").clear();
2251
+ await this.phaseTitle.getByRole("textbox").fill(phaseName);
2252
+ await this.page.keyboard.press("Enter");
2253
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseTitle.filter({
2254
+ hasText: phaseName
2255
+ })).toBeVisible();
2256
+ }
2257
+ }
2258
+ async renamePhase(oldPhaseName, newPhaseName) {
2259
+ await this.phaseTitle.getByText(oldPhaseName).click();
2260
+ await this.phaseTitle.filter({
2261
+ hasText: oldPhaseName
2262
+ }).locator(".editable").clear();
2263
+ await this.phaseTitle.filter({
2264
+ hasText: oldPhaseName
2265
+ }).locator(".editable").fill(newPhaseName);
2266
+ await this.page.keyboard.press("Enter");
2267
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseTitle.filter({
2268
+ hasText: newPhaseName
2269
+ })).toBeVisible();
2270
+ }
2271
+ async exportRelease() {
2272
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
2273
+ this.page.on("download", ()=>{});
2274
+ await this.page.getByTestId("template-export-btn").click();
2275
+ const downloadPromise = this.page.waitForEvent("download");
2276
+ await this.page.getByRole("link", {
2277
+ name: "Audit report (Excel)"
2278
+ }).click();
2279
+ await downloadPromise;
2280
+ }
1953
2281
  }
1954
2282
  class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
1955
2283
  constructor(page, phaseName){
@@ -1957,6 +2285,10 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
1957
2285
  this.phaseLocator = page.locator(".phase", {
1958
2286
  hasText: phaseName
1959
2287
  });
2288
+ this.commentBox = this.page.locator(`.input-block-level`);
2289
+ this.confirm = this.page.getByTestId("dot-button");
2290
+ this.contextMenuButton = this.page.locator("#context-menu-container li");
2291
+ this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
1960
2292
  }
1961
2293
  async setTitle(title) {
1962
2294
  await this.phaseLocator.locator(".phase-header .display").click();
@@ -1964,28 +2296,56 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
1964
2296
  await this.phaseLocator.locator(".phase-header input").fill(title);
1965
2297
  await this.phaseLocator.locator(".phase-header input").blur();
1966
2298
  }
2299
+ async isMenuItemEnabled(menuName, taskTitle) {
2300
+ await this.openContextMenuForTask(taskTitle);
2301
+ await (0, $kKeXs$playwrighttest.expect)(this.contextMenuButton.filter({
2302
+ hasText: menuName
2303
+ })).not.toHaveClass(/disabled/);
2304
+ await (0, $kKeXs$playwrighttest.expect)(this.contextMenuButton.filter({
2305
+ hasText: menuName
2306
+ }).locator("a")).not.toBeDisabled();
2307
+ await this.closeContextMenu();
2308
+ }
2309
+ async isMenuItemDisabled(menuName, taskTitle) {
2310
+ await this.openContextMenuForTask(taskTitle);
2311
+ await (0, $kKeXs$playwrighttest.expect)(this.contextMenuButton.filter({
2312
+ hasText: menuName
2313
+ })).toHaveClass(/disabled/);
2314
+ await (0, $kKeXs$playwrighttest.expect)(this.contextMenuButton.filter({
2315
+ hasText: menuName
2316
+ }).locator("a")).toBeDisabled();
2317
+ await this.closeContextMenu();
2318
+ }
2319
+ async expectMenuItemIsNotVisible(menuName, taskTitle) {
2320
+ await this.openContextMenuForTask(taskTitle);
2321
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#context-menu-container li").filter({
2322
+ hasText: menuName
2323
+ })).not.toBeVisible();
2324
+ await this.closeContextMenu();
2325
+ }
2326
+ async expectMenuItemIsVisible(menuName, taskTitle) {
2327
+ await this.openContextMenuForTask(taskTitle);
2328
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#context-menu-container li").filter({
2329
+ hasText: menuName
2330
+ })).toBeVisible();
2331
+ await this.closeContextMenu();
2332
+ }
2333
+ async closeContextMenu() {
2334
+ await this.page.locator("#release-header").click();
2335
+ }
1967
2336
  async expectTaskBorderWithColor(taskName, color) {
1968
2337
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.task-box:has-text('${taskName}')`)).toHaveCSS("border-top-color", color);
1969
2338
  }
1970
- async addTaskInPhase(taskTitle, taskType) {
2339
+ async addTaskInPhase(taskTitle, taskGroup, taskType) {
1971
2340
  await this.phaseLocator.getByText("Add task").click();
1972
- await this.phaseLocator.getByPlaceholder("Task title...").click();
1973
- await this.phaseLocator.getByPlaceholder("Task title...").fill(taskTitle);
1974
- await this.phaseLocator.locator(".xlr-ctx-menu-toggle").click();
1975
- const count = taskType.length - 1;
1976
- for(let i = 0; i < count; i++){
1977
- await this.page.locator('[data-test="' + taskType[i] + '"]').getByText(taskType[i]).click();
1978
- await this.page.getByText(taskType[i + 1]).click();
1979
- }
1980
- await this.phaseLocator.locator(".quick-controls-container a").getByText("Add", {
1981
- exact: true
1982
- }).click();
1983
- await this.phaseLocator.locator(".button.cancel").click();
1984
- await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task").filter({
1985
- hasText: taskTitle
1986
- })).toBeVisible({
1987
- timeout: 5000
1988
- });
2341
+ await this.page.locator("#task-selector").hover();
2342
+ await this.page.locator('button[aria-label="Clear"]').click();
2343
+ await this.page.locator("#task-selector").fill(taskGroup);
2344
+ await this.page.getByTestId(taskType).click();
2345
+ await this.page.locator(".icon-close").click();
2346
+ await this.page.locator("#task-title").fill(taskTitle);
2347
+ await this.page.getByTestId("save-select-task-btn").click();
2348
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.getByText(taskTitle)).toBeVisible();
1989
2349
  }
1990
2350
  async getNumberOfTasks() {
1991
2351
  return await this.phaseLocator.locator(".task").count();
@@ -1996,11 +2356,95 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
1996
2356
  async expectToHaveTitle(phaseTitle) {
1997
2357
  await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".phase-title")).toContainText(phaseTitle);
1998
2358
  }
2359
+ async openContextMenuForTask(taskTitle) {
2360
+ await this.phaseLocator.locator(".task").filter({
2361
+ hasText: taskTitle
2362
+ }).locator(".context-menu-button").click();
2363
+ }
2364
+ async skipFromContextMenu(comment, taskTitle) {
2365
+ await this.openContextMenuForTask(taskTitle);
2366
+ await this.page.locator(".dropdown-menu li").getByText("Skip").click();
2367
+ await this.commentBox.fill(comment);
2368
+ await this.page.getByRole("button", {
2369
+ name: "Skip",
2370
+ exact: true
2371
+ }).click();
2372
+ }
1999
2373
  async expectTemplateLabelNotToBePresent() {
2000
2374
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-chip").filter({
2001
2375
  hasText: "TEMPLATE"
2002
2376
  })).not.toBeVisible();
2003
2377
  }
2378
+ async openPhaseDetails() {
2379
+ await this.phaseLocator.locator(".phase-details").click();
2380
+ }
2381
+ async close() {
2382
+ await this.page.locator("button[type='button'] i[class='xl-icon close-icon']").click();
2383
+ }
2384
+ async expectStartDateToBeDisplayed() {
2385
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".modal .start-date")).toBeVisible();
2386
+ }
2387
+ async expectDueDateToBeDisplayed() {
2388
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".modal .due-date")).toBeVisible();
2389
+ }
2390
+ async expectEndDateToBeDisplayed() {
2391
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".modal .end-date")).toBeVisible();
2392
+ }
2393
+ async setTitleFromPhaseDetails(title) {
2394
+ await this.page.locator("h4.phase-title").click();
2395
+ await this.page.locator("h4.phase-title input").fill(title);
2396
+ await this.page.locator("h4.phase-title input").press("Enter");
2397
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("h4.phase-title")).toContainText(title);
2398
+ }
2399
+ async setDueDateFromPhaseDetails(date, monthYear) {
2400
+ await this.dateUtil.openDatePicker(".modal .due-date .date-editor");
2401
+ await this.dateUtil.setDate(date, monthYear);
2402
+ }
2403
+ async setScheduledStartDateFromPhaseDetails(date, monthYear) {
2404
+ await this.dateUtil.openDatePicker(".modal .scheduled-start-date .date-editor");
2405
+ await this.dateUtil.setDate(date, monthYear);
2406
+ }
2407
+ async expectDurationToBe(duration) {
2408
+ await this.dateUtil.expectDurationToBe(duration);
2409
+ }
2410
+ async setDurationFromPhaseDetails(days, hours, mins) {
2411
+ await this.dateUtil.setDuration(days, hours, mins);
2412
+ }
2413
+ async expectDueTimeToBe(format, date) {
2414
+ await this.dateUtil.expectTimeToBe(".modal .due-date .time-picker-holder input", format, date);
2415
+ }
2416
+ async deleteTaskInPhase(taskName) {
2417
+ await this.page.locator(".task").filter({
2418
+ hasText: taskName
2419
+ }).locator(".xl-icon.options-icon").click();
2420
+ await this.page.locator(".remove-task-button").click();
2421
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
2422
+ name: "Delete Task"
2423
+ })).toBeVisible();
2424
+ await this.page.getByRole("button", {
2425
+ name: "Delete"
2426
+ }).click();
2427
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator("li").filter({
2428
+ hasText: taskName
2429
+ })).not.toBeVisible();
2430
+ }
2431
+ async deletePhase(phaseName) {
2432
+ await this.phaseLocator.locator(".phase-header").filter({
2433
+ hasText: phaseName
2434
+ }).locator(".actions").hover();
2435
+ await this.phaseLocator.locator(".phase-header").filter({
2436
+ hasText: phaseName
2437
+ }).locator(".delete-icon").click();
2438
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
2439
+ name: "Delete Phase"
2440
+ })).toBeVisible();
2441
+ await this.page.getByRole("button", {
2442
+ name: "Delete"
2443
+ }).click();
2444
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".phase-header").filter({
2445
+ hasText: phaseName
2446
+ })).not.toBeVisible();
2447
+ }
2004
2448
  }
2005
2449
 
2006
2450
 
@@ -2034,6 +2478,601 @@ class $dc91ece6da6cadfa$export$1533b625ec0c75e2 extends (0, $f8721861c660dd88$ex
2034
2478
  }
2035
2479
 
2036
2480
 
2481
+ class $ce55a4fc3c0aa96a$export$e40b5d3c74b04c89 {
2482
+ static codePointA = 65;
2483
+ static codePointZ = 90;
2484
+ static getString() {
2485
+ return Math.random().toString(36).substring(2);
2486
+ }
2487
+ static getNumber(min, max) {
2488
+ return Math.floor(Math.random() * (max - min + 1) + min);
2489
+ }
2490
+ static getAlphabetsString(length) {
2491
+ let alphabets = "";
2492
+ for(let i = 0; i < length; i++)alphabets += String.fromCharCode($ce55a4fc3c0aa96a$export$e40b5d3c74b04c89.getNumber($ce55a4fc3c0aa96a$export$e40b5d3c74b04c89.codePointA, $ce55a4fc3c0aa96a$export$e40b5d3c74b04c89.codePointZ));
2493
+ return alphabets;
2494
+ }
2495
+ }
2496
+
2497
+
2498
+
2499
+
2500
+
2501
+
2502
+
2503
+
2504
+
2505
+ class $ceb2e9e08e1837c2$export$9b9454a7f137e99b extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2506
+ constructor(page){
2507
+ super(page);
2508
+ this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
2509
+ this.addName = page.locator('.xl-react-components input[placeholder="Add..."]');
2510
+ this.addDescription = page.getByPlaceholder("Set description...");
2511
+ }
2512
+ async clickNewDeliveryPattern() {
2513
+ await this.page.getByTestId("dot-button").click();
2514
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
2515
+ name: "Create delivery pattern"
2516
+ })).toBeVisible();
2517
+ }
2518
+ async setPatternName(patternName) {
2519
+ await this.addName.click();
2520
+ await this.addName.clear();
2521
+ await this.addName.fill(patternName);
2522
+ }
2523
+ async setPatternDescription(patternDescription) {
2524
+ await this.page.getByPlaceholder("Set description...").click();
2525
+ await this.page.getByPlaceholder("Set description...").clear();
2526
+ await this.page.getByPlaceholder("Set description...").fill(patternDescription);
2527
+ }
2528
+ async enableAutoComplete() {
2529
+ await this.page.getByRole("checkbox").check();
2530
+ }
2531
+ async disableAutoComplete() {
2532
+ await this.page.getByRole("checkbox").uncheck();
2533
+ }
2534
+ async setDuration(month, days, hours) {
2535
+ await this.page.getByRole("group", {
2536
+ name: "Pattern details"
2537
+ }).getByRole("textbox").click();
2538
+ await this.page.locator('input[name="months"]').click();
2539
+ await this.page.locator('input[name="months"]').fill(month.toString());
2540
+ await this.page.locator('input[name="days"]').click();
2541
+ await this.page.locator('input[name="days"]').fill(days.toString());
2542
+ await this.page.locator('input[name="hours"]').click();
2543
+ await this.page.locator('input[name="hours"]').fill(hours.toString());
2544
+ }
2545
+ async createNewPattern(patternName, patternDescription) {
2546
+ await this.clickNewDeliveryPattern();
2547
+ await this.setPatternName(patternName);
2548
+ await this.setPatternDescription(patternDescription);
2549
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".action-toolbar-actions button").filter({
2550
+ hasText: "Create"
2551
+ })).toBeEnabled();
2552
+ await this.page.locator(".action-toolbar-actions button").filter({
2553
+ hasText: "Create"
2554
+ }).click({
2555
+ force: true
2556
+ });
2557
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Delivery flow")).toBeVisible();
2558
+ }
2559
+ async clickEditPatternIcon(patternName) {
2560
+ await this.page.locator(".delivery-pattern-row").filter({
2561
+ hasText: patternName
2562
+ }).locator(".edit").click();
2563
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Delivery flow")).toBeVisible();
2564
+ }
2565
+ async clickCopyPatternIcon(patternName) {
2566
+ await this.page.locator(".delivery-pattern-row").filter({
2567
+ hasText: patternName
2568
+ }).locator(".copy").click();
2569
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("Copy delivery pattern")).toBeVisible();
2570
+ }
2571
+ async filterPatternByName(patternName) {
2572
+ await this.page.getByPlaceholder("Filter by name...").click();
2573
+ await this.page.getByPlaceholder("Filter by name...").clear();
2574
+ await this.page.getByPlaceholder("Filter by name...").fill(patternName);
2575
+ await this.page.getByPlaceholder("Filter by name...").press("Enter");
2576
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".delivery-pattern-row").filter({
2577
+ hasText: patternName
2578
+ })).toBeVisible();
2579
+ }
2580
+ async openProperties() {
2581
+ await this.util.openSideNavMenu("Properties");
2582
+ return new $ceb2e9e08e1837c2$var$Properties(this.page);
2583
+ }
2584
+ async back() {
2585
+ await this.page.getByTestId("back-button").click();
2586
+ }
2587
+ async copyPattern(existingPatternName, NewPatternName) {
2588
+ await this.clickCopyPatternIcon(existingPatternName);
2589
+ await this.page.locator(".xl-icon.close-icon").first().click();
2590
+ await this.addName.fill(NewPatternName);
2591
+ await this.page.getByRole("button", {
2592
+ name: "Continue"
2593
+ }).click();
2594
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Delivery flow")).toBeVisible();
2595
+ }
2596
+ async clickDeletePattern(patternName) {
2597
+ await this.page.locator(".delivery-pattern-row").filter({
2598
+ hasText: patternName
2599
+ }).locator(".delete").click();
2600
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("Delete delivery pattern", {
2601
+ exact: true
2602
+ })).toBeVisible();
2603
+ await this.page.getByRole("button", {
2604
+ name: "Delete"
2605
+ }).click();
2606
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".delivery-pattern-row").filter({
2607
+ hasText: patternName
2608
+ })).not.toBeVisible();
2609
+ }
2610
+ }
2611
+ class $ceb2e9e08e1837c2$var$Properties extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2612
+ constructor(page){
2613
+ super(page);
2614
+ this.addName = page.locator('.xl-react-components input[placeholder="Add..."]');
2615
+ this.addDescription = page.getByPlaceholder("Set description...");
2616
+ }
2617
+ async editName(name) {
2618
+ await this.addName.click();
2619
+ await this.addName.clear();
2620
+ await this.addName.fill(name);
2621
+ }
2622
+ async editDescription(description) {
2623
+ await this.page.getByPlaceholder("Set description...").click();
2624
+ await this.page.getByPlaceholder("Set description...").clear();
2625
+ await this.page.getByPlaceholder("Set description...").fill(description);
2626
+ }
2627
+ async editDuration(month, days, hours) {
2628
+ await this.page.getByRole("group", {
2629
+ name: "Pattern details"
2630
+ }).getByRole("textbox").click();
2631
+ await this.page.locator('input[name="months"]').click();
2632
+ await this.page.locator('input[name="months"]').fill(month.toString());
2633
+ await this.page.locator('input[name="days"]').click();
2634
+ await this.page.locator('input[name="days"]').fill(days.toString());
2635
+ await this.page.locator('input[name="hours"]').click();
2636
+ await this.page.locator('input[name="hours"]').fill(hours.toString());
2637
+ }
2638
+ async save() {
2639
+ await this.page.getByRole("button", {
2640
+ name: "Save"
2641
+ }).click();
2642
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".saved-text").textContent()).toContain("Last saved on ");
2643
+ }
2644
+ }
2645
+
2646
+
2647
+
2648
+
2649
+
2650
+
2651
+ class $0767ec703ce1f9a5$export$572f40d328c1d028 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2652
+ constructor(page){
2653
+ super(page);
2654
+ this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
2655
+ this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
2656
+ this.newReleaseGroupButton = page.getByTestId("dot-button");
2657
+ this.dateMonth = new Date();
2658
+ }
2659
+ async createGroup(groupName, startDate, endDate) {
2660
+ await this.newReleaseGroupButton.click();
2661
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("Create new release group")).toBeVisible();
2662
+ await this.enterGroupName(groupName);
2663
+ const monthYear = await this.dateUtil.getCurrentMonthYear();
2664
+ if (startDate) await this.enterStartDate(startDate, monthYear);
2665
+ if (endDate) await this.enterEndDate(endDate, monthYear);
2666
+ await this.clickCreate();
2667
+ await this.expectSuccessMessageOnReleaseGroupCreation();
2668
+ }
2669
+ async addReleaseToGroup(releaseName) {
2670
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".action-toolbar-actions button").filter({
2671
+ hasText: "Add release"
2672
+ })).toBeEnabled();
2673
+ await this.page.locator(".action-toolbar-actions button").filter({
2674
+ hasText: "Add release"
2675
+ }).click({
2676
+ force: true
2677
+ });
2678
+ await this.page.getByPlaceholder("Search for a release...").click();
2679
+ await this.page.getByPlaceholder("Search for a release...").fill(releaseName);
2680
+ await this.page.keyboard.press("Enter");
2681
+ await this.page.locator("release-list-modal-release-row").filter({
2682
+ hasText: releaseName
2683
+ }).getByRole("checkbox").check();
2684
+ await this.page.getByRole("button", {
2685
+ name: "Add"
2686
+ }).click();
2687
+ await this.expectSuccessMessageOnAddingReleaseToGroup();
2688
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
2689
+ name: releaseName
2690
+ })).toBeVisible();
2691
+ }
2692
+ async editReleaseGroupName(newGroupName) {
2693
+ await this.page.locator("#title").click();
2694
+ await this.page.locator("#title").clear();
2695
+ await this.page.locator("#title").fill(newGroupName);
2696
+ }
2697
+ async enterGroupName(groupName) {
2698
+ await this.page.locator("#title").click();
2699
+ await this.page.locator("#title").fill(groupName);
2700
+ }
2701
+ async enterStartDate(date, monthYear) {
2702
+ await this.page.locator(".form-group").filter({
2703
+ hasText: "start date"
2704
+ }).locator(".date input").click();
2705
+ await this.dateUtil.setDate(date, monthYear);
2706
+ }
2707
+ async enterEndDate(date, monthYear) {
2708
+ await this.page.locator(".form-group").filter({
2709
+ hasText: "end date"
2710
+ }).locator(".date input").click();
2711
+ await this.dateUtil.setDate(date, monthYear);
2712
+ }
2713
+ async clickCreate() {
2714
+ await this.page.getByRole("button", {
2715
+ name: "Create"
2716
+ }).click();
2717
+ }
2718
+ async expectSuccessMessageOnReleaseGroupCreation() {
2719
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("success")).toBeVisible();
2720
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".success").filter({
2721
+ hasText: "Created release group successfully"
2722
+ })).toBeVisible();
2723
+ }
2724
+ async expectSuccessMessageOnAddingReleaseToGroup() {
2725
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("success")).toBeVisible();
2726
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".success").filter({
2727
+ hasText: "Added release to release group successfully"
2728
+ })).toBeVisible();
2729
+ }
2730
+ async expectSuccessMessageOnUpdatingGroup() {
2731
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("success")).toBeVisible();
2732
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".success").filter({
2733
+ hasText: "Updated release group successfully"
2734
+ })).toBeVisible();
2735
+ }
2736
+ async searchReleaseGroupByTitle(title) {
2737
+ await this.page.getByPlaceholder("Search for groups...", {
2738
+ exact: true
2739
+ }).click();
2740
+ await this.page.getByPlaceholder("Search for groups...", {
2741
+ exact: true
2742
+ }).fill(title);
2743
+ await this.page.getByPlaceholder("Search for groups...", {
2744
+ exact: true
2745
+ }).press("Enter");
2746
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".fc-list-item-title")).toContainText(title);
2747
+ }
2748
+ async deleteReleaseGroup(title) {
2749
+ await this.page.locator(".fc-list-item-line").filter({
2750
+ hasText: title
2751
+ }).locator(".fc-item-delete").click();
2752
+ await this.page.getByRole("button", {
2753
+ name: "Delete"
2754
+ }).click();
2755
+ }
2756
+ async clickReleaseGroupEdit(title) {
2757
+ await this.page.locator(".fc-list-item-line").filter({
2758
+ hasText: title
2759
+ }).locator(".fc-item-update").click();
2760
+ }
2761
+ async clickSave() {
2762
+ await this.page.getByRole("button", {
2763
+ name: "Save"
2764
+ }).click();
2765
+ }
2766
+ async clickCancel() {
2767
+ await this.page.getByRole("button", {
2768
+ name: "Cancel"
2769
+ }).click();
2770
+ }
2771
+ async clickOnStatusField() {
2772
+ await this.page.locator(".ci-filter-status.ng-isolate-scope").click();
2773
+ }
2774
+ async statusFilter(statusNames) {
2775
+ await this.clickOnStatusClearAll();
2776
+ await this.clickOnStatusField();
2777
+ for(let i = 0; i < statusNames.length; i++)await this.page.locator(`i.xl-icon.icon-s.checkbox[data='${statusNames[i]}']`).click();
2778
+ }
2779
+ async clickOnStatusClearAll() {
2780
+ await this.clickOnStatusField();
2781
+ await this.page.locator("a.xl-react-link", {
2782
+ hasText: "Clear all"
2783
+ }).click();
2784
+ }
2785
+ async clickOnStatusSelectAll() {
2786
+ await this.clickOnStatusField();
2787
+ await this.page.locator("a.xl-react-link", {
2788
+ hasText: "Select all"
2789
+ }).click();
2790
+ }
2791
+ }
2792
+
2793
+
2794
+ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2795
+ constructor(page){
2796
+ super(page);
2797
+ this.expandButton = this.page.getByRole("button", {
2798
+ name: " Expand"
2799
+ });
2800
+ this.folderGroupsPage = new (0, $0767ec703ce1f9a5$export$572f40d328c1d028)(page);
2801
+ this.patternPage = new (0, $ceb2e9e08e1837c2$export$9b9454a7f137e99b)(page);
2802
+ this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
2803
+ }
2804
+ async openFoldersPage() {
2805
+ await this.page.goto("./#/folders");
2806
+ await (0, $kKeXs$playwrighttest.expect)(this.page).toHaveTitle("Folders - Digital.ai Release");
2807
+ return this;
2808
+ }
2809
+ async backToAllFolders() {
2810
+ await this.page.locator(".icon-back.dot-i").click();
2811
+ await (0, $kKeXs$playwrighttest.expect)(this.page).toHaveTitle("Folders - Digital.ai Release");
2812
+ await this.page.locator("button.btn-add-folder").isVisible();
2813
+ return this;
2814
+ }
2815
+ async createFolder(folderName) {
2816
+ await this.page.getByRole("button", {
2817
+ name: " Add folder"
2818
+ }).click();
2819
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("Create a new folder in root")).toBeVisible();
2820
+ await this.page.getByRole("textbox").fill(folderName);
2821
+ await this.page.getByRole("button", {
2822
+ name: "Create"
2823
+ }).click();
2824
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
2825
+ name: folderName
2826
+ })).toBeVisible();
2827
+ return this;
2828
+ }
2829
+ async openFolder(folderName) {
2830
+ await this.page.getByTitle(folderName).waitFor({
2831
+ timeout: 500
2832
+ });
2833
+ await this.page.getByTitle(folderName).click();
2834
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".MuiBreadcrumbs-li").getByRole("link", {
2835
+ name: `${folderName}`
2836
+ })).toBeVisible();
2837
+ return this;
2838
+ }
2839
+ async openGroups() {
2840
+ await this.util.openSideNavMenu("Groups");
2841
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Groups")).toBeVisible();
2842
+ return this.folderGroupsPage;
2843
+ }
2844
+ async createGroup(groupName) {
2845
+ await this.page.locator("//button[normalize-space()='New release group']").click();
2846
+ await this.page.locator("#title").type(groupName);
2847
+ await this.page.locator("button[type='submit']").click();
2848
+ return this;
2849
+ }
2850
+ async selectPlannedStatus() {
2851
+ await this.page.locator(".remaining-tags").click();
2852
+ await this.page.locator('.xl-react-link:text-is("Clear all")').click();
2853
+ await this.page.locator(".react-tagsinput").click();
2854
+ await this.page.locator(`.yt-option[title=Planned]`).click();
2855
+ await this.page.locator("//span[normalize-space()='Status']").click();
2856
+ return this;
2857
+ }
2858
+ async expectReleaseGroupisDisplayed(title) {
2859
+ //await this.page.locator(`.fc-list-item-title-wrapper .fc-list-item-title strong:text-is('${title}`).isVisible()
2860
+ await this.page.waitForSelector(`.fc-list-item-title-wrapper .fc-list-item-title strong:text-is('${title}')`);
2861
+ return this;
2862
+ }
2863
+ async createSubFolder(parentFolder, subFolderName) {
2864
+ await this.clickExpandButton();
2865
+ await this.page.getByRole("link", {
2866
+ name: parentFolder
2867
+ }).hover();
2868
+ await this.clickFolderOptions(parentFolder, "add");
2869
+ await this.page.getByRole("textbox").fill(subFolderName);
2870
+ await this.page.getByRole("button", {
2871
+ name: "Create"
2872
+ }).click();
2873
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
2874
+ name: subFolderName
2875
+ })).toBeVisible();
2876
+ }
2877
+ async renameFolder(existingFolderName, newFolderName) {
2878
+ await this.clickExpandButton();
2879
+ await this.page.getByRole("link", {
2880
+ name: existingFolderName
2881
+ }).hover();
2882
+ await this.clickFolderOptions(existingFolderName, "edit");
2883
+ await this.page.locator(".folder-row-wrapper input").click();
2884
+ await this.page.locator(".folder-row-wrapper input").fill(newFolderName);
2885
+ await this.page.keyboard.press("Enter");
2886
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
2887
+ name: newFolderName
2888
+ })).toBeVisible();
2889
+ }
2890
+ async deleteFolder(folderName) {
2891
+ await this.clickExpandButton();
2892
+ await this.page.getByRole("link", {
2893
+ name: folderName
2894
+ }).hover();
2895
+ await this.clickFolderOptions(folderName, "delete");
2896
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
2897
+ name: "Delete folder"
2898
+ }).locator("span")).toBeVisible();
2899
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".xl-react-modal .confirmation-content").getByText("You are about to delete the folder " + folderName + ". Folders nested in " + folderName + " will also be deleted.")).toBeVisible();
2900
+ await this.page.getByRole("button", {
2901
+ name: "Delete"
2902
+ }).click();
2903
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
2904
+ name: folderName
2905
+ })).not.toBeVisible();
2906
+ }
2907
+ async searchFolderByName(folderName) {
2908
+ await this.page.getByPlaceholder("Search folder...").click();
2909
+ await this.page.getByPlaceholder("Search folder...").clear();
2910
+ await this.page.getByPlaceholder("Search folder...").fill(folderName);
2911
+ await this.page.getByPlaceholder("Search folder...").press("Enter");
2912
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
2913
+ name: folderName
2914
+ })).toBeVisible();
2915
+ }
2916
+ async openPatterns() {
2917
+ await this.util.openSideNavMenu("Patterns");
2918
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Patterns")).toBeVisible();
2919
+ return this.patternPage;
2920
+ }
2921
+ async clickFolderOptions(folderName, option) {
2922
+ await this.page.locator(".folder-row-wrapper", {
2923
+ hasText: folderName
2924
+ }).locator(`.xl-icon.${option}-icon`).click();
2925
+ }
2926
+ async clickExpandButton() {
2927
+ if (await this.expandButton.isEnabled()) await this.expandButton.click();
2928
+ }
2929
+ }
2930
+
2931
+
2932
+
2933
+
2934
+
2935
+ class $506d511737b3ea46$export$74ca1eaaa9a0054 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2936
+ constructor(page){
2937
+ super(page);
2938
+ this.addListValue = this.page.locator(".variable-selector .xl-components-input-full input");
2939
+ this.addVariableValue = this.page.locator(".variable-value .xl-components-input-full input");
2940
+ this.addVariablelabel = this.page.locator(".variable-label input");
2941
+ this.listAddButton = this.page.getByRole("button", {
2942
+ name: "Add"
2943
+ });
2944
+ }
2945
+ async addVariableText(valuename) {
2946
+ await this.page.getByRole("combobox").selectOption("StringVariable");
2947
+ await this.page.locator(".variable-value").type(valuename);
2948
+ await this.submitTheVariable();
2949
+ }
2950
+ async addVariableListbox(possiblevalue) {
2951
+ await this.page.getByRole("combobox").selectOption("DropDownListBox");
2952
+ await this.addListValue.fill(possiblevalue);
2953
+ await this.listAddButton.click();
2954
+ await this.page.getByRole("combobox").nth(1).selectOption(possiblevalue);
2955
+ await this.submitTheVariable();
2956
+ }
2957
+ async addVariablePassword(possiblevalue) {
2958
+ await this.page.getByRole("combobox").selectOption("PasswordStringVariable");
2959
+ await this.page.locator('input[type="password"]').type(possiblevalue);
2960
+ await this.submitTheVariable();
2961
+ }
2962
+ async addVariableCheckbox() {
2963
+ await this.page.getByRole("combobox").selectOption("BooleanVariable");
2964
+ await this.page.getByRole("checkbox").check();
2965
+ await this.submitTheVariable();
2966
+ }
2967
+ async addVariableNumber(possiblevalue) {
2968
+ await this.page.getByRole("combobox").selectOption("IntegerVariable");
2969
+ await this.page.locator('input[ng-model="var.value"]').fill(possiblevalue);
2970
+ await this.submitTheVariable();
2971
+ }
2972
+ async addVariableList(possiblevalue1, possiblevalue2) {
2973
+ await this.page.getByRole("combobox").selectOption("ListStringVariable");
2974
+ await this.addVariableValue.fill(possiblevalue1);
2975
+ await this.listAddButton.click();
2976
+ await this.addVariableValue.fill(possiblevalue2);
2977
+ await this.listAddButton.click();
2978
+ await this.submitTheVariable();
2979
+ }
2980
+ async addVariableMultiList(possiblevalue1, possiblevalue2) {
2981
+ await this.page.getByRole("combobox").selectOption("MultiSelectListBox");
2982
+ await this.addListValue.fill(possiblevalue1);
2983
+ await this.listAddButton.click();
2984
+ await this.addListValue.fill(possiblevalue2);
2985
+ await this.listAddButton.click();
2986
+ await this.page.locator(".react-tagsinput").click();
2987
+ await this.page.getByText("Select all", {
2988
+ exact: true
2989
+ }).click();
2990
+ await this.submitTheVariable();
2991
+ }
2992
+ async addVariableDate() {
2993
+ await this.page.getByRole("combobox").selectOption("DateVariable");
2994
+ await this.page.getByText("Select date").click();
2995
+ }
2996
+ async setDate(date, monthYear) {
2997
+ const dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(this.page);
2998
+ await dateUtil.setDate(date, monthYear);
2999
+ }
3000
+ async addVariableKeyValueMap(keys1, values1) {
3001
+ await this.page.getByRole("combobox").selectOption("MapStringStringVariable");
3002
+ await this.page.getByPlaceholder("key").fill(keys1);
3003
+ await this.page.getByPlaceholder("Value").fill(values1);
3004
+ await this.listAddButton.click();
3005
+ await this.page.locator(".xl-map-string-string-div-buttons .search-icon").click();
3006
+ await this.page.getByRole("row", {
3007
+ name: "Search"
3008
+ }).getByRole("textbox").fill(keys1);
3009
+ const detail = await this.page.locator("table.table-condensed span").allInnerTexts();
3010
+ await (0, $kKeXs$playwrighttest.expect)(detail[0]).toEqual(keys1);
3011
+ await (0, $kKeXs$playwrighttest.expect)(detail[1]).toEqual(values1);
3012
+ await this.submitTheVariable();
3013
+ }
3014
+ async addVariableSet(possiblevalue1) {
3015
+ await this.page.getByRole("combobox").selectOption("SetStringVariable");
3016
+ await this.page.locator(".dip-input input").fill(possiblevalue1);
3017
+ await this.listAddButton.click();
3018
+ await this.submitTheVariable();
3019
+ }
3020
+ async addNewVariable(variableName, labelname, description) {
3021
+ await this.page.getByRole("button", {
3022
+ name: "New global variable"
3023
+ }).click();
3024
+ await this.page.locator(`div.input-group > input`).type(variableName);
3025
+ await this.addVariablelabel.fill(labelname);
3026
+ await this.page.locator(".variable-description input").fill(description);
3027
+ }
3028
+ async verifyGlobalVariableCreation(variableName) {
3029
+ await this.page.locator("[id='variables-filter']").fill(variableName);
3030
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".variable.ui-sortable-handle").filter({
3031
+ hasText: variableName
3032
+ })).toBeVisible();
3033
+ }
3034
+ async submitTheVariable() {
3035
+ const pagesubmit = await this.page.locator(".button.save");
3036
+ await pagesubmit.hover();
3037
+ await pagesubmit.click();
3038
+ }
3039
+ async deleteGlobalVariable(variableName) {
3040
+ await this.page.locator("[id='variables-filter']").fill(variableName);
3041
+ await this.page.getByText("Delete").click();
3042
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("h4.ng-binding")).toContainText(variableName);
3043
+ await this.page.getByRole("button", {
3044
+ name: "Cancel"
3045
+ }).click();
3046
+ await this.verifyGlobalVariableCreation(variableName);
3047
+ await this.page.getByText("Delete").click();
3048
+ await this.page.getByRole("button", {
3049
+ name: "Delete"
3050
+ }).click();
3051
+ await this.page.locator("alert.notice.ng-scope").isVisible();
3052
+ }
3053
+ async editVariable(variableName, editedvariabletext) {
3054
+ await this.page.locator("[id='variables-filter']").fill(variableName);
3055
+ await this.page.getByText("Edit").click();
3056
+ await this.addVariablelabel.clear();
3057
+ await this.addVariablelabel.fill(editedvariabletext);
3058
+ await this.page.getByRole("button", {
3059
+ name: "Save"
3060
+ }).click();
3061
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".variable.ui-sortable-handle").getByText(editedvariabletext, {
3062
+ exact: true
3063
+ })).toBeVisible();
3064
+ }
3065
+ }
3066
+
3067
+
3068
+
3069
+ class $9ef669cf95557cb5$export$36d69433c4f81145 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
3070
+ constructor(page){
3071
+ super(page);
3072
+ }
3073
+ }
3074
+
3075
+
2037
3076
 
2038
3077
 
2039
3078
  class $be4dd73206d8e76b$export$3cac5fd37ae64b91 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
@@ -2103,11 +3142,13 @@ class $bb5572a48b31014a$export$e2e2e1ffdce20c30 extends (0, $f8721861c660dd88$ex
2103
3142
  }
2104
3143
 
2105
3144
 
3145
+
2106
3146
  class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2107
3147
  constructor(page){
2108
3148
  super(page);
2109
3149
  this.page = page;
2110
3150
  this.modal = new (0, $bb5572a48b31014a$export$e2e2e1ffdce20c30)(page);
3151
+ this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
2111
3152
  }
2112
3153
  async openUsersPage() {
2113
3154
  this.page.goto("./#/users", {
@@ -2144,6 +3185,18 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
2144
3185
  }).locator("i").nth(1).click();
2145
3186
  await this.modal.delete();
2146
3187
  }
3188
+ async openRoles() {
3189
+ await this.util.openSideNavMenu("Roles");
3190
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Roles")).toBeVisible();
3191
+ }
3192
+ async openPermissions() {
3193
+ await this.util.openSideNavMenu("Permissions");
3194
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".permissions-table-v2")).toBeVisible();
3195
+ }
3196
+ async openTaskAccess() {
3197
+ await this.util.openSideNavMenu("Task access");
3198
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Task access")).toBeVisible();
3199
+ }
2147
3200
  }
2148
3201
 
2149
3202
 
@@ -2393,12 +3446,150 @@ class $a8855257f8bb2b12$export$43682cddead1dd78 extends (0, $f8721861c660dd88$ex
2393
3446
 
2394
3447
 
2395
3448
 
3449
+ class $a6a3c1345fc4767e$export$b6fbc3e67030138f extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
3450
+ async setStatus(status) {
3451
+ await this.page.locator(".react-tagsinput").click({
3452
+ force: true
3453
+ });
3454
+ await this.page.getByText("Clear all").click();
3455
+ await this.page.locator(".react-tagsinput").click({
3456
+ force: true
3457
+ });
3458
+ if (status === "Select all") await this.page.getByText(status).click();
3459
+ else await this.page.getByTitle(status).locator("i").first().click();
3460
+ }
3461
+ async openReleaseGroup(title) {
3462
+ await this.page.locator("xlr-release-group-row").filter({
3463
+ hasText: title
3464
+ }).getByRole("link").click();
3465
+ await this.page.getByTitle(title).click();
3466
+ await (0, $kKeXs$playwrighttest.expect)(this.page).toHaveURL(/.*ReleaseGroup/);
3467
+ }
3468
+ async expectReleaseGroupStatus(status) {
3469
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-status")).toContainText(status);
3470
+ }
3471
+ async expectReleaseGroupDisplayed(title) {
3472
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
3473
+ exact: true
3474
+ })).toBeVisible();
3475
+ }
3476
+ async expectReleaseGroupNotDisplayed(title) {
3477
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
3478
+ exact: true
3479
+ })).not.toBeVisible();
3480
+ }
3481
+ async searchReleaseGroupByTitle(title) {
3482
+ await this.page.getByPlaceholder("Search for groups...", {
3483
+ exact: true
3484
+ }).click();
3485
+ await this.page.getByPlaceholder("Search for groups...", {
3486
+ exact: true
3487
+ }).fill(title);
3488
+ await this.page.getByPlaceholder("Search for groups...", {
3489
+ exact: true
3490
+ }).press("Enter");
3491
+ }
3492
+ async deleteReleaseGroup(title) {
3493
+ await this.page.locator(".fc-list-item-line").filter({
3494
+ hasText: title
3495
+ }).locator(".fc-item-delete").click();
3496
+ await this.page.getByRole("button", {
3497
+ name: "Delete"
3498
+ }).click();
3499
+ }
3500
+ async clickReleaseGroupEdit(title) {
3501
+ await this.page.locator(".fc-list-item-line").filter({
3502
+ hasText: title
3503
+ }).locator(".fc-item-update").click();
3504
+ }
3505
+ async enterReleaseGroupDetails(new_title) {
3506
+ await this.page.locator(".modal-body").locator("#title").fill(new_title);
3507
+ }
3508
+ async clickSaveButton() {
3509
+ await this.page.locator(".modal-footer").getByRole("button", {
3510
+ name: "Save"
3511
+ }).click();
3512
+ }
3513
+ async clickCancelButton() {
3514
+ await this.page.locator(".modal-footer").getByRole("button", {
3515
+ name: "Cancel"
3516
+ }).click();
3517
+ }
3518
+ }
3519
+
3520
+
3521
+
3522
+
3523
+ class $3fad6a9449b6416f$export$1a0994e9c202d529 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
3524
+ async expectReleaseDisplayed(title) {
3525
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
3526
+ exact: true
3527
+ })).toBeVisible();
3528
+ }
3529
+ async expectReleaseNotDisplayed(title) {
3530
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
3531
+ exact: true
3532
+ })).not.toBeVisible({
3533
+ timeout: 10000
3534
+ });
3535
+ }
3536
+ async expectPhaseDisplayed(title) {
3537
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
3538
+ exact: true
3539
+ })).toBeVisible();
3540
+ }
3541
+ async openContextMenu(title) {
3542
+ await this.page.locator(".timeline-row-name").filter({
3543
+ hasText: title
3544
+ }).locator(".options-icon").click();
3545
+ }
3546
+ async removeFromReleaseGroup() {
3547
+ await this.page.getByRole("menuitem", {
3548
+ name: "Remove from group"
3549
+ }).locator("a").click();
3550
+ await this.page.getByRole("button", {
3551
+ name: "Remove"
3552
+ }).click();
3553
+ }
3554
+ async expectNumberOfReleases(num_of_release) {
3555
+ const elementCount = await this.page.locator(".timeline-row-name-release").count();
3556
+ (0, $kKeXs$playwrighttest.expect)(elementCount).toBe(num_of_release);
3557
+ }
3558
+ async openAddReleaseList() {
3559
+ await this.page.getByRole("button", {
3560
+ name: "Add release"
3561
+ }).click();
3562
+ }
3563
+ async filterReleases(title) {
3564
+ await this.page.getByPlaceholder("Search for a release...").click();
3565
+ await this.page.getByPlaceholder("Search for a release...").fill(title);
3566
+ await this.page.waitForTimeout(5000);
3567
+ await this.page.getByPlaceholder("Search for a release...").press("Enter");
3568
+ }
3569
+ async expectNumberOfReleasesOnModal(num_of_release) {
3570
+ const elementCount = await this.page.locator(".release-modal-line").count();
3571
+ (0, $kKeXs$playwrighttest.expect)(elementCount).toBe(num_of_release);
3572
+ }
3573
+ async selectAllReleaseCheckbox() {
3574
+ await this.page.getByLabel("Select all").check();
3575
+ }
3576
+ async addReleasesToGroup() {
3577
+ await this.page.getByRole("button", {
3578
+ name: "Add"
3579
+ }).click();
3580
+ }
3581
+ }
3582
+
3583
+
3584
+
3585
+
2396
3586
 
2397
3587
 
2398
3588
  class $ed2d4739e27d43c1$export$60c3bfa6385e2a10 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2399
3589
  constructor(page){
2400
3590
  super(page);
2401
3591
  this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
3592
+ this.commentBox = this.page.locator(`.input-block-level`);
2402
3593
  }
2403
3594
  async openTask(taskName) {
2404
3595
  await this.filterTaskByTitle(taskName);
@@ -2408,13 +3599,29 @@ class $ed2d4739e27d43c1$export$60c3bfa6385e2a10 extends (0, $f8721861c660dd88$ex
2408
3599
  await this.page.locator(`.row.task-inner`, {
2409
3600
  hasText: taskName
2410
3601
  }).locator("span.skip").click();
2411
- await this.page.getByPlaceholder("Give feedback or place a comment...").click();
2412
- await this.page.getByPlaceholder("Give feedback or place a comment...").fill(comment);
3602
+ await this.commentBox.click();
3603
+ await this.commentBox.fill(comment);
2413
3604
  await this.page.getByRole("button", {
2414
3605
  name: "Skip",
2415
3606
  exact: true
2416
3607
  }).click();
2417
3608
  }
3609
+ async fail(taskName, comment) {
3610
+ await this.page.locator(`.row.task-inner`, {
3611
+ hasText: taskName
3612
+ }).locator("span.fail").click();
3613
+ await this.commentBox.click();
3614
+ await this.commentBox.fill(comment);
3615
+ await this.page.getByRole("button", {
3616
+ name: "Fail",
3617
+ exact: true
3618
+ }).click();
3619
+ }
3620
+ async waitForTaskFailed(taskName) {
3621
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.row.task-inner`, {
3622
+ hasText: taskName
3623
+ }).getByText("Failed")).toBeVisible();
3624
+ }
2418
3625
  async waitForTaskInProgress(taskName) {
2419
3626
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.row.task-inner`, {
2420
3627
  hasText: taskName
@@ -2482,6 +3689,76 @@ class $ed2d4739e27d43c1$export$60c3bfa6385e2a10 extends (0, $f8721861c660dd88$ex
2482
3689
  async clickOnAssigneeButton(title) {
2483
3690
  await this.page.locator(`.btn-group-filter.btn-group button.btn.btn-flat[title="${title}"]`).click();
2484
3691
  }
3692
+ async clickOnAssignedToMe() {
3693
+ await this.page.locator(`button[title="Assigned to me"]`).click();
3694
+ }
3695
+ async clickOnAssignedToMyTeams() {
3696
+ await this.page.locator(`button[title="Assigned to my teams"]`).click();
3697
+ }
3698
+ async clickOnAssignedToAllAvailable() {
3699
+ await this.page.locator(`button[title="All available"]`).click();
3700
+ }
3701
+ async expectTaskToNotBeDisplayed(taskTitle) {
3702
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.row.task-inner`).filter({
3703
+ hasText: taskTitle
3704
+ }).getByText(taskTitle)).toHaveCount(0);
3705
+ }
3706
+ async expectTaskToBeDisplayed(taskTitle) {
3707
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.row.task-inner`).filter({
3708
+ hasText: taskTitle
3709
+ }).getByText(taskTitle)).toHaveCount(1);
3710
+ }
3711
+ async expectTasksToBeDisplayed(tasks) {
3712
+ for (const [taskTitle, shouldBeDisplayed] of Object.entries(tasks))if (shouldBeDisplayed) await this.expectTaskToBeDisplayed(taskTitle);
3713
+ else await this.expectTaskToNotBeDisplayed(taskTitle);
3714
+ }
3715
+ async expectTasksDisplayedInOrder(expectedTasks) {
3716
+ for (const task of expectedTasks){
3717
+ const taskElement = await this.page.locator(`[data-release-title='${task.releaseTitle}'] .row .task`).nth(task.taskPosition);
3718
+ await (0, $kKeXs$playwrighttest.expect)(taskElement).toHaveAttribute("data-task-title", task.taskTitle);
3719
+ }
3720
+ }
3721
+ async setOrderBy(orderBy) {
3722
+ await this.page.locator(".order-selector .btn:first-child").click();
3723
+ await this.page.locator(`.order-selector .bootstrap-link:has-text('${orderBy}')`).click();
3724
+ }
3725
+ async expectTaskCountForRelease(releaseTitle, expectedCount) {
3726
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`#tasks-content #task-list-grouped-view div:has-text('${releaseTitle}') .task`)).toHaveCount(expectedCount);
3727
+ }
3728
+ async setSearchFilter(filterText) {
3729
+ await this.page.locator(".searchFilter").fill(filterText);
3730
+ }
3731
+ async clearSearchFilter() {
3732
+ await this.page.locator(".searchFilter").clear();
3733
+ }
3734
+ async setTagsFilter(filterText) {
3735
+ await this.page.locator(".tag-input").fill(filterText);
3736
+ await this.page.locator(".tag-input").press("Enter");
3737
+ }
3738
+ async clickOnStatusField() {
3739
+ await this.page.locator(".ci-filter-status.ng-isolate-scope").click();
3740
+ }
3741
+ async clickOnStatus(statusNames) {
3742
+ await this.clickOnStatusClearAll();
3743
+ await this.clickOnStatusField();
3744
+ for(let i = 0; i < statusNames.length; i++)await this.page.locator(`i.xl-icon.icon-s.checkbox[data='${statusNames[i]}']`).click();
3745
+ // Clicking outside to close the grid dropdown
3746
+ await this.clickOnTasksLabel();
3747
+ }
3748
+ async clickOnStatusClearAll() {
3749
+ await this.clickOnStatusField();
3750
+ await this.page.locator("a.xl-react-link", {
3751
+ hasText: "Clear all"
3752
+ }).click();
3753
+ await this.clickOnTasksLabel();
3754
+ }
3755
+ async clickOnStatusSelectAll() {
3756
+ await this.clickOnStatusField();
3757
+ await this.page.locator("a.xl-react-link", {
3758
+ hasText: "Select all"
3759
+ }).click();
3760
+ await this.clickOnTasksLabel();
3761
+ }
2485
3762
  async assignTaskToMe(title) {
2486
3763
  await this.page.locator(`.task-line`).filter({
2487
3764
  hasText: title
@@ -2497,35 +3774,22 @@ class $ed2d4739e27d43c1$export$60c3bfa6385e2a10 extends (0, $f8721861c660dd88$ex
2497
3774
  async expectTaskTitle(taskTitle) {
2498
3775
  (0, $kKeXs$playwrighttest.expect)(await this.page.locator("#tasks0").innerText()).toContain(taskTitle);
2499
3776
  }
3777
+ async clickOnTasksLabel() {
3778
+ await this.page.getByLabel("breadcrumb").getByText("Tasks").click();
3779
+ }
2500
3780
  async expectGroupView(expected = true) {
2501
3781
  if (expected) {
2502
3782
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#group-tasks-by-release")).toBeChecked();
2503
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#task-list-grouped-view")).toBeVisible();
2504
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#task-ungrouped-view")).not.toBeVisible();
2505
- } else {
2506
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#group-tasks-by-release")).not.toBeChecked();
2507
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#task-list-grouped-view")).not.toBeVisible();
2508
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#task-ungrouped-view")).toBeVisible();
2509
- }
2510
- }
2511
- async changeGroupView() {
2512
- await this.page.locator("#group-tasks-by-release").click();
2513
- }
2514
- }
2515
-
2516
-
2517
-
2518
-
2519
- class $4efca3d4eadf892b$export$6adb8dd3f0d1e432 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2520
- constructor(page){
2521
- super(page);
2522
- this.tempDir = "";
2523
- this.content = "";
3783
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#task-list-grouped-view")).toBeVisible();
3784
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#task-ungrouped-view")).not.toBeVisible();
3785
+ } else {
3786
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#group-tasks-by-release")).not.toBeChecked();
3787
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#task-list-grouped-view")).not.toBeVisible();
3788
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#task-ungrouped-view")).toBeVisible();
3789
+ }
2524
3790
  }
2525
- async createTempFile(fileName, testInfo) {
2526
- const content = fileName.toString();
2527
- const tempDir = testInfo.outputPath(fileName.toString());
2528
- $kKeXs$fs.promises.writeFile(tempDir, content, "utf8");
3791
+ async changeGroupView() {
3792
+ await this.page.locator("#group-tasks-by-release").click();
2529
3793
  }
2530
3794
  }
2531
3795
 
@@ -2652,11 +3916,12 @@ class $3048f12d9d777352$export$98de9bca7d44fc1a extends (0, $f8721861c660dd88$ex
2652
3916
  await this.page.locator("#release-form-title").fill(name);
2653
3917
  }
2654
3918
  async setDescription(description) {
2655
- await this.page.getByText("Set description...").click();
2656
- await this.page.locator("span").filter({
2657
- hasText: "Set description... * Save"
2658
- }).locator("i").first().click();
3919
+ await this.page.getByText("Set description...").hover();
3920
+ await this.page.locator(".display").filter({
3921
+ hasText: "Set description"
3922
+ }).locator(".edit-icon").click();
2659
3923
  await this.page.locator("textarea").click();
3924
+ await this.page.locator("textarea").clear();
2660
3925
  await this.page.locator("textarea").fill(description);
2661
3926
  await this.page.getByText("Save", {
2662
3927
  exact: true
@@ -2704,13 +3969,16 @@ class $b12db2561a3bf785$export$899a7095bab1879d extends (0, $f8721861c660dd88$ex
2704
3969
  }
2705
3970
 
2706
3971
 
3972
+
2707
3973
  class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2708
3974
  constructor(page){
2709
3975
  super(page);
2710
3976
  this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
3977
+ this.phaseTitle = page.locator(".phase .phase-title");
2711
3978
  this.properties = new (0, $f4ca0e32f2cf5291$export$ccf2756779bad715)(page);
2712
3979
  this.createTemplatePage = new (0, $3048f12d9d777352$export$98de9bca7d44fc1a)(page);
2713
3980
  this.triggers = new (0, $b12db2561a3bf785$export$899a7095bab1879d)(page);
3981
+ this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
2714
3982
  }
2715
3983
  async openTemplateMenu(menuItem) {
2716
3984
  await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
@@ -2723,6 +3991,12 @@ class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$ex
2723
3991
  }).click();
2724
3992
  return this.taskDrawer;
2725
3993
  }
3994
+ async openTaskDrawerFromTableView(taskName) {
3995
+ await this.page.locator(".name-cell-title").getByText(taskName, {
3996
+ exact: true
3997
+ }).click();
3998
+ return this.taskDrawer;
3999
+ }
2726
4000
  async openTaskDrawerFromGrantt(taskName) {
2727
4001
  await this.page.locator(".gantt_tree_content").getByText(taskName, {
2728
4002
  exact: true
@@ -2730,19 +4004,39 @@ class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$ex
2730
4004
  return this.taskDrawer;
2731
4005
  }
2732
4006
  async openProperties() {
2733
- await this.openTemplateMenu("Properties");
4007
+ await this.util.openSideNavMenu("Properties");
4008
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Properties")).toBeVisible();
4009
+ }
4010
+ async openVariables() {
4011
+ await this.util.openSideNavMenu("Variables");
4012
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Variables")).toBeVisible();
4013
+ }
4014
+ async openRelationships() {
4015
+ await this.util.openSideNavMenu("Relationships");
4016
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Relationships")).toBeVisible();
4017
+ }
4018
+ async openTeamsPermissions() {
4019
+ await this.util.openSideNavMenu("Teams & Permissions");
4020
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Teams & Permissions")).toBeVisible();
4021
+ }
4022
+ async openDashboard() {
4023
+ await this.util.openSideNavMenu("Dashboard");
4024
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Dashboard")).toBeVisible();
4025
+ }
4026
+ async openActivityLogs() {
4027
+ await this.util.openSideNavMenu("Activity logs");
4028
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Activity logs")).toBeVisible();
2734
4029
  }
2735
4030
  async openTriggers() {
2736
4031
  await this.openTemplateMenu("Triggers");
4032
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Triggers")).toBeVisible();
2737
4033
  }
2738
4034
  async backToTemplate() {
2739
4035
  await this.page.locator(".icon-back").click();
2740
4036
  await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Templates")).toBeVisible();
2741
4037
  }
2742
4038
  async expectTemplateLabelToBePresent() {
2743
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-chip").filter({
2744
- hasText: "TEMPLATE"
2745
- })).toBeVisible();
4039
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("template-workflow-pill").getByText("Template")).toBeVisible();
2746
4040
  }
2747
4041
  async expectSubPage(menuItem, toBePresent) {
2748
4042
  if (toBePresent) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
@@ -2753,20 +4047,20 @@ class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$ex
2753
4047
  })).not.toBeVisible();
2754
4048
  }
2755
4049
  async openFlowView() {
2756
- await this.page.locator(".xl-icon.column-icon").click();
4050
+ await this.util.openSideNavMenu("Flow");
2757
4051
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#release-content")).toBeVisible();
2758
4052
  }
2759
4053
  async openTableView() {
2760
- await this.page.locator(".xl-icon.table-icon").click();
4054
+ await this.util.openSideNavMenu("Table");
2761
4055
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-grid-container")).toBeVisible();
2762
4056
  }
2763
4057
  async openPlannerView() {
2764
- await this.page.locator(".xl-icon.planner-icon").click();
4058
+ await this.util.openSideNavMenu("Planner");
2765
4059
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".gantt-container")).toBeVisible();
2766
4060
  }
2767
4061
  async openCodeView() {
2768
- await this.page.locator(".xl-icon.code-icon").click();
2769
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#dsl-content")).toBeVisible();
4062
+ await this.util.openSideNavMenu("Code");
4063
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Code")).toBeVisible();
2770
4064
  }
2771
4065
  async expandGanttFolder() {
2772
4066
  const icExpandTreeview1 = this.page.locator(".gantt_tree_icon.gantt_open");
@@ -2778,6 +4072,108 @@ class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$ex
2778
4072
  }
2779
4073
  }
2780
4074
  }
4075
+ async addNewPhase(phaseName) {
4076
+ await this.page.getByTestId("add-phase-btn").click();
4077
+ if (phaseName) {
4078
+ await this.phaseTitle.getByText("New Phase").click();
4079
+ await this.phaseTitle.getByRole("textbox").clear();
4080
+ await this.phaseTitle.getByRole("textbox").fill(phaseName);
4081
+ await this.page.keyboard.press("Enter");
4082
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseTitle.filter({
4083
+ hasText: phaseName
4084
+ })).toBeVisible();
4085
+ }
4086
+ }
4087
+ async renamePhase(oldPhaseName, newPhaseName) {
4088
+ await this.phaseTitle.getByText(oldPhaseName).click();
4089
+ await this.phaseTitle.filter({
4090
+ hasText: oldPhaseName
4091
+ }).locator(".editable").clear();
4092
+ await this.phaseTitle.filter({
4093
+ hasText: oldPhaseName
4094
+ }).locator(".editable").fill(newPhaseName);
4095
+ await this.page.keyboard.press("Enter");
4096
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseTitle.filter({
4097
+ hasText: newPhaseName
4098
+ })).toBeVisible();
4099
+ }
4100
+ getPhase(phaseName) {
4101
+ return new $959d38250779aa22$var$Phase(this.page, phaseName);
4102
+ }
4103
+ }
4104
+ class $959d38250779aa22$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
4105
+ constructor(page, phaseName){
4106
+ super(page);
4107
+ this.phaseLocator = page.locator(".phase", {
4108
+ hasText: phaseName
4109
+ });
4110
+ }
4111
+ async setTitle(title) {
4112
+ await this.phaseLocator.locator(".phase-header .display").click();
4113
+ await this.phaseLocator.locator(".phase-header input").clear();
4114
+ await this.phaseLocator.locator(".phase-header input").fill(title);
4115
+ await this.phaseLocator.locator(".phase-header input").blur();
4116
+ }
4117
+ async expectTaskBorderWithColor(taskName, color) {
4118
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.task-box:has-text('${taskName}')`)).toHaveCSS("border-top-color", color);
4119
+ }
4120
+ /**
4121
+ *
4122
+ * @param taskTitle Title of the task
4123
+ * @param taskType : Type of the task
4124
+ * @param taskTypeSelector : Selector of the task
4125
+ */ async addTaskInPhase(taskTitle, taskGroup, taskType) {
4126
+ await this.phaseLocator.getByText("Add task").click();
4127
+ await this.page.locator("#task-selector").hover();
4128
+ await this.page.locator('button[aria-label="Clear"]').click();
4129
+ await this.page.locator("#task-selector").fill(taskGroup);
4130
+ await this.page.getByTestId(taskType).click();
4131
+ await this.page.locator(".icon-close").click();
4132
+ await this.page.locator("#task-title").fill(taskTitle);
4133
+ await this.page.getByTestId("save-select-task-btn").click();
4134
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.getByText(taskTitle)).toBeVisible();
4135
+ }
4136
+ async getNumberOfTasks() {
4137
+ return await this.phaseLocator.locator(".task").count();
4138
+ }
4139
+ async expectToHaveNoneditableTitle(phaseTitle) {
4140
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".phase-title > span")).toContainText(phaseTitle);
4141
+ }
4142
+ async expectToHaveTitle(phaseTitle) {
4143
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".phase-title")).toContainText(phaseTitle);
4144
+ }
4145
+ async deleteTaskInPhase(taskName) {
4146
+ await this.page.locator(".task").filter({
4147
+ hasText: taskName
4148
+ }).locator(".xl-icon.options-icon").click();
4149
+ await this.page.locator(".remove-task-button").click();
4150
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
4151
+ name: "Delete Task"
4152
+ })).toBeVisible();
4153
+ await this.page.getByRole("button", {
4154
+ name: "Delete"
4155
+ }).click();
4156
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator("li").filter({
4157
+ hasText: taskName
4158
+ })).not.toBeVisible();
4159
+ }
4160
+ async deletePhase(phaseName) {
4161
+ await this.page.locator(".phase-header").filter({
4162
+ hasText: phaseName
4163
+ }).locator(".actions").hover();
4164
+ await this.page.locator(".phase-header").filter({
4165
+ hasText: phaseName
4166
+ }).locator(".delete-icon").click();
4167
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
4168
+ name: "Delete Phase"
4169
+ })).toBeVisible();
4170
+ await this.page.getByRole("button", {
4171
+ name: "Delete"
4172
+ }).click();
4173
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".phase-header").filter({
4174
+ hasText: phaseName
4175
+ })).not.toBeVisible();
4176
+ }
2781
4177
  }
2782
4178
 
2783
4179
 
@@ -2807,8 +4203,47 @@ class $8b6ce149dd48e48b$export$7e1d435fa474ee21 extends (0, $f8721861c660dd88$ex
2807
4203
  await this.page.getByRole("button", {
2808
4204
  name: "Continue"
2809
4205
  }).click();
2810
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-chip").filter({
2811
- hasText: "TEMPLATE"
4206
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("template-workflow-pill").getByText("Template")).toBeVisible();
4207
+ }
4208
+ async move(templateName, targetFolder) {
4209
+ await this.page.locator(".template").filter({
4210
+ hasText: templateName
4211
+ }).locator(".template-actions .move").click();
4212
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("Move template to")).toBeVisible();
4213
+ if (await this.page.getByRole("button", {
4214
+ name: "Expand"
4215
+ }).isEnabled()) await this.page.getByRole("button", {
4216
+ name: "Expand"
4217
+ }).click();
4218
+ await this.page.getByPlaceholder("Search folder...").click();
4219
+ await this.page.getByPlaceholder("Search folder...").fill(targetFolder);
4220
+ await this.page.getByRole("button", {
4221
+ name: targetFolder
4222
+ }).click();
4223
+ await this.page.getByRole("button", {
4224
+ name: "Move"
4225
+ }).click();
4226
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("Add", {
4227
+ exact: true
4228
+ })).toBeVisible();
4229
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("Remove")).toBeVisible();
4230
+ await this.page.getByRole("button", {
4231
+ name: "Move"
4232
+ }).click();
4233
+ }
4234
+ async metaInformation(templateName, validationMsg) {
4235
+ await this.page.locator(".title").filter({
4236
+ hasText: templateName
4237
+ }).locator(".template-context-menu").click();
4238
+ await this.page.getByRole("menuitem", {
4239
+ name: "Meta information"
4240
+ }).locator("a").click();
4241
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
4242
+ name: "Meta information - " + templateName
4243
+ })).toBeVisible();
4244
+ if (validationMsg) await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(validationMsg)).toBeVisible();
4245
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("button", {
4246
+ name: "Close"
2812
4247
  })).toBeVisible();
2813
4248
  }
2814
4249
  async expectTemplateVisible(title, expected = true) {
@@ -2829,6 +4264,7 @@ class $8b6ce149dd48e48b$export$7e1d435fa474ee21 extends (0, $f8721861c660dd88$ex
2829
4264
  }
2830
4265
  }
2831
4266
  async delete(title) {
4267
+ await this.searchBy(title);
2832
4268
  await this.page.locator(".title").filter({
2833
4269
  hasText: title
2834
4270
  }).locator(".delete").waitFor();
@@ -2849,15 +4285,7 @@ class $8b6ce149dd48e48b$export$7e1d435fa474ee21 extends (0, $f8721861c660dd88$ex
2849
4285
  }).click();
2850
4286
  }
2851
4287
  async openTemplateByName(templateName) {
2852
- await this.page.getByPlaceholder("Filter by title...", {
2853
- exact: true
2854
- }).click();
2855
- await this.page.getByPlaceholder("Filter by title...", {
2856
- exact: true
2857
- }).fill(templateName);
2858
- await this.page.getByPlaceholder("Filter by title...", {
2859
- exact: true
2860
- }).press("Enter");
4288
+ await this.filterByTitle(templateName);
2861
4289
  await this.page.locator(`.template`).filter({
2862
4290
  hasText: templateName
2863
4291
  }).locator(`.raised-link`).waitFor();
@@ -2865,162 +4293,51 @@ class $8b6ce149dd48e48b$export$7e1d435fa474ee21 extends (0, $f8721861c660dd88$ex
2865
4293
  hasText: templateName
2866
4294
  }).locator(`.raised-link`).click();
2867
4295
  }
2868
- }
2869
-
2870
-
2871
-
2872
-
2873
- class $a6a3c1345fc4767e$export$b6fbc3e67030138f extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2874
- async setStatus(status) {
2875
- await this.page.locator(".react-tagsinput").click({
2876
- force: true
2877
- });
2878
- await this.page.getByText("Clear all").click();
2879
- await this.page.locator(".react-tagsinput").click({
2880
- force: true
2881
- });
2882
- if (status === "Select all") await this.page.getByText(status).click();
2883
- else await this.page.getByTitle(status).locator("i").first().click();
2884
- }
2885
- async openReleaseGroup(title) {
2886
- await this.page.locator("xlr-release-group-row").filter({
2887
- hasText: title
2888
- }).getByRole("link").click();
2889
- await this.page.getByTitle(title).click();
2890
- await (0, $kKeXs$playwrighttest.expect)(this.page).toHaveURL(/.*ReleaseGroup/);
2891
- }
2892
- async expectReleaseGroupStatus(status) {
2893
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-status")).toContainText(status);
2894
- }
2895
- async expectReleaseGroupDisplayed(title) {
2896
- await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
2897
- exact: true
4296
+ async clickNewReleaseIcon(templateName) {
4297
+ await this.page.locator("xlr-template-row-component").filter({
4298
+ hasText: templateName
4299
+ }).locator(".link .add-icon").click();
4300
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
4301
+ name: "Create new release"
2898
4302
  })).toBeVisible();
2899
4303
  }
2900
- async expectReleaseGroupNotDisplayed(title) {
2901
- await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
2902
- exact: true
2903
- })).not.toBeVisible();
2904
- }
2905
- async searchReleaseGroupByTitle(title) {
2906
- await this.page.getByPlaceholder("Search for groups...", {
4304
+ async filterByTitle(templateName) {
4305
+ await this.page.getByPlaceholder("Filter by title...", {
2907
4306
  exact: true
2908
4307
  }).click();
2909
- await this.page.getByPlaceholder("Search for groups...", {
4308
+ await this.page.getByPlaceholder("Filter by title...", {
2910
4309
  exact: true
2911
- }).fill(title);
2912
- await this.page.getByPlaceholder("Search for groups...", {
4310
+ }).fill(templateName);
4311
+ await this.page.getByPlaceholder("Filter by title...", {
2913
4312
  exact: true
2914
4313
  }).press("Enter");
2915
4314
  }
2916
- async deleteReleaseGroup(title) {
2917
- await this.page.locator(".fc-list-item-line").filter({
2918
- hasText: title
2919
- }).locator(".fc-item-delete").click();
2920
- await this.page.getByRole("button", {
2921
- name: "Delete"
2922
- }).click();
2923
- }
2924
- async clickReleaseGroupEdit(title) {
2925
- await this.page.locator(".fc-list-item-line").filter({
2926
- hasText: title
2927
- }).locator(".fc-item-update").click();
2928
- }
2929
- async enterReleaseGroupDetails(new_title) {
2930
- await this.page.locator(".modal-body").locator("#title").fill(new_title);
2931
- }
2932
- async clickSaveButton() {
2933
- await this.page.locator(".modal-footer").getByRole("button", {
2934
- name: "Save"
2935
- }).click();
2936
- }
2937
- async clickCancelButton() {
2938
- await this.page.locator(".modal-footer").getByRole("button", {
2939
- name: "Cancel"
2940
- }).click();
2941
- }
2942
4315
  }
2943
4316
 
2944
4317
 
2945
4318
 
2946
-
2947
- class $3fad6a9449b6416f$export$1a0994e9c202d529 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2948
- async expectReleaseDisplayed(title) {
2949
- await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
2950
- exact: true
2951
- })).toBeVisible();
2952
- }
2953
- async expectReleaseNotDisplayed(title) {
2954
- await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
2955
- exact: true
2956
- })).not.toBeVisible({
2957
- timeout: 10000
2958
- });
2959
- }
2960
- async expectPhaseDisplayed(title) {
2961
- await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
2962
- exact: true
2963
- })).toBeVisible();
2964
- }
2965
- async openContextMenu(title) {
2966
- await this.page.locator(".timeline-row-name").filter({
2967
- hasText: title
2968
- }).locator(".options-icon").click();
2969
- }
2970
- async removeFromReleaseGroup() {
2971
- await this.page.getByRole("menuitem", {
2972
- name: "Remove from group"
2973
- }).locator("a").click();
2974
- await this.page.getByRole("button", {
2975
- name: "Remove"
2976
- }).click();
2977
- }
2978
- async expectNumberOfReleases(num_of_release) {
2979
- const elementCount = await this.page.locator(".timeline-row-name-release").count();
2980
- (0, $kKeXs$playwrighttest.expect)(elementCount).toBe(num_of_release);
2981
- }
2982
- async openAddReleaseList() {
2983
- await this.page.getByRole("button", {
2984
- name: "Add release"
2985
- }).click();
2986
- }
2987
- async filterReleases(title) {
2988
- await this.page.getByPlaceholder("Search for a release...").click();
2989
- await this.page.getByPlaceholder("Search for a release...").fill(title);
2990
- await this.page.waitForTimeout(5000);
2991
- await this.page.getByPlaceholder("Search for a release...").press("Enter");
2992
- }
2993
- async expectNumberOfReleasesOnModal(num_of_release) {
2994
- const elementCount = await this.page.locator(".release-modal-line").count();
2995
- (0, $kKeXs$playwrighttest.expect)(elementCount).toBe(num_of_release);
2996
- }
2997
- async selectAllReleaseCheckbox() {
2998
- await this.page.getByLabel("Select all").check();
2999
- }
3000
- async addReleasesToGroup() {
3001
- await this.page.getByRole("button", {
3002
- name: "Add"
3003
- }).click();
3004
- }
3005
- }
3006
-
3007
-
3008
4319
  class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
3009
4320
  constructor(page){
3010
4321
  this.page = page;
4322
+ this.dataRandomGenerator = new (0, $ce55a4fc3c0aa96a$export$e40b5d3c74b04c89)();
4323
+ this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
4324
+ this.folderPage = new (0, $9058d40a81bdb1f5$export$b453f08936c58edb)(page);
4325
+ this.globalvariable = new (0, $506d511737b3ea46$export$74ca1eaaa9a0054)(page);
4326
+ this.homePage = new (0, $9ef669cf95557cb5$export$36d69433c4f81145)(page);
3011
4327
  this.releasePage = new (0, $9b9a8c3da392d020$export$f43492e8ac3c566)(page);
3012
4328
  this.settingsMenu = new (0, $7867194f18360347$export$1d7840d5cdc861d5)(page);
3013
4329
  this.usersPage = new (0, $3ceab7c613cabfd6$export$107317390f5aa598)(page);
3014
4330
  this.applicationPage = new (0, $dc91ece6da6cadfa$export$1533b625ec0c75e2)(page);
4331
+ this.taskDetailsPage = new (0, $a642d735048996f9$export$922081b54f2ab994)(page);
3015
4332
  this.taskListPage = new (0, $ed2d4739e27d43c1$export$60c3bfa6385e2a10)(page);
3016
4333
  this.templatePage = new (0, $959d38250779aa22$export$8c8e7207254accc2)(page);
3017
4334
  this.templateListPage = new (0, $8b6ce149dd48e48b$export$7e1d435fa474ee21)(page);
3018
- this.taskDetailsPage = new (0, $a642d735048996f9$export$922081b54f2ab994)(page);
4335
+ this.randomString = new (0, $ce55a4fc3c0aa96a$export$e40b5d3c74b04c89)();
3019
4336
  this.releaseCalendarPage = new (0, $a8855257f8bb2b12$export$43682cddead1dd78)(page);
3020
- this.releaseListPage = new (0, $87643f2d97b0644e$export$a678525e79c4ccc4)(page);
3021
4337
  this.releaseGroupPage = new (0, $a6a3c1345fc4767e$export$b6fbc3e67030138f)(page);
3022
4338
  this.releaseGroupTimelinePage = new (0, $3fad6a9449b6416f$export$1a0994e9c202d529)(page);
3023
- this.util = new (0, $4efca3d4eadf892b$export$6adb8dd3f0d1e432)(page);
4339
+ this.releaseListPage = new (0, $87643f2d97b0644e$export$a678525e79c4ccc4)(page);
4340
+ this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
3024
4341
  }
3025
4342
  async openTemplate(id) {
3026
4343
  return this.openReleaseOrTemplate(id, false);
@@ -3121,12 +4438,12 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
3121
4438
  return new (0, $9b9a8c3da392d020$export$f43492e8ac3c566)(this.page);
3122
4439
  }
3123
4440
  async collapseSideView() {
3124
- await this.page.locator('.dot-tooltip[aria-label="Collapse"]').click();
3125
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.dot-tooltip[aria-label="Collapse"]')).not.toBeVisible();
4441
+ await this.page.getByLabel("Collapse Q").click();
4442
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("Collapse Q")).not.toBeVisible();
3126
4443
  }
3127
4444
  async expandSideView() {
3128
- await this.page.locator('.dot-tooltip[aria-label="Expand"]').click();
3129
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.dot-tooltip[aria-label="Expand"]')).not.toBeVisible();
4445
+ await this.page.getByLabel("Expand Q").click();
4446
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("Expand Q")).not.toBeVisible();
3130
4447
  }
3131
4448
  }
3132
4449
 
@@ -4079,6 +5396,13 @@ class $6998c6a53a9eb4fa$var$Fixtures {
4079
5396
  permissions(rolePermissions) {
4080
5397
  return this.doPost("fixtures/roles/permissions/global", rolePermissions);
4081
5398
  }
5399
+ updateUserProfile(username, profile) {
5400
+ profile.id = username;
5401
+ profile.type = "xlrelease.UserProfile";
5402
+ profile.canonicalId = username.toLowerCase();
5403
+ if (this.userProfiles.indexOf(profile.canonicalId) === -1) this.userProfiles.push(profile.canonicalId);
5404
+ return this.doPut("fixtures/userProfile", profile);
5405
+ }
4082
5406
  deleteRole(roleName) {
4083
5407
  return this.doDelete(`fixtures/role/${roleName}`);
4084
5408
  }