@digital-ai/devops-page-object-release 0.0.12 → 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/main.js CHANGED
@@ -1,6 +1,8 @@
1
1
  var $kKeXs$playwrighttest = require("@playwright/test");
2
2
  var $kKeXs$child_process = require("child_process");
3
3
  var $kKeXs$process = require("process");
4
+ var $kKeXs$fs = require("fs");
5
+ var $kKeXs$moment = require("moment");
4
6
 
5
7
  var $parcel$global =
6
8
  typeof globalThis !== 'undefined'
@@ -951,6 +953,7 @@ $edb0b0405039996a$exports = $edb0b0405039996a$var$isNil;
951
953
 
952
954
 
953
955
 
956
+
954
957
  class $f8721861c660dd88$export$2b65d1d97338f32b {
955
958
  constructor(page){
956
959
  this.page = page;
@@ -960,6 +963,7 @@ class $f8721861c660dd88$export$2b65d1d97338f32b {
960
963
 
961
964
  class $87643f2d97b0644e$export$a678525e79c4ccc4 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
962
965
  async expectNumberOfReleases(releaseTitle, amount) {
966
+ await this.filterReleaseByTitle(releaseTitle);
963
967
  if (amount === 1) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible({
964
968
  timeout: 5000
965
969
  });
@@ -971,6 +975,12 @@ class $87643f2d97b0644e$export$a678525e79c4ccc4 extends (0, $f8721861c660dd88$ex
971
975
  }).click();
972
976
  return new (0, $9b9a8c3da392d020$export$f43492e8ac3c566)(this.page);
973
977
  }
978
+ async filterReleaseByTitle(releaseTitle) {
979
+ await this.page.locator(".toggle-search-filter").click();
980
+ await this.page.locator(".searchFilter").fill(releaseTitle);
981
+ await this.page.locator(".searchFilter").press("Enter");
982
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible();
983
+ }
974
984
  }
975
985
 
976
986
 
@@ -1151,7 +1161,57 @@ class $9c0b0c2caed50730$export$d4865631ba74f3e2 extends (0, $f8721861c660dd88$ex
1151
1161
  class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
1152
1162
  constructor(page){
1153
1163
  super(page);
1154
- this.railLocator = this.page.locator("task-drawer .dot-drawer .task-drawer-content");
1164
+ this.railLocator = this.page.locator("task-drawer .dot-drawer .task-drawer-content");
1165
+ this.dependency = new $eb81c1b930e440ff$export$fbbf45eff21470e3(page);
1166
+ }
1167
+ async openInputProperties() {
1168
+ await this.railLocator.locator(".task-config-header").getByText("Input properties").click();
1169
+ }
1170
+ async openOutputProperties() {
1171
+ await this.railLocator.locator(".task-config-header").getByText("Output properties").click();
1172
+ }
1173
+ async getValueFromCi(propertyName) {
1174
+ return this.railLocator.locator(`input[id="${propertyName}"]`).inputValue();
1175
+ }
1176
+ async getAllOptionsFromCi(propertyName) {
1177
+ await this.railLocator.locator(`input[id="${propertyName}"]`).click();
1178
+ return this.railLocator.locator(`.dot-popper ul li`).allInnerTexts();
1179
+ }
1180
+ async setValueFromCi(propertyName, value) {
1181
+ await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
1182
+ await this.railLocator.locator(`input[id="${propertyName}"]`).click();
1183
+ await this.railLocator.locator(`.dot-popper ul li`, {
1184
+ hasText: value
1185
+ }).click();
1186
+ }
1187
+ async getValueFromString(propertyName) {
1188
+ await this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`).focus();
1189
+ return this.railLocator.locator(`input[id="${propertyName}"]`).inputValue();
1190
+ }
1191
+ async setValueFromString(propertyName, value) {
1192
+ await this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`).focus();
1193
+ await this.railLocator.locator(`input[id="${propertyName}"]`).fill(value);
1194
+ }
1195
+ async setValueFromLargeString(propertyName, value) {
1196
+ await this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`).focus();
1197
+ await this.railLocator.locator(`textarea[id="${propertyName}"]`).fill(value);
1198
+ }
1199
+ async setValueFromPassword(propertyName, value) {
1200
+ await this.railLocator.locator(`input[id="${propertyName}"]`).fill(value);
1201
+ }
1202
+ async setAndCreateVariable(propertyName, variableName) {
1203
+ await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
1204
+ await this.railLocator.locator(`input[id="${propertyName}"]`).click();
1205
+ await this.railLocator.locator(`input[id="${propertyName}"]`).fill(variableName);
1206
+ await this.railLocator.locator(`.dot-popper button`, {
1207
+ hasText: variableName
1208
+ }).click();
1209
+ }
1210
+ async setVariable(propertyName, variableName) {
1211
+ return this.setValueFromCi(propertyName, variableName);
1212
+ }
1213
+ async expectValueFromString(propertyName, propertyValue) {
1214
+ return await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`)).toHaveText(propertyValue);
1155
1215
  }
1156
1216
  async setValueFromMap(propertyName, key, value) {
1157
1217
  await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.add-new-button`).click();
@@ -1167,12 +1227,174 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1167
1227
  async expectScriptToContain(script) {
1168
1228
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".code-editor .ace_content")).toContainText(script);
1169
1229
  }
1230
+ async enterScriptForAutoComplete(script) {
1231
+ await this.page.locator(".code-editor textarea.ace_text-input").clear();
1232
+ await this.page.locator(".code-editor textarea.ace_text-input").fill(script);
1233
+ await this.page.locator(".code-editor textarea.ace_text-input").press(".");
1234
+ }
1235
+ async openScriptEditorInSeparateWindow() {
1236
+ await this.page.getByTestId("fullscreen-enter-btn").click();
1237
+ (0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).toBeVisible();
1238
+ }
1239
+ async closeFullscreenScriptWindowWithESC() {
1240
+ await this.page.locator("#dialogTitle").press("Escape");
1241
+ (0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
1242
+ }
1243
+ async closeFullscreenScriptWindow() {
1244
+ await this.page.getByTestId("fullscreen-exit-btn").click();
1245
+ (0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
1246
+ }
1170
1247
  async abort(comment) {
1171
1248
  await this.page.getByTestId("single-action-button").click();
1172
1249
  await this.page.getByTestId("task-action-comment").click();
1173
1250
  await this.page.getByTestId("task-action-comment").fill(comment);
1174
1251
  await this.page.getByTestId("task-action-confirm").click();
1175
1252
  }
1253
+ async expectDependenciesDisplayed(dependencies) {
1254
+ await this.railLocator.locator(".gate-task-dependencies").waitFor();
1255
+ for(let i = 0; i < dependencies.length; i++)await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dependency").filter({
1256
+ hasText: dependencies[i]
1257
+ })).toBeVisible();
1258
+ }
1259
+ 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({
1273
+ has: this.page.getByRole("link", {
1274
+ name: title,
1275
+ exact: true
1276
+ })
1277
+ }).locator(".icon-options")).not.toBeVisible();
1278
+ }
1279
+ async getDependencyCount() {
1280
+ await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
1281
+ const count = await this.railLocator.locator(".gate-task-dependencies .dependency").count();
1282
+ return count;
1283
+ }
1284
+ async addDependency() {
1285
+ await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".add-dependency-btn")).toBeVisible();
1286
+ await this.railLocator.locator(".add-dependency-btn").click();
1287
+ }
1288
+ async expectDependencyText(dependencies) {
1289
+ 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();
1294
+ }
1295
+ 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();
1304
+ const frame = this.page.getByTestId("undefined-menu");
1305
+ if (await frame.isVisible()) await this.railLocator.getByRole("menuitem", {
1306
+ name: "Edit"
1307
+ }).click();
1308
+ else {
1309
+ await locat.nth(1).click();
1310
+ await this.railLocator.getByRole("menuitem", {
1311
+ name: "Edit"
1312
+ }).click();
1313
+ }
1314
+ }
1315
+ }
1316
+ class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
1317
+ constructor(page){
1318
+ super(page);
1319
+ this.dependencyLocator = page.locator(".gate-task-dependencies .dependency-selector-component");
1320
+ this.release = this.dependencyLocator.locator("#release-dependency");
1321
+ this.phase = this.dependencyLocator.locator("#phase-dependency");
1322
+ this.task = this.dependencyLocator.locator("#task-dependency");
1323
+ }
1324
+ async getRelease() {
1325
+ await this.release.isVisible();
1326
+ const releaseValue = await this.release.getAttribute("value");
1327
+ return releaseValue;
1328
+ }
1329
+ async getPhase() {
1330
+ await this.phase.isVisible();
1331
+ const phaseValue = await this.phase.getAttribute("value");
1332
+ return phaseValue;
1333
+ }
1334
+ async getTask() {
1335
+ await this.task.isVisible();
1336
+ const taskValue = await this.task.getAttribute("value");
1337
+ return taskValue;
1338
+ }
1339
+ async setRelease(releaseTitle) {
1340
+ await this.release.click();
1341
+ await this.release.fill(releaseTitle);
1342
+ await this.page.getByRole("option", {
1343
+ name: releaseTitle
1344
+ }).click();
1345
+ }
1346
+ 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();
1353
+ }
1354
+ async setPhase(phaseTitle) {
1355
+ await this.phase.click();
1356
+ await this.phase.fill("");
1357
+ await this.page.getByRole("option", {
1358
+ name: phaseTitle
1359
+ }).click();
1360
+ }
1361
+ async setTask(taskTitle) {
1362
+ await this.task.click();
1363
+ await this.task.fill("");
1364
+ await this.page.getByRole("option", {
1365
+ name: taskTitle
1366
+ }).click();
1367
+ }
1368
+ async clearPhase() {
1369
+ await this.phase.clear();
1370
+ }
1371
+ async expectVariableModeEnabled(mode) {
1372
+ await (0, $kKeXs$playwrighttest.expect)(this.dependencyLocator.getByLabel("input-variable")).toBeVisible();
1373
+ const variablemode = await this.dependencyLocator.getByLabel("input-variable").getAttribute("aria-pressed");
1374
+ (0, $kKeXs$playwrighttest.expect)(variablemode).toBe("" + mode + "");
1375
+ }
1376
+ async clickVariable() {
1377
+ await this.dependencyLocator.getByLabel("input-variable").click();
1378
+ }
1379
+ //TODO: getAttribute('value') is not working as expected. Need to be fixed with better alternative.
1380
+ async expectMinimumOptions(options) {
1381
+ await this.dependencyLocator.getByPlaceholder("Please select a variable of").click();
1382
+ for(let i = 0; i < options.length; i++){
1383
+ const option = await this.dependencyLocator.locator("#mui-30-option-" + i).getAttribute("value");
1384
+ (0, $kKeXs$playwrighttest.expect)(options[i]).toContain(option);
1385
+ }
1386
+ }
1387
+ async enterNewVariable(variablename) {
1388
+ await this.page.getByLabel("Please select a variable of").click();
1389
+ await this.page.getByLabel("Please select a variable of").fill(variablename);
1390
+ await this.page.getByTestId("dot-action-item-btn").click();
1391
+ }
1392
+ async selectVariable(variablename) {
1393
+ await this.page.getByLabel("Please select a variable of").click();
1394
+ await this.page.getByRole("option", {
1395
+ name: variablename
1396
+ }).click();
1397
+ }
1176
1398
  }
1177
1399
 
1178
1400
 
@@ -1193,9 +1415,44 @@ class $f9016705c1a1eb20$export$aa59788fdecae2f2 extends (0, $f8721861c660dd88$ex
1193
1415
  await test.isVisible();
1194
1416
  await (0, $kKeXs$playwrighttest.expect)(test).toContainText(filename);
1195
1417
  }
1418
+ async getAttachmentsListCount() {
1419
+ return await this.page.locator(".file-upload-list div").count();
1420
+ }
1421
+ async uploadFile(filePath) {
1422
+ const fileChooserPromise = this.page.waitForEvent("filechooser");
1423
+ await this.page.getByRole("button", {
1424
+ name: "Select file(s)"
1425
+ }).click();
1426
+ const fileChooser = await fileChooserPromise;
1427
+ await fileChooser.setFiles(filePath);
1428
+ }
1429
+ async downloadFile(filename) {
1430
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1431
+ this.page.on("download", ()=>{});
1432
+ const downloadPromise = this.page.waitForEvent("download");
1433
+ await this.page.locator("li").filter({
1434
+ hasText: "" + filename + ""
1435
+ }).click();
1436
+ await downloadPromise;
1437
+ }
1438
+ async deleteAttachment(fileName) {
1439
+ await this.page.locator("li").filter({
1440
+ hasText: fileName
1441
+ }).click();
1442
+ await this.page.getByLabel("delete file").click();
1443
+ await this.page.getByRole("button", {
1444
+ name: "Delete"
1445
+ }).click();
1446
+ }
1447
+ async expectWithNoAttachment(tempFile) {
1448
+ const test = await this.page.locator(".task-attachments-grid .file-item-text").isVisible();
1449
+ if (test) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toContainText(tempFile);
1450
+ else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toBeVisible();
1451
+ }
1196
1452
  }
1197
1453
 
1198
1454
 
1455
+
1199
1456
  class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
1200
1457
  constructor(page){
1201
1458
  super(page);
@@ -1256,6 +1513,20 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
1256
1513
  await this.commentBox.fill(comment);
1257
1514
  await this.confirm.click();
1258
1515
  }
1516
+ async expectTaskTitle(taskTitle) {
1517
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".task-drawer .task-title-input .dot-view-mode-typography").innerText()).toContain(taskTitle);
1518
+ }
1519
+ async expectTypeToContain(taskType) {
1520
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".task-drawer .task-type").innerText()).toContain(taskType);
1521
+ }
1522
+ async clickExpand() {
1523
+ await this.page.locator(".icon-fullscreen-enter").click();
1524
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".icon-fullscreen-enter")).not.toBeVisible();
1525
+ }
1526
+ async clickShrink() {
1527
+ await this.page.locator(".icon-fullscreen-exit").click();
1528
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".icon-fullscreen-exit")).not.toBeVisible();
1529
+ }
1259
1530
  }
1260
1531
 
1261
1532
 
@@ -1306,6 +1577,11 @@ class $8681d8a3f46f87b7$export$d1077068a9cc9f17 extends (0, $f8721861c660dd88$ex
1306
1577
  name: "Reset"
1307
1578
  }).click();
1308
1579
  }
1580
+ async expectWithAttachment(filename) {
1581
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".attachments tr td a").filter({
1582
+ hasText: filename
1583
+ })).toBeVisible();
1584
+ }
1309
1585
  }
1310
1586
 
1311
1587
 
@@ -1389,6 +1665,18 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
1389
1665
  }).click();
1390
1666
  return this.taskDrawer;
1391
1667
  }
1668
+ async openTaskDrawerFromTableView(taskName) {
1669
+ await this.page.locator(".name-cell-title").getByText(taskName, {
1670
+ exact: true
1671
+ }).click();
1672
+ return this.taskDrawer;
1673
+ }
1674
+ async openTaskDrawerFromGrantt(taskName) {
1675
+ await this.page.locator(".gantt_tree_content").getByText(taskName, {
1676
+ exact: true
1677
+ }).dblclick();
1678
+ return this.taskDrawer;
1679
+ }
1392
1680
  async openVariables() {
1393
1681
  await this.openReleaseMenu("Variables");
1394
1682
  }
@@ -1448,6 +1736,24 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
1448
1736
  async backToRelease() {
1449
1737
  await this.page.locator(".icon-back").click();
1450
1738
  }
1739
+ async openTableView() {
1740
+ await this.page.locator(".xl-icon.table-icon").click();
1741
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-grid-container")).toBeVisible();
1742
+ }
1743
+ async openPlannerView() {
1744
+ await this.page.locator(".xl-icon.planner-icon").click();
1745
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".gantt-container")).toBeVisible();
1746
+ }
1747
+ async expandGanttFolder() {
1748
+ const icExpandTreeview1 = this.page.locator(".gantt_tree_icon.gantt_open");
1749
+ for (const element of (await icExpandTreeview1.all())){
1750
+ const blnVal = await element.isVisible();
1751
+ if (blnVal) {
1752
+ await element.click();
1753
+ await this.expandGanttFolder();
1754
+ }
1755
+ }
1756
+ }
1451
1757
  }
1452
1758
  class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
1453
1759
  constructor(page, phaseName){
@@ -1494,6 +1800,11 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
1494
1800
  async expectToHaveTitle(phaseTitle) {
1495
1801
  await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".phase-title")).toContainText(phaseTitle);
1496
1802
  }
1803
+ async expectTemplateLabelNotToBePresent() {
1804
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-chip").filter({
1805
+ hasText: "TEMPLATE"
1806
+ })).not.toBeVisible();
1807
+ }
1497
1808
  }
1498
1809
 
1499
1810
 
@@ -1549,17 +1860,16 @@ class $be4dd73206d8e76b$export$3cac5fd37ae64b91 extends (0, $f8721861c660dd88$ex
1549
1860
 
1550
1861
 
1551
1862
 
1863
+
1552
1864
  class $bb5572a48b31014a$export$e2e2e1ffdce20c30 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
1553
1865
  constructor(page){
1554
1866
  super(page);
1555
1867
  this.userName = page.locator("#username");
1556
- this.name = page.locator("#full-name");
1868
+ this.name = page.locator("#fullName");
1557
1869
  this.email = page.locator("#email");
1558
- this.password = page.locator('[data-test="password-input"]');
1559
- this.cnfPassword = page.locator("#passwordConfirmation");
1560
- this.saveButton = page.getByRole("button", {
1561
- name: "Save"
1562
- });
1870
+ this.password = page.locator("#password");
1871
+ this.cnfPassword = page.locator("#confirmPassword");
1872
+ this.saveButton = page.getByTestId("save-btn");
1563
1873
  this.cancelButton = page.getByRole("button", {
1564
1874
  name: "Cancel"
1565
1875
  });
@@ -1583,6 +1893,9 @@ class $bb5572a48b31014a$export$e2e2e1ffdce20c30 extends (0, $f8721861c660dd88$ex
1583
1893
  return await this.cnfPassword.fill(cnfPassword);
1584
1894
  }
1585
1895
  async save() {
1896
+ await this.saveButton.isEnabled();
1897
+ await (0, $kKeXs$playwrighttest.expect)(this.saveButton).not.toBeDisabled();
1898
+ await this.saveButton.focus();
1586
1899
  await this.saveButton.click();
1587
1900
  }
1588
1901
  async cancel() {
@@ -1598,7 +1911,6 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
1598
1911
  constructor(page){
1599
1912
  super(page);
1600
1913
  this.page = page;
1601
- this.newUserButton = this.page.getByTestId("new-user-btn");
1602
1914
  this.modal = new (0, $bb5572a48b31014a$export$e2e2e1ffdce20c30)(page);
1603
1915
  }
1604
1916
  async openUsersPage() {
@@ -1609,11 +1921,13 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
1609
1921
  async toggleLoginPermission(username) {
1610
1922
  await this.page.getByRole("row", {
1611
1923
  name: "" + username + ""
1612
- }).getByRole("checkbox").check();
1613
- //await this.page.locator(`tr:contains('${username}') .login-permission input`).click();
1924
+ }).getByRole("checkbox").click();
1925
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("row", {
1926
+ name: "" + username + ""
1927
+ }).locator(".Mui-checked")).toBeChecked();
1614
1928
  }
1615
1929
  async addUser() {
1616
- await this.newUserButton.click();
1930
+ await this.page.locator(".new-user-btn").click();
1617
1931
  }
1618
1932
  async createUser(username, password) {
1619
1933
  await this.modal.setUserName(username);
@@ -1882,6 +2196,419 @@ class $a8855257f8bb2b12$export$43682cddead1dd78 extends (0, $f8721861c660dd88$ex
1882
2196
 
1883
2197
 
1884
2198
 
2199
+
2200
+
2201
+
2202
+ class $ed2d4739e27d43c1$export$60c3bfa6385e2a10 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2203
+ constructor(page){
2204
+ super(page);
2205
+ this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
2206
+ }
2207
+ async openTask(taskName) {
2208
+ await this.filterTaskByTitle(taskName);
2209
+ await this.page.getByText(taskName).click();
2210
+ }
2211
+ async filterTaskByTitle(taskname) {
2212
+ await this.page.locator(".toggle-search-filter").click();
2213
+ await this.page.locator(".searchFilter").fill(taskname);
2214
+ await this.page.locator(".searchFilter").press("Enter");
2215
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("//div[@data-task-title]").filter({
2216
+ hasText: taskname
2217
+ })).toBeVisible();
2218
+ }
2219
+ async filterTasksByTag(tag, taskTitleForValidation) {
2220
+ await this.page.locator(".toggle-search-filter").click();
2221
+ await this.page.locator(".tag-input").fill(tag);
2222
+ await this.page.locator(".tag-input").press("Enter");
2223
+ //TODO: Validation can be changed based on actual test case implementation
2224
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("//div[@data-task-title]").filter({
2225
+ hasText: taskTitleForValidation
2226
+ })).toBeVisible();
2227
+ }
2228
+ async filterTasksByReleaseTitle(releaseTitle) {
2229
+ await this.page.locator(".toggle-search-filter").click();
2230
+ await this.page.locator(".release-input").fill(releaseTitle);
2231
+ await this.page.locator(".release-input").press("Enter");
2232
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".group-title").filter({
2233
+ hasText: releaseTitle
2234
+ })).toBeVisible();
2235
+ }
2236
+ async openSingleTask(taskId, showDetails = false) {
2237
+ await this.page.goto(`./#/tasks/${taskId}?showDetails=${showDetails}`);
2238
+ }
2239
+ async expectReleaseLinksDisplayed(releaseTitle, displayed = true) {
2240
+ if (displayed) {
2241
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
2242
+ name: "" + releaseTitle + ""
2243
+ })).toBeVisible();
2244
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".view-in-release")).toBeVisible();
2245
+ } else {
2246
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
2247
+ name: "" + releaseTitle + ""
2248
+ })).not.toBeVisible();
2249
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".view-in-release")).not.toBeVisible();
2250
+ }
2251
+ }
2252
+ async expectTaskTitle(taskTitle) {
2253
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator("#tasks0").innerText()).toContain(taskTitle);
2254
+ }
2255
+ }
2256
+
2257
+
2258
+
2259
+
2260
+ class $4efca3d4eadf892b$export$6adb8dd3f0d1e432 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2261
+ constructor(page){
2262
+ super(page);
2263
+ this.tempDir = "";
2264
+ this.content = "";
2265
+ }
2266
+ async createTempFile(fileName, testInfo) {
2267
+ const content = fileName.toString();
2268
+ const tempDir = testInfo.outputPath(fileName.toString());
2269
+ $kKeXs$fs.promises.writeFile(tempDir, content, "utf8");
2270
+ }
2271
+ }
2272
+
2273
+
2274
+
2275
+
2276
+
2277
+
2278
+
2279
+
2280
+ class $f4ca0e32f2cf5291$export$ccf2756779bad715 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2281
+ constructor(page){
2282
+ super(page);
2283
+ }
2284
+ async getAttachmentsListCount() {
2285
+ return await this.page.locator(".attachments tr").count();
2286
+ }
2287
+ async uploadFile(filePath) {
2288
+ const fileChooserPromise = this.page.waitForEvent("filechooser");
2289
+ await this.page.locator('input[type="file"]').click();
2290
+ const fileChooser = await fileChooserPromise;
2291
+ await fileChooser.setFiles(filePath);
2292
+ }
2293
+ async expectWithAttachment(filename) {
2294
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".attachments tr td a").filter({
2295
+ hasText: filename
2296
+ })).toBeVisible();
2297
+ }
2298
+ async expectWithNoAttachment(filename) {
2299
+ const test = await this.page.locator(".attachments").isVisible();
2300
+ if (test) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".attachments tr td a").filter({
2301
+ hasText: filename
2302
+ })).not.toBeVisible();
2303
+ }
2304
+ async downloadFile(filename) {
2305
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
2306
+ const downloadPromise1 = this.page.waitForEvent("download");
2307
+ await this.page.getByText(filename).click();
2308
+ const download = await downloadPromise1;
2309
+ // Wait for the download process to complete and save the downloaded file in given path.
2310
+ await download.saveAs("./core/xlr-ui/build/playwright/" + download.suggestedFilename());
2311
+ (0, $kKeXs$playwrighttest.expect)(download.suggestedFilename()).toBe(filename);
2312
+ }
2313
+ async deleteAttachment(fileName) {
2314
+ await this.page.getByRole("row", {
2315
+ name: fileName
2316
+ }).locator("span").click();
2317
+ await this.page.getByText("Remove").click();
2318
+ }
2319
+ async save() {
2320
+ await this.page.getByRole("button", {
2321
+ name: "Save"
2322
+ }).click({
2323
+ timeout: 8000
2324
+ });
2325
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".form-footer .last-saved")).toBeVisible();
2326
+ }
2327
+ async reset() {
2328
+ await this.page.getByRole("button", {
2329
+ name: "Reset"
2330
+ }).waitFor();
2331
+ await this.page.getByRole("button", {
2332
+ name: "Reset"
2333
+ }).click();
2334
+ }
2335
+ async removeDueDate() {
2336
+ await this.page.locator(".due-date .close-icon").click();
2337
+ }
2338
+ async setScheduledStartDate(date, monthYear) {
2339
+ await this.page.locator(`.scheduled-start-date .date`).click();
2340
+ const prev = this.page.locator(".datepicker-days .prev");
2341
+ const next = this.page.locator(".datepicker-days .next");
2342
+ const monYear = this.page.locator(".datepicker-days .datepicker-switch");
2343
+ const thisMonth = (0, ($parcel$interopDefault($kKeXs$moment)))(monthYear, "MMMM YYYY").isBefore();
2344
+ while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
2345
+ else await next.click();
2346
+ await this.page.getByRole("cell", {
2347
+ name: "" + date + ""
2348
+ }).first().click();
2349
+ }
2350
+ async setDuration(days, hours, mins) {
2351
+ await this.page.locator(".duration-editor").click();
2352
+ if (typeof days !== "undefined") await this.page.locator(".days").fill(days);
2353
+ if (typeof hours !== "undefined") await this.page.locator(".hours").fill(hours);
2354
+ if (typeof mins !== "undefined") await this.page.locator(".minutes").fill(mins);
2355
+ }
2356
+ async expectScheduledStartDateToBe(date) {
2357
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`.scheduled-start-date .date input`).getAttribute("value")).toBe(date);
2358
+ }
2359
+ async expectDueDateToBe(date) {
2360
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".due-date .date-editor .date > .light-text").getAttribute("value")).toContain(date);
2361
+ }
2362
+ async expectedDueDateTime(time) {
2363
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".due-date .date-editor .time-picker-holder input").getAttribute("value")).toContain(time);
2364
+ }
2365
+ async expectDurationToBe(duration) {
2366
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".duration-editor").textContent()).toBe(duration);
2367
+ }
2368
+ async setUsername(username) {
2369
+ await this.page.locator(".script-username").click();
2370
+ await this.page.locator("user-input-with-variable").getByLabel("*").fill(username);
2371
+ await this.page.locator("user-input-with-variable").press("Enter");
2372
+ }
2373
+ async setPassword(password) {
2374
+ await this.page.locator(".field > .display").click();
2375
+ await this.page.locator('input[name="scriptUserPassword"]').fill(password);
2376
+ await this.page.locator('input[name="scriptUserPassword"]').press("Enter");
2377
+ }
2378
+ async expectScriptUsernameToBe(username) {
2379
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".script-username").textContent()).toContain(username);
2380
+ }
2381
+ async expectScriptUserPasswordToBe(password) {
2382
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator('span[name="scriptUserPassword"]').textContent()).toContain(password);
2383
+ }
2384
+ }
2385
+
2386
+
2387
+
2388
+ class $3048f12d9d777352$export$98de9bca7d44fc1a extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2389
+ constructor(page){
2390
+ super(page);
2391
+ }
2392
+ async setName(name) {
2393
+ await this.page.locator("#release-form-title").fill(name);
2394
+ }
2395
+ async setDescription(description) {
2396
+ await this.page.getByText("Set description...").click();
2397
+ await this.page.locator("span").filter({
2398
+ hasText: "Set description... * Save"
2399
+ }).locator("i").first().click();
2400
+ await this.page.locator("textarea").click();
2401
+ await this.page.locator("textarea").fill(description);
2402
+ await this.page.getByText("Save", {
2403
+ exact: true
2404
+ }).click();
2405
+ }
2406
+ async create() {
2407
+ await this.page.getByRole("button", {
2408
+ name: "Create"
2409
+ }).click();
2410
+ }
2411
+ }
2412
+
2413
+
2414
+
2415
+
2416
+ class $b12db2561a3bf785$export$899a7095bab1879d extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2417
+ constructor(page){
2418
+ super(page);
2419
+ }
2420
+ async expectAllowConcurrentReleasesFromTrigger(expectedValue) {
2421
+ if (expectedValue) {
2422
+ await this.page.locator(".col-xs-2 .trigger-item-state").textContent({
2423
+ timeout: 3000
2424
+ });
2425
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".col-xs-2 .trigger-item-state").textContent()).toContain("Enabled");
2426
+ } else {
2427
+ await this.page.locator(".col-xs-2 .trigger-item-state").textContent({
2428
+ timeout: 3000
2429
+ });
2430
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".col-xs-2 .trigger-item-state").textContent()).toContain("Disabled");
2431
+ }
2432
+ }
2433
+ async setAllowConcurrentReleasesFromTriggerAndSubmit(checked) {
2434
+ const result = await this.page.locator(".col-xs-2 .trigger-item-state").textContent({
2435
+ timeout: 3000
2436
+ });
2437
+ if (result === "Enabled" && checked === false || result == "Disabled" && checked === true) await this.page.locator('form[name="releaseTriggerOptions"] label[for="cb"]').click();
2438
+ }
2439
+ async expectTriggersVisible(amount) {
2440
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".xlr-trigger-row .trigger-row-content")).toHaveCount(amount);
2441
+ }
2442
+ async expectNoNewTriggerButtonShown() {
2443
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".trigger-header a.button.primary")).not.toBeVisible();
2444
+ }
2445
+ }
2446
+
2447
+
2448
+ class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2449
+ constructor(page){
2450
+ super(page);
2451
+ this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
2452
+ this.properties = new (0, $f4ca0e32f2cf5291$export$ccf2756779bad715)(page);
2453
+ this.createTemplatePage = new (0, $3048f12d9d777352$export$98de9bca7d44fc1a)(page);
2454
+ this.triggers = new (0, $b12db2561a3bf785$export$899a7095bab1879d)(page);
2455
+ }
2456
+ async openTemplateMenu(menuItem) {
2457
+ await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
2458
+ exact: true
2459
+ }).click();
2460
+ }
2461
+ async openTaskDrawer(taskName) {
2462
+ await this.page.getByText(taskName, {
2463
+ exact: true
2464
+ }).click();
2465
+ return this.taskDrawer;
2466
+ }
2467
+ async openTaskDrawerFromGrantt(taskName) {
2468
+ await this.page.locator(".gantt_tree_content").getByText(taskName, {
2469
+ exact: true
2470
+ }).dblclick();
2471
+ return this.taskDrawer;
2472
+ }
2473
+ async openProperties() {
2474
+ await this.openTemplateMenu("Properties");
2475
+ }
2476
+ async openTriggers() {
2477
+ await this.openTemplateMenu("Triggers");
2478
+ }
2479
+ async backToTemplate() {
2480
+ await this.page.locator(".icon-back").click();
2481
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Templates")).toBeVisible();
2482
+ }
2483
+ async expectTemplateLabelToBePresent() {
2484
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-chip").filter({
2485
+ hasText: "TEMPLATE"
2486
+ })).toBeVisible();
2487
+ }
2488
+ async expectSubPage(menuItem, toBePresent) {
2489
+ if (toBePresent) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
2490
+ exact: true
2491
+ })).toBeVisible();
2492
+ else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
2493
+ exact: true
2494
+ })).not.toBeVisible();
2495
+ }
2496
+ async openFlowView() {
2497
+ await this.page.locator(".xl-icon.column-icon").click();
2498
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#release-content")).toBeVisible();
2499
+ }
2500
+ async openTableView() {
2501
+ await this.page.locator(".xl-icon.table-icon").click();
2502
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-grid-container")).toBeVisible();
2503
+ }
2504
+ async openPlannerView() {
2505
+ await this.page.locator(".xl-icon.planner-icon").click();
2506
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".gantt-container")).toBeVisible();
2507
+ }
2508
+ async openCodeView() {
2509
+ await this.page.locator(".xl-icon.code-icon").click();
2510
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#dsl-content")).toBeVisible();
2511
+ }
2512
+ async expandGanttFolder() {
2513
+ const icExpandTreeview1 = this.page.locator(".gantt_tree_icon.gantt_open");
2514
+ for (const element of (await icExpandTreeview1.all())){
2515
+ const blnVal = await element.isVisible();
2516
+ if (blnVal) {
2517
+ await element.click();
2518
+ await this.expandGanttFolder();
2519
+ }
2520
+ }
2521
+ }
2522
+ }
2523
+
2524
+
2525
+
2526
+
2527
+ class $8b6ce149dd48e48b$export$7e1d435fa474ee21 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2528
+ constructor(page){
2529
+ super(page);
2530
+ }
2531
+ async openTemplatesList(filter) {
2532
+ let url = "/templates";
2533
+ if (filter) url += `?has_filter&filter=${filter}`;
2534
+ await this.page.goto(url);
2535
+ }
2536
+ async searchBy(criteria) {
2537
+ await this.page.locator(".searchFilter").clear();
2538
+ await this.page.locator(".searchFilter").fill(criteria);
2539
+ }
2540
+ async copy(originTitle, targetTitle) {
2541
+ await this.page.locator(".title").filter({
2542
+ hasText: originTitle
2543
+ }).locator(".copy").click();
2544
+ await this.page.getByLabel("Template name").clear();
2545
+ await this.page.getByLabel("Template name").fill(targetTitle);
2546
+ await this.page.getByLabel("Description").clear();
2547
+ await this.page.getByLabel("Description").fill("description");
2548
+ await this.page.getByRole("button", {
2549
+ name: "Continue"
2550
+ }).click();
2551
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-chip").filter({
2552
+ hasText: "TEMPLATE"
2553
+ })).toBeVisible();
2554
+ }
2555
+ async expectTemplateVisible(title, expected = true) {
2556
+ if (expected) {
2557
+ await this.page.locator(".template").filter({
2558
+ hasText: title
2559
+ }).waitFor();
2560
+ (0, $kKeXs$playwrighttest.expect)(this.page.locator(".template").filter({
2561
+ hasText: title
2562
+ })).toBeVisible();
2563
+ } else {
2564
+ await this.page.locator(".template").filter({
2565
+ hasText: title
2566
+ }).waitFor();
2567
+ (0, $kKeXs$playwrighttest.expect)(this.page.locator(".template").filter({
2568
+ hasText: title
2569
+ })).not.toBeVisible();
2570
+ }
2571
+ }
2572
+ async delete(title) {
2573
+ await this.page.locator(".title").filter({
2574
+ hasText: title
2575
+ }).locator(".delete").waitFor();
2576
+ await this.page.locator(".title").filter({
2577
+ hasText: title
2578
+ }).locator(".delete").click();
2579
+ await this.page.getByRole("button", {
2580
+ name: "Delete"
2581
+ }).click();
2582
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".title").filter({
2583
+ hasText: title
2584
+ })).not.toBeVisible();
2585
+ }
2586
+ async clickCreateNewTemplate() {
2587
+ await this.page.getByTestId("dot-button").click();
2588
+ await this.page.getByRole("menuitem", {
2589
+ name: "Create new template"
2590
+ }).click();
2591
+ }
2592
+ async openTemplateByName(templateName) {
2593
+ await this.page.getByPlaceholder("Filter by title...", {
2594
+ exact: true
2595
+ }).click();
2596
+ await this.page.getByPlaceholder("Filter by title...", {
2597
+ exact: true
2598
+ }).fill(templateName);
2599
+ await this.page.getByPlaceholder("Filter by title...", {
2600
+ exact: true
2601
+ }).press("Enter");
2602
+ await this.page.locator(`.template`).filter({
2603
+ hasText: templateName
2604
+ }).locator(`.raised-link`).waitFor();
2605
+ await this.page.locator(`.template`).filter({
2606
+ hasText: templateName
2607
+ }).locator(`.raised-link`).click();
2608
+ }
2609
+ }
2610
+
2611
+
1885
2612
  class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
1886
2613
  constructor(page){
1887
2614
  this.page = page;
@@ -1889,9 +2616,13 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
1889
2616
  this.settingsMenu = new (0, $7867194f18360347$export$1d7840d5cdc861d5)(page);
1890
2617
  this.usersPage = new (0, $3ceab7c613cabfd6$export$107317390f5aa598)(page);
1891
2618
  this.applicationPage = new (0, $dc91ece6da6cadfa$export$1533b625ec0c75e2)(page);
2619
+ this.taskListPage = new (0, $ed2d4739e27d43c1$export$60c3bfa6385e2a10)(page);
2620
+ this.templatePage = new (0, $959d38250779aa22$export$8c8e7207254accc2)(page);
2621
+ this.templateListPage = new (0, $8b6ce149dd48e48b$export$7e1d435fa474ee21)(page);
1892
2622
  this.taskDetailsPage = new (0, $a642d735048996f9$export$922081b54f2ab994)(page);
1893
2623
  this.releaseCalendarPage = new (0, $a8855257f8bb2b12$export$43682cddead1dd78)(page);
1894
2624
  this.releaseListPage = new (0, $87643f2d97b0644e$export$a678525e79c4ccc4)(page);
2625
+ this.util = new (0, $4efca3d4eadf892b$export$6adb8dd3f0d1e432)(page);
1895
2626
  }
1896
2627
  async openTemplate(id) {
1897
2628
  return this.openReleaseOrTemplate(id, false);
@@ -1991,6 +2722,14 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
1991
2722
  await this.page.waitForSelector("#release");
1992
2723
  return new (0, $9b9a8c3da392d020$export$f43492e8ac3c566)(this.page);
1993
2724
  }
2725
+ async collapseSideView() {
2726
+ await this.page.locator('.dot-tooltip[aria-label="Collapse"]').click();
2727
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.dot-tooltip[aria-label="Collapse"]')).not.toBeVisible();
2728
+ }
2729
+ async expandSideView() {
2730
+ await this.page.locator('.dot-tooltip[aria-label="Expand"]').click();
2731
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.dot-tooltip[aria-label="Expand"]')).not.toBeVisible();
2732
+ }
1994
2733
  }
1995
2734
 
1996
2735
 
@@ -2878,9 +3617,12 @@ const $6998c6a53a9eb4fa$export$e0969da9b8fb378d = (0, $kKeXs$playwrighttest.test
2878
3617
  }
2879
3618
  });
2880
3619
  class $6998c6a53a9eb4fa$var$Fixtures {
3620
+ archivedReleaseIds = [];
2881
3621
  releaseIds = [];
2882
3622
  triggerIds = [];
2883
3623
  configurationIds = [];
3624
+ globalVariableIds = [];
3625
+ folderIds = [];
2884
3626
  usernames = [];
2885
3627
  userProfiles = [];
2886
3628
  constructor(request, page){
@@ -2892,12 +3634,38 @@ class $6998c6a53a9eb4fa$var$Fixtures {
2892
3634
  this.releaseIds.push(release.id);
2893
3635
  return this.deleteRelease(release.id).then(()=>this.deleteArchivedRelease(release.id)).then(()=>this.doPost("fixtures/release", release));
2894
3636
  }
3637
+ archivedRelease(release) {
3638
+ this.initDefaults(release);
3639
+ this.archivedReleaseIds.push(release.id);
3640
+ return this.doPost("fixtures/archived", release);
3641
+ }
2895
3642
  configuration(ci) {
2896
3643
  this.configurationIds.push(ci.id);
2897
3644
  return this.doPost("fixtures/shared", [
2898
3645
  ci
2899
3646
  ]);
2900
3647
  }
3648
+ getParentId(id) {
3649
+ return id.substring(0, id.lastIndexOf("/"));
3650
+ }
3651
+ async folder(folder) {
3652
+ const parentId = this.getParentId(folder.id);
3653
+ folder.type = "xlrelease.Folder";
3654
+ //ToDo: Add system teams
3655
+ const teams = folder.teams;
3656
+ delete folder.teams;
3657
+ //ToDo: Add Children
3658
+ /* eslint-disable @typescript-eslint/no-unused-vars */ const children = folder.children || [];
3659
+ delete folder.children;
3660
+ if (teams) return this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
3661
+ return this.doPost(`api/v1/folders/${parentId}`, folder);
3662
+ }
3663
+ createFolder(folderJson) {
3664
+ folderJson.type = "xlrelease.Folder";
3665
+ return this.doPost(`fixtures/folders`, [
3666
+ folderJson
3667
+ ]);
3668
+ }
2901
3669
  trigger(trigger) {
2902
3670
  this.triggerIds.push(trigger.id);
2903
3671
  return this.doPost("fixtures/trigger", trigger);
@@ -2929,8 +3697,19 @@ class $6998c6a53a9eb4fa$var$Fixtures {
2929
3697
  id
2930
3698
  ]);
2931
3699
  }
2932
- activityLogs(releaseId, logs) {
2933
- return this.doPost(`fixtures/activityLogs/${releaseId}`, logs);
3700
+ deleteFolder(folderId) {
3701
+ const id = this.doGet(`api/v1/folders/${folderId}`);
3702
+ return this.doDelete(`api/v1/folders/${id}`);
3703
+ }
3704
+ activityLogs(id, logs) {
3705
+ return this.doPost(`fixtures/activityLogs/${id}`, logs);
3706
+ }
3707
+ globalVariable(variable) {
3708
+ variable.id = variable.id || `Configuration/variables/global/Variable_${variable.key}`;
3709
+ this.globalVariableIds.push(variable.id);
3710
+ variable.requiresValue = false;
3711
+ variable.showOnReleaseStart = false;
3712
+ return this.doPost("api/v1/config/Configuration/variables/global", variable);
2934
3713
  }
2935
3714
  async cleanAll() {
2936
3715
  for (const username of this.usernames)await this.deleteUser(username);
@@ -2938,6 +3717,8 @@ class $6998c6a53a9eb4fa$var$Fixtures {
2938
3717
  for (const triggerId of this.triggerIds)await this.deleteTrigger(triggerId);
2939
3718
  for (const releaseId of this.releaseIds.reverse())await this.deleteRelease(releaseId);
2940
3719
  for (const confId of this.configurationIds)await this.deleteConfiguration(confId);
3720
+ for (const folderId of this.folderIds.reverse())await this.deleteFolder(folderId);
3721
+ this.folderIds = [];
2941
3722
  this.releaseIds = [];
2942
3723
  this.triggerIds = [];
2943
3724
  this.configurationIds = [];
@@ -3007,6 +3788,16 @@ class $6998c6a53a9eb4fa$var$Fixtures {
3007
3788
  const summary = json.fields.summary;
3008
3789
  (0, $kKeXs$playwrighttest.expect)(summary).toBe(expectedSummary);
3009
3790
  }
3791
+ async expectContainingAttachments(releaseId, tempFile) {
3792
+ if (releaseId.indexOf("Applications/") === -1) releaseId = "Applications/" + releaseId;
3793
+ await (0, $kKeXs$playwrighttest.expect)(async ()=>{
3794
+ const resp = await this.doPost(`fixtures/expectContainingAttachments/${releaseId}`, {
3795
+ name: tempFile,
3796
+ expectedContent: tempFile
3797
+ });
3798
+ (0, $kKeXs$playwrighttest.expect)(resp).toBe(true);
3799
+ }).toPass();
3800
+ }
3010
3801
  async waitForReleaseStarted(releaseTitle) {
3011
3802
  await (0, $kKeXs$playwrighttest.expect)(async ()=>{
3012
3803
  const resp = await this.doPost("releases/search", {