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

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,11 @@ 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
+ }
630
649
  }
631
650
 
632
651
 
@@ -710,6 +729,18 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
710
729
  }).click();
711
730
  return this.taskDrawer;
712
731
  }
732
+ async openTaskDrawerFromTableView(taskName) {
733
+ await this.page.locator(".name-cell-title").getByText(taskName, {
734
+ exact: true
735
+ }).click();
736
+ return this.taskDrawer;
737
+ }
738
+ async openTaskDrawerFromGrantt(taskName) {
739
+ await this.page.locator(".gantt_tree_content").getByText(taskName, {
740
+ exact: true
741
+ }).dblclick();
742
+ return this.taskDrawer;
743
+ }
713
744
  async openVariables() {
714
745
  await this.openReleaseMenu("Variables");
715
746
  }
@@ -769,6 +800,24 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
769
800
  async backToRelease() {
770
801
  await this.page.locator(".icon-back").click();
771
802
  }
803
+ async openTableView() {
804
+ await this.page.locator(".xl-icon.table-icon").click();
805
+ await (0, $hOLA6$expect)(this.page.locator(".release-grid-container")).toBeVisible();
806
+ }
807
+ async openPlannerView() {
808
+ await this.page.locator(".xl-icon.planner-icon").click();
809
+ await (0, $hOLA6$expect)(this.page.locator(".gantt-container")).toBeVisible();
810
+ }
811
+ async expandGanttFolder() {
812
+ const icExpandTreeview1 = this.page.locator(".gantt_tree_icon.gantt_open");
813
+ for (const element of (await icExpandTreeview1.all())){
814
+ const blnVal = await element.isVisible();
815
+ if (blnVal) {
816
+ await element.click();
817
+ await this.expandGanttFolder();
818
+ }
819
+ }
820
+ }
772
821
  }
773
822
  class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
774
823
  constructor(page, phaseName){
@@ -815,6 +864,11 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
815
864
  async expectToHaveTitle(phaseTitle) {
816
865
  await (0, $hOLA6$expect)(this.phaseLocator.locator(".phase-title")).toContainText(phaseTitle);
817
866
  }
867
+ async expectTemplateLabelNotToBePresent() {
868
+ await (0, $hOLA6$expect)(this.page.locator(".dot-chip").filter({
869
+ hasText: "TEMPLATE"
870
+ })).not.toBeVisible();
871
+ }
818
872
  }
819
873
 
820
874
 
@@ -921,7 +975,6 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
921
975
  constructor(page){
922
976
  super(page);
923
977
  this.page = page;
924
- this.newUserButton = this.page.getByTestId("new-user-btn");
925
978
  this.modal = new (0, $21185a378c23589e$export$e2e2e1ffdce20c30)(page);
926
979
  }
927
980
  async openUsersPage() {
@@ -938,7 +991,7 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
938
991
  }).locator(".Mui-checked")).toBeChecked();
939
992
  }
940
993
  async addUser() {
941
- await this.newUserButton.click();
994
+ await this.page.locator(".new-user-btn").click();
942
995
  }
943
996
  async createUser(username, password) {
944
997
  await this.modal.setUserName(username);
@@ -1207,6 +1260,419 @@ class $3a340a3f4fd8f04d$export$43682cddead1dd78 extends (0, $9626bc9256ce31f7$ex
1207
1260
 
1208
1261
 
1209
1262
 
1263
+
1264
+
1265
+
1266
+ class $c37c93912f458e81$export$60c3bfa6385e2a10 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1267
+ constructor(page){
1268
+ super(page);
1269
+ this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
1270
+ }
1271
+ async openTask(taskName) {
1272
+ await this.filterTaskByTitle(taskName);
1273
+ await this.page.getByText(taskName).click();
1274
+ }
1275
+ async filterTaskByTitle(taskname) {
1276
+ await this.page.locator(".toggle-search-filter").click();
1277
+ await this.page.locator(".searchFilter").fill(taskname);
1278
+ await this.page.locator(".searchFilter").press("Enter");
1279
+ await (0, $hOLA6$expect)(this.page.locator("//div[@data-task-title]").filter({
1280
+ hasText: taskname
1281
+ })).toBeVisible();
1282
+ }
1283
+ async filterTasksByTag(tag, taskTitleForValidation) {
1284
+ await this.page.locator(".toggle-search-filter").click();
1285
+ await this.page.locator(".tag-input").fill(tag);
1286
+ await this.page.locator(".tag-input").press("Enter");
1287
+ //TODO: Validation can be changed based on actual test case implementation
1288
+ await (0, $hOLA6$expect)(this.page.locator("//div[@data-task-title]").filter({
1289
+ hasText: taskTitleForValidation
1290
+ })).toBeVisible();
1291
+ }
1292
+ async filterTasksByReleaseTitle(releaseTitle) {
1293
+ await this.page.locator(".toggle-search-filter").click();
1294
+ await this.page.locator(".release-input").fill(releaseTitle);
1295
+ await this.page.locator(".release-input").press("Enter");
1296
+ await (0, $hOLA6$expect)(this.page.locator(".group-title").filter({
1297
+ hasText: releaseTitle
1298
+ })).toBeVisible();
1299
+ }
1300
+ async openSingleTask(taskId, showDetails = false) {
1301
+ await this.page.goto(`./#/tasks/${taskId}?showDetails=${showDetails}`);
1302
+ }
1303
+ async expectReleaseLinksDisplayed(releaseTitle, displayed = true) {
1304
+ if (displayed) {
1305
+ await (0, $hOLA6$expect)(this.page.getByRole("link", {
1306
+ name: "" + releaseTitle + ""
1307
+ })).toBeVisible();
1308
+ await (0, $hOLA6$expect)(this.page.locator(".view-in-release")).toBeVisible();
1309
+ } else {
1310
+ await (0, $hOLA6$expect)(this.page.getByRole("link", {
1311
+ name: "" + releaseTitle + ""
1312
+ })).not.toBeVisible();
1313
+ await (0, $hOLA6$expect)(this.page.locator(".view-in-release")).not.toBeVisible();
1314
+ }
1315
+ }
1316
+ async expectTaskTitle(taskTitle) {
1317
+ (0, $hOLA6$expect)(await this.page.locator("#tasks0").innerText()).toContain(taskTitle);
1318
+ }
1319
+ }
1320
+
1321
+
1322
+
1323
+
1324
+ class $aa992f812fb1e470$export$6adb8dd3f0d1e432 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1325
+ constructor(page){
1326
+ super(page);
1327
+ this.tempDir = "";
1328
+ this.content = "";
1329
+ }
1330
+ async createTempFile(fileName, testInfo) {
1331
+ const content = fileName.toString();
1332
+ const tempDir = testInfo.outputPath(fileName.toString());
1333
+ $hOLA6$promises.writeFile(tempDir, content, "utf8");
1334
+ }
1335
+ }
1336
+
1337
+
1338
+
1339
+
1340
+
1341
+
1342
+
1343
+
1344
+ class $880dec03c4eca8dc$export$ccf2756779bad715 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1345
+ constructor(page){
1346
+ super(page);
1347
+ }
1348
+ async getAttachmentsListCount() {
1349
+ return await this.page.locator(".attachments tr").count();
1350
+ }
1351
+ async uploadFile(filePath) {
1352
+ const fileChooserPromise = this.page.waitForEvent("filechooser");
1353
+ await this.page.locator('input[type="file"]').click();
1354
+ const fileChooser = await fileChooserPromise;
1355
+ await fileChooser.setFiles(filePath);
1356
+ }
1357
+ async expectWithAttachment(filename) {
1358
+ await (0, $hOLA6$expect)(this.page.locator(".attachments tr td a").filter({
1359
+ hasText: filename
1360
+ })).toBeVisible();
1361
+ }
1362
+ async expectWithNoAttachment(filename) {
1363
+ const test = await this.page.locator(".attachments").isVisible();
1364
+ if (test) await (0, $hOLA6$expect)(this.page.locator(".attachments tr td a").filter({
1365
+ hasText: filename
1366
+ })).not.toBeVisible();
1367
+ }
1368
+ async downloadFile(filename) {
1369
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1370
+ const downloadPromise1 = this.page.waitForEvent("download");
1371
+ await this.page.getByText(filename).click();
1372
+ const download = await downloadPromise1;
1373
+ // Wait for the download process to complete and save the downloaded file in given path.
1374
+ await download.saveAs("./core/xlr-ui/build/playwright/" + download.suggestedFilename());
1375
+ (0, $hOLA6$expect)(download.suggestedFilename()).toBe(filename);
1376
+ }
1377
+ async deleteAttachment(fileName) {
1378
+ await this.page.getByRole("row", {
1379
+ name: fileName
1380
+ }).locator("span").click();
1381
+ await this.page.getByText("Remove").click();
1382
+ }
1383
+ async save() {
1384
+ await this.page.getByRole("button", {
1385
+ name: "Save"
1386
+ }).click({
1387
+ timeout: 8000
1388
+ });
1389
+ await (0, $hOLA6$expect)(this.page.locator(".form-footer .last-saved")).toBeVisible();
1390
+ }
1391
+ async reset() {
1392
+ await this.page.getByRole("button", {
1393
+ name: "Reset"
1394
+ }).waitFor();
1395
+ await this.page.getByRole("button", {
1396
+ name: "Reset"
1397
+ }).click();
1398
+ }
1399
+ async removeDueDate() {
1400
+ await this.page.locator(".due-date .close-icon").click();
1401
+ }
1402
+ async setScheduledStartDate(date, monthYear) {
1403
+ await this.page.locator(`.scheduled-start-date .date`).click();
1404
+ const prev = this.page.locator(".datepicker-days .prev");
1405
+ const next = this.page.locator(".datepicker-days .next");
1406
+ const monYear = this.page.locator(".datepicker-days .datepicker-switch");
1407
+ const thisMonth = (0, $hOLA6$moment)(monthYear, "MMMM YYYY").isBefore();
1408
+ while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
1409
+ else await next.click();
1410
+ await this.page.getByRole("cell", {
1411
+ name: "" + date + ""
1412
+ }).first().click();
1413
+ }
1414
+ async setDuration(days, hours, mins) {
1415
+ await this.page.locator(".duration-editor").click();
1416
+ if (typeof days !== "undefined") await this.page.locator(".days").fill(days);
1417
+ if (typeof hours !== "undefined") await this.page.locator(".hours").fill(hours);
1418
+ if (typeof mins !== "undefined") await this.page.locator(".minutes").fill(mins);
1419
+ }
1420
+ async expectScheduledStartDateToBe(date) {
1421
+ (0, $hOLA6$expect)(await this.page.locator(`.scheduled-start-date .date input`).getAttribute("value")).toBe(date);
1422
+ }
1423
+ async expectDueDateToBe(date) {
1424
+ (0, $hOLA6$expect)(await this.page.locator(".due-date .date-editor .date > .light-text").getAttribute("value")).toContain(date);
1425
+ }
1426
+ async expectedDueDateTime(time) {
1427
+ (0, $hOLA6$expect)(await this.page.locator(".due-date .date-editor .time-picker-holder input").getAttribute("value")).toContain(time);
1428
+ }
1429
+ async expectDurationToBe(duration) {
1430
+ (0, $hOLA6$expect)(await this.page.locator(".duration-editor").textContent()).toBe(duration);
1431
+ }
1432
+ async setUsername(username) {
1433
+ await this.page.locator(".script-username").click();
1434
+ await this.page.locator("user-input-with-variable").getByLabel("*").fill(username);
1435
+ await this.page.locator("user-input-with-variable").press("Enter");
1436
+ }
1437
+ async setPassword(password) {
1438
+ await this.page.locator(".field > .display").click();
1439
+ await this.page.locator('input[name="scriptUserPassword"]').fill(password);
1440
+ await this.page.locator('input[name="scriptUserPassword"]').press("Enter");
1441
+ }
1442
+ async expectScriptUsernameToBe(username) {
1443
+ (0, $hOLA6$expect)(await this.page.locator(".script-username").textContent()).toContain(username);
1444
+ }
1445
+ async expectScriptUserPasswordToBe(password) {
1446
+ (0, $hOLA6$expect)(await this.page.locator('span[name="scriptUserPassword"]').textContent()).toContain(password);
1447
+ }
1448
+ }
1449
+
1450
+
1451
+
1452
+ class $e83a7515970cee7f$export$98de9bca7d44fc1a extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1453
+ constructor(page){
1454
+ super(page);
1455
+ }
1456
+ async setName(name) {
1457
+ await this.page.locator("#release-form-title").fill(name);
1458
+ }
1459
+ async setDescription(description) {
1460
+ await this.page.getByText("Set description...").click();
1461
+ await this.page.locator("span").filter({
1462
+ hasText: "Set description... * Save"
1463
+ }).locator("i").first().click();
1464
+ await this.page.locator("textarea").click();
1465
+ await this.page.locator("textarea").fill(description);
1466
+ await this.page.getByText("Save", {
1467
+ exact: true
1468
+ }).click();
1469
+ }
1470
+ async create() {
1471
+ await this.page.getByRole("button", {
1472
+ name: "Create"
1473
+ }).click();
1474
+ }
1475
+ }
1476
+
1477
+
1478
+
1479
+
1480
+ class $8f36d138075416d2$export$899a7095bab1879d extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1481
+ constructor(page){
1482
+ super(page);
1483
+ }
1484
+ async expectAllowConcurrentReleasesFromTrigger(expectedValue) {
1485
+ if (expectedValue) {
1486
+ await this.page.locator(".col-xs-2 .trigger-item-state").textContent({
1487
+ timeout: 3000
1488
+ });
1489
+ (0, $hOLA6$expect)(await this.page.locator(".col-xs-2 .trigger-item-state").textContent()).toContain("Enabled");
1490
+ } else {
1491
+ await this.page.locator(".col-xs-2 .trigger-item-state").textContent({
1492
+ timeout: 3000
1493
+ });
1494
+ (0, $hOLA6$expect)(await this.page.locator(".col-xs-2 .trigger-item-state").textContent()).toContain("Disabled");
1495
+ }
1496
+ }
1497
+ async setAllowConcurrentReleasesFromTriggerAndSubmit(checked) {
1498
+ const result = await this.page.locator(".col-xs-2 .trigger-item-state").textContent({
1499
+ timeout: 3000
1500
+ });
1501
+ if (result === "Enabled" && checked === false || result == "Disabled" && checked === true) await this.page.locator('form[name="releaseTriggerOptions"] label[for="cb"]').click();
1502
+ }
1503
+ async expectTriggersVisible(amount) {
1504
+ await (0, $hOLA6$expect)(this.page.locator(".xlr-trigger-row .trigger-row-content")).toHaveCount(amount);
1505
+ }
1506
+ async expectNoNewTriggerButtonShown() {
1507
+ await (0, $hOLA6$expect)(this.page.locator(".trigger-header a.button.primary")).not.toBeVisible();
1508
+ }
1509
+ }
1510
+
1511
+
1512
+ class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1513
+ constructor(page){
1514
+ super(page);
1515
+ this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
1516
+ this.properties = new (0, $880dec03c4eca8dc$export$ccf2756779bad715)(page);
1517
+ this.createTemplatePage = new (0, $e83a7515970cee7f$export$98de9bca7d44fc1a)(page);
1518
+ this.triggers = new (0, $8f36d138075416d2$export$899a7095bab1879d)(page);
1519
+ }
1520
+ async openTemplateMenu(menuItem) {
1521
+ await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
1522
+ exact: true
1523
+ }).click();
1524
+ }
1525
+ async openTaskDrawer(taskName) {
1526
+ await this.page.getByText(taskName, {
1527
+ exact: true
1528
+ }).click();
1529
+ return this.taskDrawer;
1530
+ }
1531
+ async openTaskDrawerFromGrantt(taskName) {
1532
+ await this.page.locator(".gantt_tree_content").getByText(taskName, {
1533
+ exact: true
1534
+ }).dblclick();
1535
+ return this.taskDrawer;
1536
+ }
1537
+ async openProperties() {
1538
+ await this.openTemplateMenu("Properties");
1539
+ }
1540
+ async openTriggers() {
1541
+ await this.openTemplateMenu("Triggers");
1542
+ }
1543
+ async backToTemplate() {
1544
+ await this.page.locator(".icon-back").click();
1545
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Templates")).toBeVisible();
1546
+ }
1547
+ async expectTemplateLabelToBePresent() {
1548
+ await (0, $hOLA6$expect)(this.page.locator(".dot-chip").filter({
1549
+ hasText: "TEMPLATE"
1550
+ })).toBeVisible();
1551
+ }
1552
+ async expectSubPage(menuItem, toBePresent) {
1553
+ if (toBePresent) await (0, $hOLA6$expect)(this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
1554
+ exact: true
1555
+ })).toBeVisible();
1556
+ else await (0, $hOLA6$expect)(this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
1557
+ exact: true
1558
+ })).not.toBeVisible();
1559
+ }
1560
+ async openFlowView() {
1561
+ await this.page.locator(".xl-icon.column-icon").click();
1562
+ await (0, $hOLA6$expect)(this.page.locator("#release-content")).toBeVisible();
1563
+ }
1564
+ async openTableView() {
1565
+ await this.page.locator(".xl-icon.table-icon").click();
1566
+ await (0, $hOLA6$expect)(this.page.locator(".release-grid-container")).toBeVisible();
1567
+ }
1568
+ async openPlannerView() {
1569
+ await this.page.locator(".xl-icon.planner-icon").click();
1570
+ await (0, $hOLA6$expect)(this.page.locator(".gantt-container")).toBeVisible();
1571
+ }
1572
+ async openCodeView() {
1573
+ await this.page.locator(".xl-icon.code-icon").click();
1574
+ await (0, $hOLA6$expect)(this.page.locator("#dsl-content")).toBeVisible();
1575
+ }
1576
+ async expandGanttFolder() {
1577
+ const icExpandTreeview1 = this.page.locator(".gantt_tree_icon.gantt_open");
1578
+ for (const element of (await icExpandTreeview1.all())){
1579
+ const blnVal = await element.isVisible();
1580
+ if (blnVal) {
1581
+ await element.click();
1582
+ await this.expandGanttFolder();
1583
+ }
1584
+ }
1585
+ }
1586
+ }
1587
+
1588
+
1589
+
1590
+
1591
+ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1592
+ constructor(page){
1593
+ super(page);
1594
+ }
1595
+ async openTemplatesList(filter) {
1596
+ let url = "/templates";
1597
+ if (filter) url += `?has_filter&filter=${filter}`;
1598
+ await this.page.goto(url);
1599
+ }
1600
+ async searchBy(criteria) {
1601
+ await this.page.locator(".searchFilter").clear();
1602
+ await this.page.locator(".searchFilter").fill(criteria);
1603
+ }
1604
+ async copy(originTitle, targetTitle) {
1605
+ await this.page.locator(".title").filter({
1606
+ hasText: originTitle
1607
+ }).locator(".copy").click();
1608
+ await this.page.getByLabel("Template name").clear();
1609
+ await this.page.getByLabel("Template name").fill(targetTitle);
1610
+ await this.page.getByLabel("Description").clear();
1611
+ await this.page.getByLabel("Description").fill("description");
1612
+ await this.page.getByRole("button", {
1613
+ name: "Continue"
1614
+ }).click();
1615
+ await (0, $hOLA6$expect)(this.page.locator(".dot-chip").filter({
1616
+ hasText: "TEMPLATE"
1617
+ })).toBeVisible();
1618
+ }
1619
+ async expectTemplateVisible(title, expected = true) {
1620
+ if (expected) {
1621
+ await this.page.locator(".template").filter({
1622
+ hasText: title
1623
+ }).waitFor();
1624
+ (0, $hOLA6$expect)(this.page.locator(".template").filter({
1625
+ hasText: title
1626
+ })).toBeVisible();
1627
+ } else {
1628
+ await this.page.locator(".template").filter({
1629
+ hasText: title
1630
+ }).waitFor();
1631
+ (0, $hOLA6$expect)(this.page.locator(".template").filter({
1632
+ hasText: title
1633
+ })).not.toBeVisible();
1634
+ }
1635
+ }
1636
+ async delete(title) {
1637
+ await this.page.locator(".title").filter({
1638
+ hasText: title
1639
+ }).locator(".delete").waitFor();
1640
+ await this.page.locator(".title").filter({
1641
+ hasText: title
1642
+ }).locator(".delete").click();
1643
+ await this.page.getByRole("button", {
1644
+ name: "Delete"
1645
+ }).click();
1646
+ await (0, $hOLA6$expect)(this.page.locator(".title").filter({
1647
+ hasText: title
1648
+ })).not.toBeVisible();
1649
+ }
1650
+ async clickCreateNewTemplate() {
1651
+ await this.page.getByTestId("dot-button").click();
1652
+ await this.page.getByRole("menuitem", {
1653
+ name: "Create new template"
1654
+ }).click();
1655
+ }
1656
+ async openTemplateByName(templateName) {
1657
+ await this.page.getByPlaceholder("Filter by title...", {
1658
+ exact: true
1659
+ }).click();
1660
+ await this.page.getByPlaceholder("Filter by title...", {
1661
+ exact: true
1662
+ }).fill(templateName);
1663
+ await this.page.getByPlaceholder("Filter by title...", {
1664
+ exact: true
1665
+ }).press("Enter");
1666
+ await this.page.locator(`.template`).filter({
1667
+ hasText: templateName
1668
+ }).locator(`.raised-link`).waitFor();
1669
+ await this.page.locator(`.template`).filter({
1670
+ hasText: templateName
1671
+ }).locator(`.raised-link`).click();
1672
+ }
1673
+ }
1674
+
1675
+
1210
1676
  class $e72552cbf941ecfa$export$b8a61e5c71402559 {
1211
1677
  constructor(page){
1212
1678
  this.page = page;
@@ -1214,9 +1680,13 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
1214
1680
  this.settingsMenu = new (0, $f1bf370bb7f683ca$export$1d7840d5cdc861d5)(page);
1215
1681
  this.usersPage = new (0, $2cb6a6ac6b17e85f$export$107317390f5aa598)(page);
1216
1682
  this.applicationPage = new (0, $c313b10398604df2$export$1533b625ec0c75e2)(page);
1683
+ this.taskListPage = new (0, $c37c93912f458e81$export$60c3bfa6385e2a10)(page);
1684
+ this.templatePage = new (0, $0c4084f199d70d72$export$8c8e7207254accc2)(page);
1685
+ this.templateListPage = new (0, $171d52b372748c0b$export$7e1d435fa474ee21)(page);
1217
1686
  this.taskDetailsPage = new (0, $9ca6e63d357957dd$export$922081b54f2ab994)(page);
1218
1687
  this.releaseCalendarPage = new (0, $3a340a3f4fd8f04d$export$43682cddead1dd78)(page);
1219
1688
  this.releaseListPage = new (0, $5359280e98d97ff9$export$a678525e79c4ccc4)(page);
1689
+ this.util = new (0, $aa992f812fb1e470$export$6adb8dd3f0d1e432)(page);
1220
1690
  }
1221
1691
  async openTemplate(id) {
1222
1692
  return this.openReleaseOrTemplate(id, false);
@@ -1316,6 +1786,14 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
1316
1786
  await this.page.waitForSelector("#release");
1317
1787
  return new (0, $43cbcdfccb6c2a76$export$f43492e8ac3c566)(this.page);
1318
1788
  }
1789
+ async collapseSideView() {
1790
+ await this.page.locator('.dot-tooltip[aria-label="Collapse"]').click();
1791
+ await (0, $hOLA6$expect)(this.page.locator('.dot-tooltip[aria-label="Collapse"]')).not.toBeVisible();
1792
+ }
1793
+ async expandSideView() {
1794
+ await this.page.locator('.dot-tooltip[aria-label="Expand"]').click();
1795
+ await (0, $hOLA6$expect)(this.page.locator('.dot-tooltip[aria-label="Expand"]')).not.toBeVisible();
1796
+ }
1319
1797
  }
1320
1798
 
1321
1799
 
@@ -1560,15 +2038,27 @@ class $80c3ae34677b4324$var$Fixtures {
1560
2038
  getParentId(id) {
1561
2039
  return id.substring(0, id.lastIndexOf("/"));
1562
2040
  }
1563
- folder(folder) {
2041
+ async folder(folder) {
1564
2042
  const parentId = this.getParentId(folder.id);
2043
+ folder.type = "xlrelease.Folder";
1565
2044
  //ToDo: Add system teams
1566
- /* eslint-disable @typescript-eslint/no-unused-vars */ const teams = folder.teams;
2045
+ const teams = folder.teams;
1567
2046
  delete folder.teams;
1568
2047
  //ToDo: Add Children
1569
- const children = folder.children || [];
2048
+ /* eslint-disable @typescript-eslint/no-unused-vars */ const children = folder.children || [];
1570
2049
  delete folder.children;
1571
- /* eslint-disable @typescript-eslint/no-unused-vars */ return this.doPost(`api/v1/folders/${parentId}`, folder);
2050
+ if (teams) return this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
2051
+ return this.doPost(`api/v1/folders/${parentId}`, folder);
2052
+ }
2053
+ createFolder(folderJson) {
2054
+ folderJson.type = "xlrelease.Folder";
2055
+ return this.doPost(`fixtures/folders`, [
2056
+ folderJson
2057
+ ]);
2058
+ }
2059
+ trigger(trigger) {
2060
+ this.triggerIds.push(trigger.id);
2061
+ return this.doPost("fixtures/trigger", trigger);
1572
2062
  }
1573
2063
  deleteArchivedRelease(id) {
1574
2064
  const releaseId = id.includes("Applications/") ? id : `Applications/${id}`;
@@ -1688,6 +2178,16 @@ class $80c3ae34677b4324$var$Fixtures {
1688
2178
  const summary = json.fields.summary;
1689
2179
  (0, $hOLA6$expect)(summary).toBe(expectedSummary);
1690
2180
  }
2181
+ async expectContainingAttachments(releaseId, tempFile) {
2182
+ if (releaseId.indexOf("Applications/") === -1) releaseId = "Applications/" + releaseId;
2183
+ await (0, $hOLA6$expect)(async ()=>{
2184
+ const resp = await this.doPost(`fixtures/expectContainingAttachments/${releaseId}`, {
2185
+ name: tempFile,
2186
+ expectedContent: tempFile
2187
+ });
2188
+ (0, $hOLA6$expect)(resp).toBe(true);
2189
+ }).toPass();
2190
+ }
1691
2191
  async waitForReleaseStarted(releaseTitle) {
1692
2192
  await (0, $hOLA6$expect)(async ()=>{
1693
2193
  const resp = await this.doPost("releases/search", {