@digital-ai/devops-page-object-release 0.0.13 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.js CHANGED
@@ -2,6 +2,8 @@ import {test as $hOLA6$test, expect as $hOLA6$expect} from "@playwright/test";
2
2
  import {execFile as $hOLA6$execFile} from "child_process";
3
3
  import $hOLA6$lodashisNil from "lodash/isNil";
4
4
  import {env as $hOLA6$env} from "process";
5
+ import {promises as $hOLA6$promises} from "fs";
6
+ import $hOLA6$moment from "moment";
5
7
  import $hOLA6$lodashisUndefined from "lodash/isUndefined";
6
8
  import $hOLA6$lodasheach from "lodash/each";
7
9
  import $hOLA6$lodashforEach from "lodash/forEach";
@@ -15,6 +17,7 @@ import $hOLA6$lodashtoPairs from "lodash/toPairs";
15
17
 
16
18
 
17
19
 
20
+
18
21
  class $9626bc9256ce31f7$export$2b65d1d97338f32b {
19
22
  constructor(page){
20
23
  this.page = page;
@@ -577,6 +580,17 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
577
580
  async expectTaskTitle(taskTitle) {
578
581
  (0, $hOLA6$expect)(await this.page.locator(".task-drawer .task-title-input .dot-view-mode-typography").innerText()).toContain(taskTitle);
579
582
  }
583
+ async expectTypeToContain(taskType) {
584
+ (0, $hOLA6$expect)(await this.page.locator(".task-drawer .task-type").innerText()).toContain(taskType);
585
+ }
586
+ async clickExpand() {
587
+ await this.page.locator(".icon-fullscreen-enter").click();
588
+ await (0, $hOLA6$expect)(this.page.locator(".icon-fullscreen-enter")).not.toBeVisible();
589
+ }
590
+ async clickShrink() {
591
+ await this.page.locator(".icon-fullscreen-exit").click();
592
+ await (0, $hOLA6$expect)(this.page.locator(".icon-fullscreen-exit")).not.toBeVisible();
593
+ }
580
594
  }
581
595
 
582
596
 
@@ -627,6 +641,41 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
627
641
  name: "Reset"
628
642
  }).click();
629
643
  }
644
+ async expectWithAttachment(filename) {
645
+ await (0, $hOLA6$expect)(this.page.locator(".attachments tr td a").filter({
646
+ hasText: filename
647
+ })).toBeVisible();
648
+ }
649
+ async getAttachmentsListCount() {
650
+ return await this.page.locator(".attachments tr").count();
651
+ }
652
+ async uploadFile(filePath) {
653
+ const fileChooserPromise = this.page.waitForEvent("filechooser");
654
+ await this.page.locator('input[type="file"]').click();
655
+ const fileChooser = await fileChooserPromise;
656
+ await fileChooser.setFiles(filePath);
657
+ }
658
+ async expectWithNoAttachment(filename) {
659
+ const test = await this.page.locator(".attachments").isVisible();
660
+ if (test) await (0, $hOLA6$expect)(this.page.locator(".attachments tr td a").filter({
661
+ hasText: filename
662
+ })).not.toBeVisible();
663
+ }
664
+ async downloadFile(filename) {
665
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
666
+ const downloadPromise1 = this.page.waitForEvent("download");
667
+ await this.page.getByText(filename).click();
668
+ const download = await downloadPromise1;
669
+ // Wait for the download process to complete and save the downloaded file in given path.
670
+ await download.saveAs("./core/xlr-ui/build/playwright/" + download.suggestedFilename());
671
+ (0, $hOLA6$expect)(download.suggestedFilename()).toBe(filename);
672
+ }
673
+ async deleteAttachment(fileName) {
674
+ await this.page.getByRole("row", {
675
+ name: fileName
676
+ }).locator("span").click();
677
+ await this.page.getByText("Remove").click();
678
+ }
630
679
  }
631
680
 
632
681
 
@@ -710,6 +759,18 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
710
759
  }).click();
711
760
  return this.taskDrawer;
712
761
  }
762
+ async openTaskDrawerFromTableView(taskName) {
763
+ await this.page.locator(".name-cell-title").getByText(taskName, {
764
+ exact: true
765
+ }).click();
766
+ return this.taskDrawer;
767
+ }
768
+ async openTaskDrawerFromGrantt(taskName) {
769
+ await this.page.locator(".gantt_tree_content").getByText(taskName, {
770
+ exact: true
771
+ }).dblclick();
772
+ return this.taskDrawer;
773
+ }
713
774
  async openVariables() {
714
775
  await this.openReleaseMenu("Variables");
715
776
  }
@@ -769,6 +830,29 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
769
830
  async backToRelease() {
770
831
  await this.page.locator(".icon-back").click();
771
832
  }
833
+ async openTableView() {
834
+ await this.page.locator(".xl-icon.table-icon").click();
835
+ await (0, $hOLA6$expect)(this.page.locator(".release-grid-container")).toBeVisible();
836
+ }
837
+ async openPlannerView() {
838
+ await this.page.locator(".xl-icon.planner-icon").click();
839
+ await (0, $hOLA6$expect)(this.page.locator(".gantt-container")).toBeVisible();
840
+ }
841
+ async expandGanttFolder() {
842
+ const icExpandTreeview1 = this.page.locator(".gantt_tree_icon.gantt_open");
843
+ for (const element of (await icExpandTreeview1.all())){
844
+ const blnVal = await element.isVisible();
845
+ if (blnVal) {
846
+ await element.click();
847
+ await this.expandGanttFolder();
848
+ }
849
+ }
850
+ }
851
+ async expectTitleToBeInBreadcrumbLink(title) {
852
+ (0, $hOLA6$expect)(this.page.locator(".dot-breadcrumbs a", {
853
+ hasText: title
854
+ })).toBeVisible();
855
+ }
772
856
  }
773
857
  class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
774
858
  constructor(page, phaseName){
@@ -815,6 +899,11 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
815
899
  async expectToHaveTitle(phaseTitle) {
816
900
  await (0, $hOLA6$expect)(this.phaseLocator.locator(".phase-title")).toContainText(phaseTitle);
817
901
  }
902
+ async expectTemplateLabelNotToBePresent() {
903
+ await (0, $hOLA6$expect)(this.page.locator(".dot-chip").filter({
904
+ hasText: "TEMPLATE"
905
+ })).not.toBeVisible();
906
+ }
818
907
  }
819
908
 
820
909
 
@@ -921,7 +1010,6 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
921
1010
  constructor(page){
922
1011
  super(page);
923
1012
  this.page = page;
924
- this.newUserButton = this.page.getByTestId("new-user-btn");
925
1013
  this.modal = new (0, $21185a378c23589e$export$e2e2e1ffdce20c30)(page);
926
1014
  }
927
1015
  async openUsersPage() {
@@ -938,7 +1026,7 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
938
1026
  }).locator(".Mui-checked")).toBeChecked();
939
1027
  }
940
1028
  async addUser() {
941
- await this.newUserButton.click();
1029
+ await this.page.locator(".new-user-btn").click();
942
1030
  }
943
1031
  async createUser(username, password) {
944
1032
  await this.modal.setUserName(username);
@@ -1207,6 +1295,580 @@ class $3a340a3f4fd8f04d$export$43682cddead1dd78 extends (0, $9626bc9256ce31f7$ex
1207
1295
 
1208
1296
 
1209
1297
 
1298
+
1299
+
1300
+
1301
+ class $c37c93912f458e81$export$60c3bfa6385e2a10 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1302
+ constructor(page){
1303
+ super(page);
1304
+ this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
1305
+ }
1306
+ async openTask(taskName) {
1307
+ await this.filterTaskByTitle(taskName);
1308
+ await this.page.getByText(taskName).click();
1309
+ }
1310
+ async openTaskInReleaseView(taskName) {
1311
+ await this.page.locator(`.row.task-inner`, {
1312
+ hasText: taskName
1313
+ }).locator("a.view-in-release").click();
1314
+ }
1315
+ async openCalendarViaTaskDueDate(taskName) {
1316
+ await this.page.locator(`.row.task-inner`, {
1317
+ hasText: taskName
1318
+ }).locator(`.calendar-link a`).click();
1319
+ }
1320
+ async filterTaskByTitle(taskname) {
1321
+ await this.page.locator(".toggle-search-filter").click();
1322
+ await this.page.locator(".searchFilter").fill(taskname);
1323
+ await this.page.locator(".searchFilter").press("Enter");
1324
+ await (0, $hOLA6$expect)(this.page.locator("//div[@data-task-title]").filter({
1325
+ hasText: taskname
1326
+ })).toBeVisible();
1327
+ }
1328
+ async filterTasksByTag(tag, taskTitleForValidation) {
1329
+ await this.page.locator(".toggle-search-filter").click();
1330
+ await this.page.locator(".tag-input").fill(tag);
1331
+ await this.page.locator(".tag-input").press("Enter");
1332
+ //TODO: Validation can be changed based on actual test case implementation
1333
+ await (0, $hOLA6$expect)(this.page.locator("//div[@data-task-title]").filter({
1334
+ hasText: taskTitleForValidation
1335
+ })).toBeVisible();
1336
+ }
1337
+ async filterTasksByReleaseTitle(releaseTitle) {
1338
+ await this.page.locator(".toggle-search-filter").click();
1339
+ await this.page.locator(".release-input").fill(releaseTitle);
1340
+ await this.page.locator(".release-input").press("Enter");
1341
+ await (0, $hOLA6$expect)(this.page.locator(".group-title").filter({
1342
+ hasText: releaseTitle
1343
+ })).toBeVisible();
1344
+ }
1345
+ async openSingleTask(taskId, showDetails = false) {
1346
+ await this.page.goto(`./#/tasks/${taskId}?showDetails=${showDetails}`);
1347
+ }
1348
+ async expectReleaseLinksDisplayed(releaseTitle, displayed = true) {
1349
+ if (displayed) {
1350
+ await (0, $hOLA6$expect)(this.page.getByRole("link", {
1351
+ name: "" + releaseTitle + ""
1352
+ })).toBeVisible();
1353
+ await (0, $hOLA6$expect)(this.page.locator(".view-in-release")).toBeVisible();
1354
+ } else {
1355
+ await (0, $hOLA6$expect)(this.page.getByRole("link", {
1356
+ name: "" + releaseTitle + ""
1357
+ })).not.toBeVisible();
1358
+ await (0, $hOLA6$expect)(this.page.locator(".view-in-release")).not.toBeVisible();
1359
+ }
1360
+ }
1361
+ async expectTaskTitle(taskTitle) {
1362
+ (0, $hOLA6$expect)(await this.page.locator("#tasks0").innerText()).toContain(taskTitle);
1363
+ }
1364
+ async expectGroupView(expected = true) {
1365
+ if (expected) {
1366
+ await (0, $hOLA6$expect)(this.page.locator("#group-tasks-by-release")).toBeChecked();
1367
+ await (0, $hOLA6$expect)(this.page.locator("#task-list-grouped-view")).toBeVisible();
1368
+ await (0, $hOLA6$expect)(this.page.locator("#task-ungrouped-view")).not.toBeVisible();
1369
+ } else {
1370
+ await (0, $hOLA6$expect)(this.page.locator("#group-tasks-by-release")).not.toBeChecked();
1371
+ await (0, $hOLA6$expect)(this.page.locator("#task-list-grouped-view")).not.toBeVisible();
1372
+ await (0, $hOLA6$expect)(this.page.locator("#task-ungrouped-view")).toBeVisible();
1373
+ }
1374
+ }
1375
+ async changeGroupView() {
1376
+ await this.page.locator("#group-tasks-by-release").click();
1377
+ }
1378
+ }
1379
+
1380
+
1381
+
1382
+
1383
+ class $aa992f812fb1e470$export$6adb8dd3f0d1e432 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1384
+ constructor(page){
1385
+ super(page);
1386
+ this.tempDir = "";
1387
+ this.content = "";
1388
+ }
1389
+ async createTempFile(fileName, testInfo) {
1390
+ const content = fileName.toString();
1391
+ const tempDir = testInfo.outputPath(fileName.toString());
1392
+ $hOLA6$promises.writeFile(tempDir, content, "utf8");
1393
+ }
1394
+ }
1395
+
1396
+
1397
+
1398
+
1399
+
1400
+
1401
+
1402
+
1403
+ class $880dec03c4eca8dc$export$ccf2756779bad715 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1404
+ constructor(page){
1405
+ super(page);
1406
+ }
1407
+ async getAttachmentsListCount() {
1408
+ return await this.page.locator(".attachments tr").count();
1409
+ }
1410
+ async uploadFile(filePath) {
1411
+ const fileChooserPromise = this.page.waitForEvent("filechooser");
1412
+ await this.page.locator('input[type="file"]').click();
1413
+ const fileChooser = await fileChooserPromise;
1414
+ await fileChooser.setFiles(filePath);
1415
+ }
1416
+ async expectWithAttachment(filename) {
1417
+ await (0, $hOLA6$expect)(this.page.locator(".attachments tr td a").filter({
1418
+ hasText: filename
1419
+ })).toBeVisible();
1420
+ }
1421
+ async expectWithNoAttachment(filename) {
1422
+ const test = await this.page.locator(".attachments").isVisible();
1423
+ if (test) await (0, $hOLA6$expect)(this.page.locator(".attachments tr td a").filter({
1424
+ hasText: filename
1425
+ })).not.toBeVisible();
1426
+ }
1427
+ async downloadFile(filename) {
1428
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1429
+ const downloadPromise1 = this.page.waitForEvent("download");
1430
+ await this.page.getByText(filename).click();
1431
+ const download = await downloadPromise1;
1432
+ // Wait for the download process to complete and save the downloaded file in given path.
1433
+ await download.saveAs("./core/xlr-ui/build/playwright/" + download.suggestedFilename());
1434
+ (0, $hOLA6$expect)(download.suggestedFilename()).toBe(filename);
1435
+ }
1436
+ async deleteAttachment(fileName) {
1437
+ await this.page.getByRole("row", {
1438
+ name: fileName
1439
+ }).locator("span").click();
1440
+ await this.page.getByText("Remove").click();
1441
+ }
1442
+ async save() {
1443
+ await this.page.getByRole("button", {
1444
+ name: "Save"
1445
+ }).click({
1446
+ timeout: 8000
1447
+ });
1448
+ await (0, $hOLA6$expect)(this.page.locator(".form-footer .last-saved")).toBeVisible();
1449
+ }
1450
+ async reset() {
1451
+ await this.page.getByRole("button", {
1452
+ name: "Reset"
1453
+ }).waitFor();
1454
+ await this.page.getByRole("button", {
1455
+ name: "Reset"
1456
+ }).click();
1457
+ }
1458
+ async removeDueDate() {
1459
+ await this.page.locator(".due-date .close-icon").click();
1460
+ }
1461
+ async setScheduledStartDate(date, monthYear) {
1462
+ await this.page.locator(`.scheduled-start-date .date`).click();
1463
+ const prev = this.page.locator(".datepicker-days .prev");
1464
+ const next = this.page.locator(".datepicker-days .next");
1465
+ const monYear = this.page.locator(".datepicker-days .datepicker-switch");
1466
+ const thisMonth = (0, $hOLA6$moment)(monthYear, "MMMM YYYY").isBefore();
1467
+ while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
1468
+ else await next.click();
1469
+ await this.page.getByRole("cell", {
1470
+ name: "" + date + ""
1471
+ }).first().click();
1472
+ }
1473
+ async setDuration(days, hours, mins) {
1474
+ await this.page.locator(".duration-editor").click();
1475
+ if (typeof days !== "undefined") await this.page.locator(".days").fill(days);
1476
+ if (typeof hours !== "undefined") await this.page.locator(".hours").fill(hours);
1477
+ if (typeof mins !== "undefined") await this.page.locator(".minutes").fill(mins);
1478
+ }
1479
+ async expectScheduledStartDateToBe(date) {
1480
+ (0, $hOLA6$expect)(await this.page.locator(`.scheduled-start-date .date input`).getAttribute("value")).toBe(date);
1481
+ }
1482
+ async expectDueDateToBe(date) {
1483
+ (0, $hOLA6$expect)(await this.page.locator(".due-date .date-editor .date > .light-text").getAttribute("value")).toContain(date);
1484
+ }
1485
+ async expectedDueDateTime(time) {
1486
+ (0, $hOLA6$expect)(await this.page.locator(".due-date .date-editor .time-picker-holder input").getAttribute("value")).toContain(time);
1487
+ }
1488
+ async expectDurationToBe(duration) {
1489
+ (0, $hOLA6$expect)(await this.page.locator(".duration-editor").textContent()).toBe(duration);
1490
+ }
1491
+ async setUsername(username) {
1492
+ await this.page.locator(".script-username").click();
1493
+ await this.page.locator("user-input-with-variable").getByLabel("*").fill(username);
1494
+ await this.page.locator("user-input-with-variable").press("Enter");
1495
+ }
1496
+ async setPassword(password) {
1497
+ await this.page.locator(".field > .display").click();
1498
+ await this.page.locator('input[name="scriptUserPassword"]').fill(password);
1499
+ await this.page.locator('input[name="scriptUserPassword"]').press("Enter");
1500
+ }
1501
+ async expectScriptUsernameToBe(username) {
1502
+ (0, $hOLA6$expect)(await this.page.locator(".script-username").textContent()).toContain(username);
1503
+ }
1504
+ async expectScriptUserPasswordToBe(password) {
1505
+ (0, $hOLA6$expect)(await this.page.locator('span[name="scriptUserPassword"]').textContent()).toContain(password);
1506
+ }
1507
+ }
1508
+
1509
+
1510
+
1511
+ class $e83a7515970cee7f$export$98de9bca7d44fc1a extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1512
+ constructor(page){
1513
+ super(page);
1514
+ }
1515
+ async setName(name) {
1516
+ await this.page.locator("#release-form-title").fill(name);
1517
+ }
1518
+ async setDescription(description) {
1519
+ await this.page.getByText("Set description...").click();
1520
+ await this.page.locator("span").filter({
1521
+ hasText: "Set description... * Save"
1522
+ }).locator("i").first().click();
1523
+ await this.page.locator("textarea").click();
1524
+ await this.page.locator("textarea").fill(description);
1525
+ await this.page.getByText("Save", {
1526
+ exact: true
1527
+ }).click();
1528
+ }
1529
+ async create() {
1530
+ await this.page.getByRole("button", {
1531
+ name: "Create"
1532
+ }).click();
1533
+ }
1534
+ }
1535
+
1536
+
1537
+
1538
+
1539
+ class $8f36d138075416d2$export$899a7095bab1879d extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1540
+ constructor(page){
1541
+ super(page);
1542
+ }
1543
+ async expectAllowConcurrentReleasesFromTrigger(expectedValue) {
1544
+ if (expectedValue) {
1545
+ await this.page.locator(".col-xs-2 .trigger-item-state").textContent({
1546
+ timeout: 3000
1547
+ });
1548
+ (0, $hOLA6$expect)(await this.page.locator(".col-xs-2 .trigger-item-state").textContent()).toContain("Enabled");
1549
+ } else {
1550
+ await this.page.locator(".col-xs-2 .trigger-item-state").textContent({
1551
+ timeout: 3000
1552
+ });
1553
+ (0, $hOLA6$expect)(await this.page.locator(".col-xs-2 .trigger-item-state").textContent()).toContain("Disabled");
1554
+ }
1555
+ }
1556
+ async setAllowConcurrentReleasesFromTriggerAndSubmit(checked) {
1557
+ const result = await this.page.locator(".col-xs-2 .trigger-item-state").textContent({
1558
+ timeout: 3000
1559
+ });
1560
+ if (result === "Enabled" && checked === false || result == "Disabled" && checked === true) await this.page.locator('form[name="releaseTriggerOptions"] label[for="cb"]').click();
1561
+ }
1562
+ async expectTriggersVisible(amount) {
1563
+ await (0, $hOLA6$expect)(this.page.locator(".xlr-trigger-row .trigger-row-content")).toHaveCount(amount);
1564
+ }
1565
+ async expectNoNewTriggerButtonShown() {
1566
+ await (0, $hOLA6$expect)(this.page.locator(".trigger-header a.button.primary")).not.toBeVisible();
1567
+ }
1568
+ }
1569
+
1570
+
1571
+ class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1572
+ constructor(page){
1573
+ super(page);
1574
+ this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
1575
+ this.properties = new (0, $880dec03c4eca8dc$export$ccf2756779bad715)(page);
1576
+ this.createTemplatePage = new (0, $e83a7515970cee7f$export$98de9bca7d44fc1a)(page);
1577
+ this.triggers = new (0, $8f36d138075416d2$export$899a7095bab1879d)(page);
1578
+ }
1579
+ async openTemplateMenu(menuItem) {
1580
+ await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
1581
+ exact: true
1582
+ }).click();
1583
+ }
1584
+ async openTaskDrawer(taskName) {
1585
+ await this.page.getByText(taskName, {
1586
+ exact: true
1587
+ }).click();
1588
+ return this.taskDrawer;
1589
+ }
1590
+ async openTaskDrawerFromGrantt(taskName) {
1591
+ await this.page.locator(".gantt_tree_content").getByText(taskName, {
1592
+ exact: true
1593
+ }).dblclick();
1594
+ return this.taskDrawer;
1595
+ }
1596
+ async openProperties() {
1597
+ await this.openTemplateMenu("Properties");
1598
+ }
1599
+ async openTriggers() {
1600
+ await this.openTemplateMenu("Triggers");
1601
+ }
1602
+ async backToTemplate() {
1603
+ await this.page.locator(".icon-back").click();
1604
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Templates")).toBeVisible();
1605
+ }
1606
+ async expectTemplateLabelToBePresent() {
1607
+ await (0, $hOLA6$expect)(this.page.locator(".dot-chip").filter({
1608
+ hasText: "TEMPLATE"
1609
+ })).toBeVisible();
1610
+ }
1611
+ async expectSubPage(menuItem, toBePresent) {
1612
+ if (toBePresent) await (0, $hOLA6$expect)(this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
1613
+ exact: true
1614
+ })).toBeVisible();
1615
+ else await (0, $hOLA6$expect)(this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
1616
+ exact: true
1617
+ })).not.toBeVisible();
1618
+ }
1619
+ async openFlowView() {
1620
+ await this.page.locator(".xl-icon.column-icon").click();
1621
+ await (0, $hOLA6$expect)(this.page.locator("#release-content")).toBeVisible();
1622
+ }
1623
+ async openTableView() {
1624
+ await this.page.locator(".xl-icon.table-icon").click();
1625
+ await (0, $hOLA6$expect)(this.page.locator(".release-grid-container")).toBeVisible();
1626
+ }
1627
+ async openPlannerView() {
1628
+ await this.page.locator(".xl-icon.planner-icon").click();
1629
+ await (0, $hOLA6$expect)(this.page.locator(".gantt-container")).toBeVisible();
1630
+ }
1631
+ async openCodeView() {
1632
+ await this.page.locator(".xl-icon.code-icon").click();
1633
+ await (0, $hOLA6$expect)(this.page.locator("#dsl-content")).toBeVisible();
1634
+ }
1635
+ async expandGanttFolder() {
1636
+ const icExpandTreeview1 = this.page.locator(".gantt_tree_icon.gantt_open");
1637
+ for (const element of (await icExpandTreeview1.all())){
1638
+ const blnVal = await element.isVisible();
1639
+ if (blnVal) {
1640
+ await element.click();
1641
+ await this.expandGanttFolder();
1642
+ }
1643
+ }
1644
+ }
1645
+ }
1646
+
1647
+
1648
+
1649
+
1650
+ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1651
+ constructor(page){
1652
+ super(page);
1653
+ }
1654
+ async openTemplatesList(filter) {
1655
+ let url = "/templates";
1656
+ if (filter) url += `?has_filter&filter=${filter}`;
1657
+ await this.page.goto(url);
1658
+ }
1659
+ async searchBy(criteria) {
1660
+ await this.page.locator(".searchFilter").clear();
1661
+ await this.page.locator(".searchFilter").fill(criteria);
1662
+ }
1663
+ async copy(originTitle, targetTitle) {
1664
+ await this.page.locator(".title").filter({
1665
+ hasText: originTitle
1666
+ }).locator(".copy").click();
1667
+ await this.page.getByLabel("Template name").clear();
1668
+ await this.page.getByLabel("Template name").fill(targetTitle);
1669
+ await this.page.getByLabel("Description").clear();
1670
+ await this.page.getByLabel("Description").fill("description");
1671
+ await this.page.getByRole("button", {
1672
+ name: "Continue"
1673
+ }).click();
1674
+ await (0, $hOLA6$expect)(this.page.locator(".dot-chip").filter({
1675
+ hasText: "TEMPLATE"
1676
+ })).toBeVisible();
1677
+ }
1678
+ async expectTemplateVisible(title, expected = true) {
1679
+ if (expected) {
1680
+ await this.page.locator(".template").filter({
1681
+ hasText: title
1682
+ }).waitFor();
1683
+ (0, $hOLA6$expect)(this.page.locator(".template").filter({
1684
+ hasText: title
1685
+ })).toBeVisible();
1686
+ } else {
1687
+ await this.page.locator(".template").filter({
1688
+ hasText: title
1689
+ }).waitFor();
1690
+ (0, $hOLA6$expect)(this.page.locator(".template").filter({
1691
+ hasText: title
1692
+ })).not.toBeVisible();
1693
+ }
1694
+ }
1695
+ async delete(title) {
1696
+ await this.page.locator(".title").filter({
1697
+ hasText: title
1698
+ }).locator(".delete").waitFor();
1699
+ await this.page.locator(".title").filter({
1700
+ hasText: title
1701
+ }).locator(".delete").click();
1702
+ await this.page.getByRole("button", {
1703
+ name: "Delete"
1704
+ }).click();
1705
+ await (0, $hOLA6$expect)(this.page.locator(".title").filter({
1706
+ hasText: title
1707
+ })).not.toBeVisible();
1708
+ }
1709
+ async clickCreateNewTemplate() {
1710
+ await this.page.getByTestId("dot-button").click();
1711
+ await this.page.getByRole("menuitem", {
1712
+ name: "Create new template"
1713
+ }).click();
1714
+ }
1715
+ async openTemplateByName(templateName) {
1716
+ await this.page.getByPlaceholder("Filter by title...", {
1717
+ exact: true
1718
+ }).click();
1719
+ await this.page.getByPlaceholder("Filter by title...", {
1720
+ exact: true
1721
+ }).fill(templateName);
1722
+ await this.page.getByPlaceholder("Filter by title...", {
1723
+ exact: true
1724
+ }).press("Enter");
1725
+ await this.page.locator(`.template`).filter({
1726
+ hasText: templateName
1727
+ }).locator(`.raised-link`).waitFor();
1728
+ await this.page.locator(`.template`).filter({
1729
+ hasText: templateName
1730
+ }).locator(`.raised-link`).click();
1731
+ }
1732
+ }
1733
+
1734
+
1735
+
1736
+
1737
+ class $cc2d15e53de5cef7$export$b6fbc3e67030138f extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1738
+ async setStatus(status) {
1739
+ await this.page.locator(".react-tagsinput").click({
1740
+ force: true
1741
+ });
1742
+ await this.page.getByText("Clear all").click();
1743
+ await this.page.locator(".react-tagsinput").click({
1744
+ force: true
1745
+ });
1746
+ if (status === "Select all") await this.page.getByText(status).click();
1747
+ else await this.page.getByTitle(status).locator("i").first().click();
1748
+ }
1749
+ async openReleaseGroup(title) {
1750
+ await this.page.locator("xlr-release-group-row").filter({
1751
+ hasText: title
1752
+ }).getByRole("link").click();
1753
+ await this.page.getByTitle(title).click();
1754
+ await (0, $hOLA6$expect)(this.page).toHaveURL(/.*ReleaseGroup/);
1755
+ }
1756
+ async expectReleaseGroupStatus(status) {
1757
+ await (0, $hOLA6$expect)(this.page.locator(".release-status")).toContainText(status);
1758
+ }
1759
+ async expectReleaseGroupDisplayed(title) {
1760
+ await (0, $hOLA6$expect)(this.page.getByText(title, {
1761
+ exact: true
1762
+ })).toBeVisible();
1763
+ }
1764
+ async expectReleaseGroupNotDisplayed(title) {
1765
+ await (0, $hOLA6$expect)(this.page.getByText(title, {
1766
+ exact: true
1767
+ })).not.toBeVisible();
1768
+ }
1769
+ async searchReleaseGroupByTitle(title) {
1770
+ await this.page.getByPlaceholder("Search for groups...", {
1771
+ exact: true
1772
+ }).click();
1773
+ await this.page.getByPlaceholder("Search for groups...", {
1774
+ exact: true
1775
+ }).fill(title);
1776
+ await this.page.getByPlaceholder("Search for groups...", {
1777
+ exact: true
1778
+ }).press("Enter");
1779
+ }
1780
+ async deleteReleaseGroup(title) {
1781
+ await this.page.locator(".fc-list-item-line").filter({
1782
+ hasText: title
1783
+ }).locator(".fc-item-delete").click();
1784
+ await this.page.getByRole("button", {
1785
+ name: "Delete"
1786
+ }).click();
1787
+ }
1788
+ async clickReleaseGroupEdit(title) {
1789
+ await this.page.locator(".fc-list-item-line").filter({
1790
+ hasText: title
1791
+ }).locator(".fc-item-update").click();
1792
+ }
1793
+ async enterReleaseGroupDetails(new_title) {
1794
+ await this.page.locator(".modal-body").locator("#title").fill(new_title);
1795
+ }
1796
+ async clickSaveButton() {
1797
+ await this.page.locator(".modal-footer").getByRole("button", {
1798
+ name: "Save"
1799
+ }).click();
1800
+ }
1801
+ async clickCancelButton() {
1802
+ await this.page.locator(".modal-footer").getByRole("button", {
1803
+ name: "Cancel"
1804
+ }).click();
1805
+ }
1806
+ }
1807
+
1808
+
1809
+
1810
+
1811
+ class $cc231ea61b77c7a2$export$1a0994e9c202d529 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1812
+ async expectReleaseDisplayed(title) {
1813
+ await (0, $hOLA6$expect)(this.page.getByText(title, {
1814
+ exact: true
1815
+ })).toBeVisible();
1816
+ }
1817
+ async expectReleaseNotDisplayed(title) {
1818
+ await (0, $hOLA6$expect)(this.page.getByText(title, {
1819
+ exact: true
1820
+ })).not.toBeVisible({
1821
+ timeout: 10000
1822
+ });
1823
+ }
1824
+ async expectPhaseDisplayed(title) {
1825
+ await (0, $hOLA6$expect)(this.page.getByText(title, {
1826
+ exact: true
1827
+ })).toBeVisible();
1828
+ }
1829
+ async openContextMenu(title) {
1830
+ await this.page.locator(".timeline-row-name").filter({
1831
+ hasText: title
1832
+ }).locator(".options-icon").click();
1833
+ }
1834
+ async removeFromReleaseGroup() {
1835
+ await this.page.getByRole("menuitem", {
1836
+ name: "Remove from group"
1837
+ }).locator("a").click();
1838
+ await this.page.getByRole("button", {
1839
+ name: "Remove"
1840
+ }).click();
1841
+ }
1842
+ async expectNumberOfReleases(num_of_release) {
1843
+ const elementCount = await this.page.locator(".timeline-row-name-release").count();
1844
+ (0, $hOLA6$expect)(elementCount).toBe(num_of_release);
1845
+ }
1846
+ async openAddReleaseList() {
1847
+ await this.page.getByRole("button", {
1848
+ name: "Add release"
1849
+ }).click();
1850
+ }
1851
+ async filterReleases(title) {
1852
+ await this.page.getByPlaceholder("Search for a release...").click();
1853
+ await this.page.getByPlaceholder("Search for a release...").fill(title);
1854
+ await this.page.waitForTimeout(5000);
1855
+ await this.page.getByPlaceholder("Search for a release...").press("Enter");
1856
+ }
1857
+ async expectNumberOfReleasesOnModal(num_of_release) {
1858
+ const elementCount = await this.page.locator(".release-modal-line").count();
1859
+ (0, $hOLA6$expect)(elementCount).toBe(num_of_release);
1860
+ }
1861
+ async selectAllReleaseCheckbox() {
1862
+ await this.page.getByLabel("Select all").check();
1863
+ }
1864
+ async addReleasesToGroup() {
1865
+ await this.page.getByRole("button", {
1866
+ name: "Add"
1867
+ }).click();
1868
+ }
1869
+ }
1870
+
1871
+
1210
1872
  class $e72552cbf941ecfa$export$b8a61e5c71402559 {
1211
1873
  constructor(page){
1212
1874
  this.page = page;
@@ -1214,9 +1876,15 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
1214
1876
  this.settingsMenu = new (0, $f1bf370bb7f683ca$export$1d7840d5cdc861d5)(page);
1215
1877
  this.usersPage = new (0, $2cb6a6ac6b17e85f$export$107317390f5aa598)(page);
1216
1878
  this.applicationPage = new (0, $c313b10398604df2$export$1533b625ec0c75e2)(page);
1879
+ this.taskListPage = new (0, $c37c93912f458e81$export$60c3bfa6385e2a10)(page);
1880
+ this.templatePage = new (0, $0c4084f199d70d72$export$8c8e7207254accc2)(page);
1881
+ this.templateListPage = new (0, $171d52b372748c0b$export$7e1d435fa474ee21)(page);
1217
1882
  this.taskDetailsPage = new (0, $9ca6e63d357957dd$export$922081b54f2ab994)(page);
1218
1883
  this.releaseCalendarPage = new (0, $3a340a3f4fd8f04d$export$43682cddead1dd78)(page);
1219
1884
  this.releaseListPage = new (0, $5359280e98d97ff9$export$a678525e79c4ccc4)(page);
1885
+ this.releaseGroupPage = new (0, $cc2d15e53de5cef7$export$b6fbc3e67030138f)(page);
1886
+ this.releaseGroupTimelinePage = new (0, $cc231ea61b77c7a2$export$1a0994e9c202d529)(page);
1887
+ this.util = new (0, $aa992f812fb1e470$export$6adb8dd3f0d1e432)(page);
1220
1888
  }
1221
1889
  async openTemplate(id) {
1222
1890
  return this.openReleaseOrTemplate(id, false);
@@ -1316,6 +1984,14 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
1316
1984
  await this.page.waitForSelector("#release");
1317
1985
  return new (0, $43cbcdfccb6c2a76$export$f43492e8ac3c566)(this.page);
1318
1986
  }
1987
+ async collapseSideView() {
1988
+ await this.page.locator('.dot-tooltip[aria-label="Collapse"]').click();
1989
+ await (0, $hOLA6$expect)(this.page.locator('.dot-tooltip[aria-label="Collapse"]')).not.toBeVisible();
1990
+ }
1991
+ async expandSideView() {
1992
+ await this.page.locator('.dot-tooltip[aria-label="Expand"]').click();
1993
+ await (0, $hOLA6$expect)(this.page.locator('.dot-tooltip[aria-label="Expand"]')).not.toBeVisible();
1994
+ }
1319
1995
  }
1320
1996
 
1321
1997
 
@@ -1560,15 +2236,36 @@ class $80c3ae34677b4324$var$Fixtures {
1560
2236
  getParentId(id) {
1561
2237
  return id.substring(0, id.lastIndexOf("/"));
1562
2238
  }
1563
- folder(folder) {
2239
+ async folder(folder) {
1564
2240
  const parentId = this.getParentId(folder.id);
2241
+ folder.type = "xlrelease.Folder";
1565
2242
  //ToDo: Add system teams
1566
- /* eslint-disable @typescript-eslint/no-unused-vars */ const teams = folder.teams;
2243
+ const teams = folder.teams;
1567
2244
  delete folder.teams;
1568
2245
  //ToDo: Add Children
1569
- const children = folder.children || [];
2246
+ /* eslint-disable @typescript-eslint/no-unused-vars */ const children = folder.children || [];
1570
2247
  delete folder.children;
1571
- /* eslint-disable @typescript-eslint/no-unused-vars */ return this.doPost(`api/v1/folders/${parentId}`, folder);
2248
+ if (teams) return this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
2249
+ return this.doPost(`api/v1/folders/${parentId}`, folder);
2250
+ }
2251
+ createFolder(folderJson) {
2252
+ folderJson.type = "xlrelease.Folder";
2253
+ return this.doPost(`fixtures/folders`, [
2254
+ folderJson
2255
+ ]);
2256
+ }
2257
+ trigger(trigger) {
2258
+ this.triggerIds.push(trigger.id);
2259
+ return this.doPost("fixtures/trigger", trigger);
2260
+ }
2261
+ roles(rolePrincipals) {
2262
+ return this.doPost("fixtures/roles/principals", rolePrincipals);
2263
+ }
2264
+ permissions(rolePermissions) {
2265
+ return this.doPost("fixtures/roles/permissions/global", rolePermissions);
2266
+ }
2267
+ deleteRole(roleName) {
2268
+ return this.doDelete(`fixtures/role/${roleName}`);
1572
2269
  }
1573
2270
  deleteArchivedRelease(id) {
1574
2271
  const releaseId = id.includes("Applications/") ? id : `Applications/${id}`;
@@ -1598,8 +2295,7 @@ class $80c3ae34677b4324$var$Fixtures {
1598
2295
  ]);
1599
2296
  }
1600
2297
  deleteFolder(folderId) {
1601
- const id = this.doGet(`api/v1/folders/${folderId}`);
1602
- return this.doDelete(`api/v1/folders/${id}`);
2298
+ return this.doDelete(`api/v1/folders/${folderId}`);
1603
2299
  }
1604
2300
  activityLogs(id, logs) {
1605
2301
  return this.doPost(`fixtures/activityLogs/${id}`, logs);
@@ -1688,6 +2384,16 @@ class $80c3ae34677b4324$var$Fixtures {
1688
2384
  const summary = json.fields.summary;
1689
2385
  (0, $hOLA6$expect)(summary).toBe(expectedSummary);
1690
2386
  }
2387
+ async expectContainingAttachments(releaseId, tempFile) {
2388
+ if (releaseId.indexOf("Applications/") === -1) releaseId = "Applications/" + releaseId;
2389
+ await (0, $hOLA6$expect)(async ()=>{
2390
+ const resp = await this.doPost(`fixtures/expectContainingAttachments/${releaseId}`, {
2391
+ name: tempFile,
2392
+ expectedContent: tempFile
2393
+ });
2394
+ (0, $hOLA6$expect)(resp).toBe(true);
2395
+ }).toPass();
2396
+ }
1691
2397
  async waitForReleaseStarted(releaseTitle) {
1692
2398
  await (0, $hOLA6$expect)(async ()=>{
1693
2399
  const resp = await this.doPost("releases/search", {
@@ -1740,6 +2446,9 @@ class $80c3ae34677b4324$var$Fixtures {
1740
2446
  }
1741
2447
  ]);
1742
2448
  }
2449
+ async createReleaseGroup(releaseGroup) {
2450
+ return this.doPost("fixtures/release-groups", releaseGroup);
2451
+ }
1743
2452
  doPost(url, body) {
1744
2453
  return this.request.post(url, {
1745
2454
  data: body,