@digital-ai/devops-page-object-release 0.0.25 → 0.0.27
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/CHANGELOG.md +16 -0
- package/dist/main.js +1380 -267
- package/dist/main.js.map +1 -1
- package/dist/module.js +1380 -267
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +307 -42
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -966,6 +966,7 @@ class $f8721861c660dd88$export$2b65d1d97338f32b {
|
|
|
966
966
|
class $3d3f3946c54f5897$export$34addcca3f0ae43f extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
967
967
|
constructor(page){
|
|
968
968
|
super(page);
|
|
969
|
+
this.releaseForm = this.page.locator("#release-properties .form-group");
|
|
969
970
|
}
|
|
970
971
|
async setName(releaseName) {
|
|
971
972
|
await this.page.locator("#release-form-title").click();
|
|
@@ -1012,6 +1013,14 @@ class $3d3f3946c54f5897$export$34addcca3f0ae43f extends (0, $f8721861c660dd88$ex
|
|
|
1012
1013
|
await this.page.locator(`#form-${variableName} .display`).click();
|
|
1013
1014
|
await this.page.locator(`input[name="${variableName}"]`).fill(value);
|
|
1014
1015
|
}
|
|
1016
|
+
async setVariable(variable, value) {
|
|
1017
|
+
await this.releaseForm.filter({
|
|
1018
|
+
hasText: variable
|
|
1019
|
+
}).locator("div[inline-text-editor]").click();
|
|
1020
|
+
await this.releaseForm.filter({
|
|
1021
|
+
hasText: variable
|
|
1022
|
+
}).locator("div[inline-text-editor] input").fill(value);
|
|
1023
|
+
}
|
|
1015
1024
|
}
|
|
1016
1025
|
|
|
1017
1026
|
|
|
@@ -1217,7 +1226,7 @@ class $880df57ffbf6e614$export$9b575f14aa5e09a1 extends (0, $f8721861c660dd88$ex
|
|
|
1217
1226
|
}
|
|
1218
1227
|
|
|
1219
1228
|
|
|
1220
|
-
class $
|
|
1229
|
+
class $59543fc69900e8db$export$f8e64fcf447db2bf extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1221
1230
|
constructor(page){
|
|
1222
1231
|
super(page);
|
|
1223
1232
|
this.addListValue = this.page.locator(".variable-selector .xl-components-input-full input");
|
|
@@ -1229,7 +1238,7 @@ class $fd4eef3ad2b2e612$export$a87f0ae8695e74be extends (0, $f8721861c660dd88$ex
|
|
|
1229
1238
|
}
|
|
1230
1239
|
async openVariable(variableKey) {
|
|
1231
1240
|
await this.page.locator(`.variables-list .variable`).getByText(variableKey).click();
|
|
1232
|
-
return new $
|
|
1241
|
+
return new $59543fc69900e8db$var$VariableModal(this.page);
|
|
1233
1242
|
}
|
|
1234
1243
|
async addNewVariable(variableName, labelname, description) {
|
|
1235
1244
|
await this.page.locator("#action-toolbar").getByTestId("dot-button").click();
|
|
@@ -1237,9 +1246,12 @@ class $fd4eef3ad2b2e612$export$a87f0ae8695e74be extends (0, $f8721861c660dd88$ex
|
|
|
1237
1246
|
await this.page.locator(".variable-label input").fill(labelname);
|
|
1238
1247
|
if (description) await this.page.locator(".variable-description input").fill(description);
|
|
1239
1248
|
}
|
|
1240
|
-
async selectVariableTextType(
|
|
1249
|
+
async selectVariableTextType(valueName, multiline) {
|
|
1241
1250
|
await this.page.getByRole("combobox").selectOption("StringVariable");
|
|
1242
|
-
|
|
1251
|
+
if (multiline) {
|
|
1252
|
+
await this.clickMultiline();
|
|
1253
|
+
await this.page.locator(".variable-value textarea").fill(valueName);
|
|
1254
|
+
} else await this.page.locator(".variable-value input").fill(valueName);
|
|
1243
1255
|
}
|
|
1244
1256
|
async selectVariableListboxType(possiblevalue, defaultValue, required) {
|
|
1245
1257
|
await this.page.getByRole("combobox").selectOption("DropDownListBox");
|
|
@@ -1253,7 +1265,6 @@ class $fd4eef3ad2b2e612$export$a87f0ae8695e74be extends (0, $f8721861c660dd88$ex
|
|
|
1253
1265
|
}
|
|
1254
1266
|
await this.page.locator(".variable-value select").type(defaultValue);
|
|
1255
1267
|
if (required) await this.page.getByRole("checkbox").check();
|
|
1256
|
-
else await this.page.getByRole("checkbox").uncheck();
|
|
1257
1268
|
}
|
|
1258
1269
|
async selectVariablePasswordType(possiblevalue) {
|
|
1259
1270
|
await this.page.getByRole("combobox").selectOption("PasswordStringVariable");
|
|
@@ -1278,9 +1289,10 @@ class $fd4eef3ad2b2e612$export$a87f0ae8695e74be extends (0, $f8721861c660dd88$ex
|
|
|
1278
1289
|
exact: true
|
|
1279
1290
|
}).click();
|
|
1280
1291
|
}
|
|
1281
|
-
async
|
|
1292
|
+
async selectVariableByDate(date, monthYear) {
|
|
1282
1293
|
await this.page.getByRole("combobox").selectOption("DateVariable");
|
|
1283
1294
|
await this.page.getByText("Select date").click();
|
|
1295
|
+
await this.setDate(date, monthYear);
|
|
1284
1296
|
}
|
|
1285
1297
|
async setDate(date, monthYear) {
|
|
1286
1298
|
await this.dateUtil.setDate(date, monthYear);
|
|
@@ -1318,14 +1330,16 @@ class $fd4eef3ad2b2e612$export$a87f0ae8695e74be extends (0, $f8721861c660dd88$ex
|
|
|
1318
1330
|
(0, $kKeXs$playwrighttest.expect)(rowLocator.toString()).toContain(type);
|
|
1319
1331
|
}
|
|
1320
1332
|
async clickEditVariable(variableName) {
|
|
1321
|
-
await this.page.locator("
|
|
1322
|
-
|
|
1323
|
-
|
|
1333
|
+
await this.page.locator(".data-row").filter({
|
|
1334
|
+
hasText: variableName
|
|
1335
|
+
}).getByText("Edit").first().click();
|
|
1336
|
+
return new $59543fc69900e8db$var$VariableModal(this.page);
|
|
1324
1337
|
}
|
|
1325
1338
|
async clickDeleteVariable(variableName) {
|
|
1326
|
-
await this.page.locator("
|
|
1327
|
-
|
|
1328
|
-
|
|
1339
|
+
await this.page.locator(".data-row").filter({
|
|
1340
|
+
hasText: variableName
|
|
1341
|
+
}).locator(".action .delete-icon").first().click();
|
|
1342
|
+
return new $59543fc69900e8db$var$DeleteVariableModel(this.page);
|
|
1329
1343
|
}
|
|
1330
1344
|
async expectVariablesCountToBe(count) {
|
|
1331
1345
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".variable .data-row")).toHaveCount(count);
|
|
@@ -1335,7 +1349,7 @@ class $fd4eef3ad2b2e612$export$a87f0ae8695e74be extends (0, $f8721861c660dd88$ex
|
|
|
1335
1349
|
hasText: variableName
|
|
1336
1350
|
})).not.toBeVisible();
|
|
1337
1351
|
}
|
|
1338
|
-
async
|
|
1352
|
+
async clearReleaseVariableSearch() {
|
|
1339
1353
|
await this.page.locator("[id='variables-filter']").clear();
|
|
1340
1354
|
}
|
|
1341
1355
|
async switchPossibleValuesToVariable(variableName) {
|
|
@@ -1356,8 +1370,23 @@ class $fd4eef3ad2b2e612$export$a87f0ae8695e74be extends (0, $f8721861c660dd88$ex
|
|
|
1356
1370
|
if (required) await this.page.getByRole("checkbox").check();
|
|
1357
1371
|
else await this.page.getByRole("checkbox").uncheck();
|
|
1358
1372
|
}
|
|
1373
|
+
async clickMultiline() {
|
|
1374
|
+
await this.page.locator("#multiline").click();
|
|
1375
|
+
}
|
|
1376
|
+
async searchFolderVariable(variableName) {
|
|
1377
|
+
await this.page.locator(".searchFilter").fill(variableName);
|
|
1378
|
+
}
|
|
1379
|
+
async clearFolderVarSearch() {
|
|
1380
|
+
await this.page.locator(".searchFilter").clear();
|
|
1381
|
+
}
|
|
1382
|
+
async clickFolderVariableButton() {
|
|
1383
|
+
await this.page.getByText("Folder variables").click();
|
|
1384
|
+
}
|
|
1385
|
+
async clickReleaseVariableButton() {
|
|
1386
|
+
await this.page.getByText("Release variables").click();
|
|
1387
|
+
}
|
|
1359
1388
|
}
|
|
1360
|
-
class $
|
|
1389
|
+
class $59543fc69900e8db$var$VariableModal extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1361
1390
|
constructor(page){
|
|
1362
1391
|
super(page);
|
|
1363
1392
|
this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
|
|
@@ -1400,8 +1429,8 @@ class $fd4eef3ad2b2e612$var$ReleaseVariableModal extends (0, $f8721861c660dd88$e
|
|
|
1400
1429
|
if (possiblevalue instanceof Array) for (const value of possiblevalue)(0, $kKeXs$playwrighttest.expect)(listLocator).toContain(value);
|
|
1401
1430
|
else (0, $kKeXs$playwrighttest.expect)(listLocator).toContain(possiblevalue);
|
|
1402
1431
|
}
|
|
1403
|
-
async expectPossibleVariableValues(
|
|
1404
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".variable-dropdown input")).toHaveValue(
|
|
1432
|
+
async expectPossibleVariableValues(possibleVariableValue) {
|
|
1433
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".variable-dropdown input")).toHaveValue(possibleVariableValue);
|
|
1405
1434
|
}
|
|
1406
1435
|
async addPossibleValue(value) {
|
|
1407
1436
|
if (value instanceof Array) for (const li of value){
|
|
@@ -1449,7 +1478,7 @@ class $fd4eef3ad2b2e612$var$ReleaseVariableModal extends (0, $f8721861c660dd88$e
|
|
|
1449
1478
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#modal .variable-label input")).toHaveValue(value);
|
|
1450
1479
|
}
|
|
1451
1480
|
async expectRequired(value) {
|
|
1452
|
-
if (value
|
|
1481
|
+
if (value) await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.form-group input[ng-model="var.requiresValue"]')).toBeChecked();
|
|
1453
1482
|
else await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.form-group input[ng-model="var.requiresValue"]')).not.toBeChecked();
|
|
1454
1483
|
}
|
|
1455
1484
|
async setDescription(description) {
|
|
@@ -1467,11 +1496,20 @@ class $fd4eef3ad2b2e612$var$ReleaseVariableModal extends (0, $f8721861c660dd88$e
|
|
|
1467
1496
|
async setValue(value) {
|
|
1468
1497
|
await this.page.locator(".variable-value input").fill(value);
|
|
1469
1498
|
}
|
|
1499
|
+
async clearValue() {
|
|
1500
|
+
await this.page.locator(".variable-value input").clear();
|
|
1501
|
+
}
|
|
1502
|
+
async clickMultiline() {
|
|
1503
|
+
await this.page.locator("#multiline").click();
|
|
1504
|
+
}
|
|
1505
|
+
async setValueForMultilinePassword(value) {
|
|
1506
|
+
await this.page.locator(".password-textarea").fill(value);
|
|
1507
|
+
}
|
|
1470
1508
|
}
|
|
1471
|
-
class $
|
|
1509
|
+
class $59543fc69900e8db$var$DeleteVariableModel extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1472
1510
|
constructor(page){
|
|
1473
1511
|
super(page);
|
|
1474
|
-
this.model = new $
|
|
1512
|
+
this.model = new $59543fc69900e8db$var$VariableModal(page);
|
|
1475
1513
|
this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
|
|
1476
1514
|
}
|
|
1477
1515
|
async deleteVariable() {
|
|
@@ -1674,11 +1712,23 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
1674
1712
|
}).click();
|
|
1675
1713
|
}
|
|
1676
1714
|
async setVariable(propertyName, variableName) {
|
|
1677
|
-
|
|
1715
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).fill(variableName);
|
|
1716
|
+
}
|
|
1717
|
+
async expectVariable(propertyName) {
|
|
1718
|
+
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`input[id="${propertyName}"]`)).toBeVisible();
|
|
1678
1719
|
}
|
|
1679
1720
|
async expectValueFromString(propertyName, propertyValue) {
|
|
1680
1721
|
return await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`)).toHaveText(propertyValue);
|
|
1681
1722
|
}
|
|
1723
|
+
async expectTo(value) {
|
|
1724
|
+
return await (0, $kKeXs$playwrighttest.expect)(this.railLocator.getByTestId(`dot-autocomplete-chip`)).toHaveText(value);
|
|
1725
|
+
}
|
|
1726
|
+
async expectSubjectToBe(value) {
|
|
1727
|
+
return (0, $kKeXs$playwrighttest.expect)(await this.page.locator("#notification-subject").getAttribute("value")).toContain(value);
|
|
1728
|
+
}
|
|
1729
|
+
async expectBodyToBe(value) {
|
|
1730
|
+
return await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".notification-body-field p")).toHaveText(value);
|
|
1731
|
+
}
|
|
1682
1732
|
async setValueFromMap(propertyName, key, value) {
|
|
1683
1733
|
await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.add-new-button`).click();
|
|
1684
1734
|
await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] input[id="new-row-key-input"]`).fill(key);
|
|
@@ -1739,8 +1789,7 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
1739
1789
|
}
|
|
1740
1790
|
async getDependencyCount() {
|
|
1741
1791
|
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
|
|
1742
|
-
|
|
1743
|
-
return count;
|
|
1792
|
+
return await this.railLocator.locator(".gate-task-dependencies .dependency").count();
|
|
1744
1793
|
}
|
|
1745
1794
|
async addDependency() {
|
|
1746
1795
|
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".add-dependency-btn")).toBeVisible();
|
|
@@ -1767,21 +1816,152 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
1767
1816
|
}).click();
|
|
1768
1817
|
}
|
|
1769
1818
|
}
|
|
1770
|
-
async
|
|
1819
|
+
async validateAutoCompleteOptionsInDescription(descriptionName, expectedVariableCount, variableToSelection) {
|
|
1771
1820
|
await this.page.getByLabel("Double-click to edit").waitFor({
|
|
1772
1821
|
timeout: 10000
|
|
1773
1822
|
});
|
|
1774
1823
|
await this.page.getByLabel("Double-click to edit").hover();
|
|
1775
1824
|
await this.page.locator(".markdown-viewer-actions").getByTestId("edit-button").click();
|
|
1776
1825
|
await this.page.locator("#task-description-input").fill(descriptionName);
|
|
1777
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-popper-content-wrapper .option-name")).toHaveCount(
|
|
1778
|
-
await this.page.locator(".dot-popper-content-wrapper .option-name").filter({
|
|
1779
|
-
hasText:
|
|
1826
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-popper-content-wrapper .option-name")).toHaveCount(expectedVariableCount);
|
|
1827
|
+
if (variableToSelection) await this.page.locator(".dot-popper-content-wrapper .option-name").filter({
|
|
1828
|
+
hasText: variableToSelection
|
|
1829
|
+
}).click();
|
|
1830
|
+
await this.page.getByRole("button", {
|
|
1831
|
+
name: "Save"
|
|
1832
|
+
}).click();
|
|
1833
|
+
}
|
|
1834
|
+
// eslint-disable-next-line max-params
|
|
1835
|
+
async validateAutoCompleteOptions(fieldLabel, value, expectedVariableCount, variableToSelect) {
|
|
1836
|
+
await this.page.getByLabel(fieldLabel).click();
|
|
1837
|
+
await this.page.getByLabel(fieldLabel).fill(value);
|
|
1838
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("option")).toHaveCount(expectedVariableCount);
|
|
1839
|
+
if (variableToSelect) await this.page.getByRole("option", {
|
|
1840
|
+
name: variableToSelect
|
|
1841
|
+
}).click();
|
|
1842
|
+
}
|
|
1843
|
+
async setReleaseTitle(releaseName) {
|
|
1844
|
+
await this.page.getByLabel("Release title *").fill(releaseName);
|
|
1845
|
+
}
|
|
1846
|
+
async setFolder(folderName) {
|
|
1847
|
+
await this.page.getByPlaceholder("Select a folder").click();
|
|
1848
|
+
await this.page.getByPlaceholder("Search folder...").fill(folderName);
|
|
1849
|
+
await this.page.getByRole("button", {
|
|
1850
|
+
name: folderName
|
|
1851
|
+
}).click();
|
|
1852
|
+
}
|
|
1853
|
+
async setTemplate(templateName) {
|
|
1854
|
+
await this.page.getByLabel("Template").click();
|
|
1855
|
+
await this.page.getByLabel("Template").fill(templateName);
|
|
1856
|
+
await this.page.getByRole("option", {
|
|
1857
|
+
name: templateName
|
|
1858
|
+
}).click();
|
|
1859
|
+
}
|
|
1860
|
+
async clearTemplate() {
|
|
1861
|
+
await this.page.locator("#templateId").click();
|
|
1862
|
+
await this.page.locator("#templateId").clear();
|
|
1863
|
+
}
|
|
1864
|
+
async errorMsgVisible(errorMessage) {
|
|
1865
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).toContainText(errorMessage);
|
|
1866
|
+
}
|
|
1867
|
+
async isButtonVisible(buttonName, visible = true) {
|
|
1868
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.getByRole("button", {
|
|
1869
|
+
name: buttonName
|
|
1870
|
+
}).isVisible()).toBe(visible);
|
|
1871
|
+
}
|
|
1872
|
+
async cancelDialogWindow() {
|
|
1873
|
+
await this.page.getByRole("button", {
|
|
1874
|
+
name: "cancel"
|
|
1875
|
+
}).click();
|
|
1876
|
+
}
|
|
1877
|
+
async acceptDialogWindow() {
|
|
1878
|
+
await this.page.getByRole("button", {
|
|
1879
|
+
name: "ok"
|
|
1880
|
+
}).click();
|
|
1881
|
+
}
|
|
1882
|
+
async setRiskProfile(RiskProfile) {
|
|
1883
|
+
await this.page.getByLabel("Risk profile").click();
|
|
1884
|
+
await this.page.getByLabel("Risk profile").fill(RiskProfile);
|
|
1885
|
+
await this.page.getByRole("option", {
|
|
1886
|
+
name: RiskProfile
|
|
1887
|
+
}).click();
|
|
1888
|
+
}
|
|
1889
|
+
async expectTemplate(template) {
|
|
1890
|
+
const templateName = await this.page.locator("#templateId").getAttribute("value");
|
|
1891
|
+
(0, $kKeXs$playwrighttest.expect)(templateName).toEqual(template);
|
|
1892
|
+
}
|
|
1893
|
+
async setAutoCompletePassword(passwordValue) {
|
|
1894
|
+
await this.page.getByTestId("password").getByLabel("Click to switch between").click();
|
|
1895
|
+
await this.page.locator("#password").fill(passwordValue);
|
|
1896
|
+
await this.page.getByRole("option", {
|
|
1897
|
+
name: passwordValue
|
|
1898
|
+
}).click();
|
|
1899
|
+
}
|
|
1900
|
+
async setAutoCompleteField(fieldLabel, value) {
|
|
1901
|
+
await this.page.getByLabel(fieldLabel).click();
|
|
1902
|
+
await this.page.getByLabel(fieldLabel).fill(value);
|
|
1903
|
+
await this.page.getByRole("option", {
|
|
1904
|
+
name: value
|
|
1905
|
+
}).click();
|
|
1906
|
+
}
|
|
1907
|
+
async setNewAutoCompleteField(fieldLabel, value) {
|
|
1908
|
+
await this.page.getByLabel(fieldLabel).click();
|
|
1909
|
+
await this.page.getByLabel(fieldLabel).fill(value);
|
|
1910
|
+
await this.page.getByTestId("dot-action-item-btn").click();
|
|
1911
|
+
}
|
|
1912
|
+
async setTextField(fieldID, value) {
|
|
1913
|
+
await this.page.locator(`[data-test-id="${fieldID}"]`).nth(1).click();
|
|
1914
|
+
await this.page.locator(`input[name='${fieldID}']`).fill(value);
|
|
1915
|
+
}
|
|
1916
|
+
async abortButtonVisibility(visible = true) {
|
|
1917
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.getByRole("button", {
|
|
1918
|
+
name: "Abort"
|
|
1919
|
+
}).isVisible()).toBe(visible);
|
|
1920
|
+
}
|
|
1921
|
+
async setPattern(patternName) {
|
|
1922
|
+
await this.page.locator("#patternId").click();
|
|
1923
|
+
await this.page.locator("#patternId").fill(patternName);
|
|
1924
|
+
await this.page.getByRole("option", {
|
|
1925
|
+
name: patternName
|
|
1780
1926
|
}).click();
|
|
1927
|
+
}
|
|
1928
|
+
async setStartDate(date) {
|
|
1929
|
+
await this.page.locator("#startDate").click();
|
|
1930
|
+
await this.page.locator("#startDate").fill(date);
|
|
1931
|
+
}
|
|
1932
|
+
async setEndDate(date) {
|
|
1933
|
+
await this.page.locator("#endDate").click();
|
|
1934
|
+
await this.page.locator("#endDate").fill(date);
|
|
1935
|
+
}
|
|
1936
|
+
async clickVariableButton(objectID, variableValue) {
|
|
1937
|
+
await this.page.locator(`div[data-testid="${objectID}"] .icon-variable`).click();
|
|
1938
|
+
await this.page.locator(`#${objectID}`).fill(variableValue);
|
|
1939
|
+
await this.page.getByRole("option", {
|
|
1940
|
+
name: variableValue
|
|
1941
|
+
}).click();
|
|
1942
|
+
}
|
|
1943
|
+
async enableFallback() {
|
|
1944
|
+
await this.page.getByLabel("Fallback").check();
|
|
1945
|
+
}
|
|
1946
|
+
async expectDescription(description) {
|
|
1947
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("dot-accordion-details")).toHaveText(description);
|
|
1948
|
+
}
|
|
1949
|
+
async editDescription(description) {
|
|
1950
|
+
await this.page.getByLabel("Double-click to edit").waitFor({
|
|
1951
|
+
timeout: 10000
|
|
1952
|
+
});
|
|
1953
|
+
await this.page.getByLabel("Double-click to edit").hover();
|
|
1954
|
+
await this.page.locator(".markdown-viewer-actions").getByTestId("edit-button").click();
|
|
1955
|
+
await this.page.locator("#task-description-input").clear();
|
|
1956
|
+
await this.page.locator("#task-description-input").fill(description);
|
|
1781
1957
|
await this.page.getByRole("button", {
|
|
1782
1958
|
name: "Save"
|
|
1783
1959
|
}).click();
|
|
1784
|
-
|
|
1960
|
+
}
|
|
1961
|
+
async expectedGateConditionDisplayed(title) {
|
|
1962
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".gate-task-condition-input").filter({
|
|
1963
|
+
hasText: title
|
|
1964
|
+
})).toBeVisible();
|
|
1785
1965
|
}
|
|
1786
1966
|
}
|
|
1787
1967
|
class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
@@ -1794,18 +1974,15 @@ class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$ex
|
|
|
1794
1974
|
}
|
|
1795
1975
|
async getRelease() {
|
|
1796
1976
|
await this.release.isVisible();
|
|
1797
|
-
|
|
1798
|
-
return releaseValue;
|
|
1977
|
+
return await this.release.getAttribute("value");
|
|
1799
1978
|
}
|
|
1800
1979
|
async getPhase() {
|
|
1801
1980
|
await this.phase.isVisible();
|
|
1802
|
-
|
|
1803
|
-
return phaseValue;
|
|
1981
|
+
return await this.phase.getAttribute("value");
|
|
1804
1982
|
}
|
|
1805
1983
|
async getTask() {
|
|
1806
1984
|
await this.task.isVisible();
|
|
1807
|
-
|
|
1808
|
-
return taskValue;
|
|
1985
|
+
return await this.task.getAttribute("value");
|
|
1809
1986
|
}
|
|
1810
1987
|
async setRelease(releaseTitle) {
|
|
1811
1988
|
await this.release.click();
|
|
@@ -1849,8 +2026,8 @@ class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$ex
|
|
|
1849
2026
|
}
|
|
1850
2027
|
async expectVariableModeEnabled(mode) {
|
|
1851
2028
|
await (0, $kKeXs$playwrighttest.expect)(this.dependencyLocator.getByLabel("input-variable")).toBeVisible();
|
|
1852
|
-
const
|
|
1853
|
-
(0, $kKeXs$playwrighttest.expect)(
|
|
2029
|
+
const variableMode = await this.dependencyLocator.getByLabel("input-variable").getAttribute("aria-pressed");
|
|
2030
|
+
(0, $kKeXs$playwrighttest.expect)(variableMode).toBe("" + mode + "");
|
|
1854
2031
|
}
|
|
1855
2032
|
async clickVariable() {
|
|
1856
2033
|
await this.dependencyLocator.getByLabel("input-variable").waitFor();
|
|
@@ -1864,15 +2041,15 @@ class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$ex
|
|
|
1864
2041
|
(0, $kKeXs$playwrighttest.expect)(options[i]).toContain(option);
|
|
1865
2042
|
}
|
|
1866
2043
|
}
|
|
1867
|
-
async enterNewVariable(
|
|
2044
|
+
async enterNewVariable(variableName) {
|
|
1868
2045
|
await this.page.getByLabel("Please select a variable of").click();
|
|
1869
|
-
await this.page.getByLabel("Please select a variable of").fill(
|
|
2046
|
+
await this.page.getByLabel("Please select a variable of").fill(variableName);
|
|
1870
2047
|
await this.page.getByTestId("dot-action-item-btn").click();
|
|
1871
2048
|
}
|
|
1872
|
-
async selectVariable(
|
|
2049
|
+
async selectVariable(variableName) {
|
|
1873
2050
|
await this.page.getByLabel("Please select a variable of").click();
|
|
1874
2051
|
await this.page.getByRole("option", {
|
|
1875
|
-
name:
|
|
2052
|
+
name: variableName
|
|
1876
2053
|
}).click();
|
|
1877
2054
|
}
|
|
1878
2055
|
}
|
|
@@ -1881,11 +2058,11 @@ class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$ex
|
|
|
1881
2058
|
|
|
1882
2059
|
|
|
1883
2060
|
class $6c924a95a765a086$export$15d3f9b095bb5188 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1884
|
-
async expectCommentToContain(
|
|
1885
|
-
|
|
2061
|
+
async expectCommentToContain(comment) {
|
|
2062
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".markdown-wrapper").textContent()).toContain(comment);
|
|
1886
2063
|
}
|
|
1887
2064
|
async expectTaskIsCommentable(isCommentable) {
|
|
1888
|
-
(0, $kKeXs$playwrighttest.expect)(await this.page.locator("#task-comment").count()).toBe(isCommentable ? 1 : 0);
|
|
2065
|
+
return (0, $kKeXs$playwrighttest.expect)(await this.page.locator("#task-comment").count()).toBe(isCommentable ? 1 : 0);
|
|
1889
2066
|
}
|
|
1890
2067
|
}
|
|
1891
2068
|
|
|
@@ -1941,6 +2118,88 @@ class $f9016705c1a1eb20$export$aa59788fdecae2f2 extends (0, $f8721861c660dd88$ex
|
|
|
1941
2118
|
|
|
1942
2119
|
|
|
1943
2120
|
|
|
2121
|
+
|
|
2122
|
+
|
|
2123
|
+
|
|
2124
|
+
|
|
2125
|
+
class $1fbdec5dc9cde599$export$e3515314c13bc477 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2126
|
+
constructor(page){
|
|
2127
|
+
super(page);
|
|
2128
|
+
this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
|
|
2129
|
+
}
|
|
2130
|
+
async expectStartDateToBeDisplayed() {
|
|
2131
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".flex-section.column").filter({
|
|
2132
|
+
hasText: "Start Date"
|
|
2133
|
+
}).locator(".task-date-view-content").isVisible()).toBe(true);
|
|
2134
|
+
}
|
|
2135
|
+
async expectEndDateToBeDisplayed() {
|
|
2136
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".flex-section.column").filter({
|
|
2137
|
+
hasText: "End Date"
|
|
2138
|
+
}).locator(".task-date-view-content").isVisible()).toBe(true);
|
|
2139
|
+
}
|
|
2140
|
+
async switchWaitForScheduledDate() {
|
|
2141
|
+
await this.page.locator(".wait-for-start input").click();
|
|
2142
|
+
}
|
|
2143
|
+
async expectWaitForScheduledDateToBeChecked() {
|
|
2144
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".wait-for-start input")).toBeChecked();
|
|
2145
|
+
}
|
|
2146
|
+
async expectWaitForScheduledDateToBeUnchecked() {
|
|
2147
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".wait-for-start input")).not.toBeChecked();
|
|
2148
|
+
}
|
|
2149
|
+
async setDueTime(day, hour, minute) {
|
|
2150
|
+
await this.page.locator(".duration-view-content").click();
|
|
2151
|
+
if (day) {
|
|
2152
|
+
await this.page.locator("#days").clear();
|
|
2153
|
+
await this.page.locator("#days").fill(day);
|
|
2154
|
+
}
|
|
2155
|
+
if (hour) {
|
|
2156
|
+
await this.page.locator("#hours").clear();
|
|
2157
|
+
await this.page.locator("#hours").fill(hour);
|
|
2158
|
+
}
|
|
2159
|
+
if (minute) {
|
|
2160
|
+
await this.page.locator("#minutes").clear();
|
|
2161
|
+
await this.page.locator("#minutes").fill(minute);
|
|
2162
|
+
}
|
|
2163
|
+
await this.page.getByTestId("save-button").click();
|
|
2164
|
+
}
|
|
2165
|
+
async setStartDate(date, monthYear) {
|
|
2166
|
+
await this.page.locator(".flex-section.column").filter({
|
|
2167
|
+
hasText: "Start date"
|
|
2168
|
+
}).locator(".task-date").waitFor({
|
|
2169
|
+
timeout: 10000
|
|
2170
|
+
});
|
|
2171
|
+
await this.page.locator(".flex-section.column").filter({
|
|
2172
|
+
hasText: "Start date"
|
|
2173
|
+
}).locator(".task-date").click();
|
|
2174
|
+
await this.setDate(date, monthYear);
|
|
2175
|
+
}
|
|
2176
|
+
async setEndDate(date, monthYear) {
|
|
2177
|
+
await this.page.locator(".flex-section.column").filter({
|
|
2178
|
+
hasText: "End date"
|
|
2179
|
+
}).locator(".task-date").waitFor({
|
|
2180
|
+
timeout: 10000
|
|
2181
|
+
});
|
|
2182
|
+
await this.page.locator(".flex-section.column").filter({
|
|
2183
|
+
hasText: "End date"
|
|
2184
|
+
}).locator(".task-date").click();
|
|
2185
|
+
await this.setDate(date, monthYear);
|
|
2186
|
+
}
|
|
2187
|
+
async setDate(date, monthYear) {
|
|
2188
|
+
const prev = this.page.getByTestId("ArrowLeftIcon");
|
|
2189
|
+
const next = this.page.getByTestId("ArrowRightIcon");
|
|
2190
|
+
const monYear = this.page.locator(".MuiPickersCalendarHeader-label");
|
|
2191
|
+
const currentDate = await monYear.textContent();
|
|
2192
|
+
const thisMonth = (0, ($parcel$interopDefault($kKeXs$moment)))(monthYear, "MMMM YYYY").isBefore(currentDate);
|
|
2193
|
+
while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
|
|
2194
|
+
else await next.click();
|
|
2195
|
+
await this.page.getByRole("gridcell", {
|
|
2196
|
+
name: "" + date + "",
|
|
2197
|
+
exact: true
|
|
2198
|
+
}).first().click();
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
|
|
1944
2203
|
class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1945
2204
|
constructor(page){
|
|
1946
2205
|
super(page);
|
|
@@ -1956,6 +2215,8 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
1956
2215
|
this.config = new (0, $8be2ce0eccbe6d27$export$64c93bc7fb9ca44e)(page);
|
|
1957
2216
|
this.condition = new (0, $9c0b0c2caed50730$export$d4865631ba74f3e2)(page);
|
|
1958
2217
|
this.overview = new (0, $eb81c1b930e440ff$export$519356f6c50361f7)(page);
|
|
2218
|
+
this.scheduling = new (0, $1fbdec5dc9cde599$export$e3515314c13bc477)(page);
|
|
2219
|
+
this.startButton = this.page.getByTestId("single-action-button");
|
|
1959
2220
|
this.skipMenu = this.page.getByRole("menuitem", {
|
|
1960
2221
|
name: "Skip"
|
|
1961
2222
|
});
|
|
@@ -1967,7 +2228,8 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
1967
2228
|
exact: true
|
|
1968
2229
|
});
|
|
1969
2230
|
this.completeButton = this.page.getByRole("button", {
|
|
1970
|
-
name: "Complete"
|
|
2231
|
+
name: "Complete",
|
|
2232
|
+
exact: true
|
|
1971
2233
|
});
|
|
1972
2234
|
}
|
|
1973
2235
|
async openOverviewRail() {
|
|
@@ -1978,6 +2240,7 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
1978
2240
|
}
|
|
1979
2241
|
async openSchedulingRail() {
|
|
1980
2242
|
await this.openRail("Scheduling");
|
|
2243
|
+
return new (0, $1fbdec5dc9cde599$export$e3515314c13bc477)(this.page);
|
|
1981
2244
|
}
|
|
1982
2245
|
async openConditionRail() {
|
|
1983
2246
|
await this.openRail("Conditions");
|
|
@@ -2023,6 +2286,12 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
2023
2286
|
async expectTaskTitle(taskTitle) {
|
|
2024
2287
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-drawer .task-title-input .dot-view-mode-typography")).toContainText(taskTitle);
|
|
2025
2288
|
}
|
|
2289
|
+
async setTitle(title) {
|
|
2290
|
+
await this.page.getByTestId("task-title-input-view-mode-typography").click();
|
|
2291
|
+
await this.page.getByTestId("task-title-input-input").clear();
|
|
2292
|
+
await this.page.getByTestId("task-title-input-input").fill(title);
|
|
2293
|
+
await this.page.getByTestId("task-title-input-input").press("Enter");
|
|
2294
|
+
}
|
|
2026
2295
|
async expectTypeToContain(taskType) {
|
|
2027
2296
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-drawer .task-type")).toContainText(taskType);
|
|
2028
2297
|
}
|
|
@@ -2047,26 +2316,16 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
2047
2316
|
name: username
|
|
2048
2317
|
})).toBeVisible();
|
|
2049
2318
|
}
|
|
2050
|
-
async
|
|
2051
|
-
await (0, $kKeXs$playwrighttest.expect)(this.
|
|
2052
|
-
|
|
2053
|
-
async startNow(comment) {
|
|
2054
|
-
await this.page.getByTestId("single-action-button").click();
|
|
2055
|
-
await this.page.getByTestId("task-action-comment").fill(comment);
|
|
2056
|
-
await this.page.getByTestId("dot-button").click();
|
|
2057
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("single-action-button")).not.toBeVisible();
|
|
2058
|
-
}
|
|
2059
|
-
async expectCommentsToContain(text) {
|
|
2060
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-comment-body .markdown-wrapper p")).toContainText(text);
|
|
2061
|
-
}
|
|
2062
|
-
async switchWaitForScheduledDate() {
|
|
2063
|
-
await this.page.locator(".wait-for-start input").click();
|
|
2064
|
-
}
|
|
2065
|
-
async expectWaitForScheduledDateToBeChecked() {
|
|
2066
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".wait-for-start input")).toBeChecked();
|
|
2319
|
+
async expectStartButtonToBeEnabled(isEnabled = true) {
|
|
2320
|
+
if (isEnabled) await (0, $kKeXs$playwrighttest.expect)(this.startButton).toBeEnabled();
|
|
2321
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.startButton).not.toBeEnabled();
|
|
2067
2322
|
}
|
|
2068
|
-
async
|
|
2069
|
-
await
|
|
2323
|
+
async startTask(comment) {
|
|
2324
|
+
await this.startButton.click();
|
|
2325
|
+
await this.completeButton.click();
|
|
2326
|
+
await this.commentBox.fill(comment);
|
|
2327
|
+
await this.completeButton.click();
|
|
2328
|
+
await (0, $kKeXs$playwrighttest.expect)(this.startButton).not.toBeVisible();
|
|
2070
2329
|
}
|
|
2071
2330
|
// Other locators are flaky and it can be replaced if we get locator change in the frontend
|
|
2072
2331
|
async clickOnStartDate() {
|
|
@@ -2126,10 +2385,12 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
2126
2385
|
|
|
2127
2386
|
|
|
2128
2387
|
|
|
2388
|
+
|
|
2129
2389
|
class $e8395395d01b66bb$export$5a82be0a2a261cc6 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2130
2390
|
constructor(page){
|
|
2131
2391
|
super(page);
|
|
2132
2392
|
this.releaseHeader = this.page.locator(".release-header");
|
|
2393
|
+
this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
|
|
2133
2394
|
}
|
|
2134
2395
|
async enableShowDates() {
|
|
2135
2396
|
await this.page.locator("#toggleIsDatesColumnsShown").check();
|
|
@@ -2143,6 +2404,105 @@ class $e8395395d01b66bb$export$5a82be0a2a261cc6 extends (0, $f8721861c660dd88$ex
|
|
|
2143
2404
|
async expectPlanningDateColumnsShown() {
|
|
2144
2405
|
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`#gantt .gantt_grid_data .gantt_row`).first().locator(`.gantt_cell`).count()).toEqual(4);
|
|
2145
2406
|
}
|
|
2407
|
+
async expectReleaseOnBreadcrumb(title) {
|
|
2408
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
|
|
2409
|
+
name: title
|
|
2410
|
+
})).toBeVisible();
|
|
2411
|
+
}
|
|
2412
|
+
async expectPhaseDisplayed(phaseName) {
|
|
2413
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTitle(phaseName, {
|
|
2414
|
+
exact: true
|
|
2415
|
+
})).toBeVisible();
|
|
2416
|
+
}
|
|
2417
|
+
async expectTaskDisplayed(taskName, isDisplayed = true) {
|
|
2418
|
+
if (isDisplayed) await (0, $kKeXs$playwrighttest.expect)(this.page.getByTitle(taskName)).toBeVisible();
|
|
2419
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.page.getByTitle(taskName)).not.toBeVisible();
|
|
2420
|
+
}
|
|
2421
|
+
async expandGanttTree(title) {
|
|
2422
|
+
return await this.page.locator(".gantt_cell").filter({
|
|
2423
|
+
hasText: title
|
|
2424
|
+
}).locator(".gantt_open").click();
|
|
2425
|
+
}
|
|
2426
|
+
async expectDifferentWidth(title1, title2) {
|
|
2427
|
+
const releaseWidth = await this.page.locator(`.gantt_task_content`).getByText(title1, {
|
|
2428
|
+
exact: true
|
|
2429
|
+
}).getAttribute("style");
|
|
2430
|
+
const PhaseWidth = await this.page.locator(`.gantt_task_content`).getByText(title2, {
|
|
2431
|
+
exact: true
|
|
2432
|
+
}).getAttribute("style");
|
|
2433
|
+
return (0, $kKeXs$playwrighttest.expect)(releaseWidth).not.toEqual(PhaseWidth);
|
|
2434
|
+
}
|
|
2435
|
+
async expectSameWidth(title1, title2) {
|
|
2436
|
+
const releaseWidth = await this.page.locator(`.gantt_task_content`).getByText(title1, {
|
|
2437
|
+
exact: true
|
|
2438
|
+
}).getAttribute("style");
|
|
2439
|
+
const PhaseWidth = await this.page.locator(`.gantt_task_content`).getByText(title2, {
|
|
2440
|
+
exact: true
|
|
2441
|
+
}).getAttribute("style");
|
|
2442
|
+
return (0, $kKeXs$playwrighttest.expect)(releaseWidth).toEqual(PhaseWidth);
|
|
2443
|
+
}
|
|
2444
|
+
async expectElementWithClasses(title, classes) {
|
|
2445
|
+
const eleNumber = await this.page.locator(`.${classes.join(".")}`).locator(`.gantt_task_content`).getByText(title, {
|
|
2446
|
+
exact: true
|
|
2447
|
+
}).count();
|
|
2448
|
+
return (0, $kKeXs$playwrighttest.expect)(eleNumber).toBe(1);
|
|
2449
|
+
}
|
|
2450
|
+
async resizeToDayIndex(title, index) {
|
|
2451
|
+
await this.page.locator(`#gantt .gantt_container .gantt_task_line`).filter({
|
|
2452
|
+
hasText: title
|
|
2453
|
+
}).click();
|
|
2454
|
+
await this.page.locator(`.gantt_task_line`).filter({
|
|
2455
|
+
hasText: title
|
|
2456
|
+
}).locator(`.gantt_task_drag.task_right`).hover();
|
|
2457
|
+
const objId = await this.page.locator(`.gantt_task_line`).filter({
|
|
2458
|
+
hasText: title
|
|
2459
|
+
}).getAttribute("task_id");
|
|
2460
|
+
await this.page.mouse.down();
|
|
2461
|
+
await this.page.locator(`div[task_id='${objId}']`).locator(".gantt_task_cell").nth(index).hover();
|
|
2462
|
+
await this.page.mouse.up();
|
|
2463
|
+
}
|
|
2464
|
+
async expectLinksToBeDisplayed(countOfLinks) {
|
|
2465
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".gantt_task_link").count()).toEqual(countOfLinks);
|
|
2466
|
+
}
|
|
2467
|
+
async expectLeftHandleVisibility(title, visible) {
|
|
2468
|
+
const objId = await this.page.locator(`.gantt_task_line`).filter({
|
|
2469
|
+
hasText: title
|
|
2470
|
+
}).getAttribute("task_id");
|
|
2471
|
+
if (visible) {
|
|
2472
|
+
await this.page.locator("#gantt .gantt_container .gantt_task_line").filter({
|
|
2473
|
+
hasText: title
|
|
2474
|
+
}).hover();
|
|
2475
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#gantt .gantt_container ").locator(`div[task_id="${objId}"].gantt-no-left-handle`)).not.toBeVisible();
|
|
2476
|
+
} else {
|
|
2477
|
+
await this.page.locator("#gantt .gantt_container .gantt_task_line").filter({
|
|
2478
|
+
hasText: title
|
|
2479
|
+
}).hover();
|
|
2480
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#gantt .gantt_container ").locator(`div[task_id="${objId}"].gantt-no-left-handle`)).toBeVisible();
|
|
2481
|
+
}
|
|
2482
|
+
}
|
|
2483
|
+
async expectRightHandleVisibility(title, visible) {
|
|
2484
|
+
const objId = await this.page.locator(`.gantt_task_line`).filter({
|
|
2485
|
+
hasText: title
|
|
2486
|
+
}).getAttribute("task_id");
|
|
2487
|
+
if (visible) {
|
|
2488
|
+
await this.page.locator("#gantt .gantt_container .gantt_task_line").filter({
|
|
2489
|
+
hasText: title
|
|
2490
|
+
}).hover();
|
|
2491
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#gantt .gantt_container").locator(`div[task_id='${objId}'].gantt-no-right-handle`)).not.toBeVisible();
|
|
2492
|
+
} else {
|
|
2493
|
+
await this.page.locator("#gantt .gantt_container .gantt_task_line").filter({
|
|
2494
|
+
hasText: title
|
|
2495
|
+
}).hover();
|
|
2496
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#gantt .gantt_container").locator(`div[task_id='${objId}'].gantt-no-right-handle`)).toBeVisible();
|
|
2497
|
+
}
|
|
2498
|
+
}
|
|
2499
|
+
async openTaskDrawer(title) {
|
|
2500
|
+
await this.page.getByTitle(title).dblclick();
|
|
2501
|
+
return this.taskDrawer;
|
|
2502
|
+
}
|
|
2503
|
+
async openPhaseDetails(phaseName) {
|
|
2504
|
+
await this.page.getByTitle(phaseName).dblclick();
|
|
2505
|
+
}
|
|
2146
2506
|
getRow(phaseName) {
|
|
2147
2507
|
return new $e8395395d01b66bb$var$GanttRow(this.page, phaseName);
|
|
2148
2508
|
}
|
|
@@ -2176,20 +2536,20 @@ class $e8395395d01b66bb$var$GanttRow extends (0, $f8721861c660dd88$export$2b65d1
|
|
|
2176
2536
|
await this.dateUtil.setDate(date, monthYear);
|
|
2177
2537
|
}
|
|
2178
2538
|
async expectStartDateToBe(date) {
|
|
2179
|
-
const dateTimePicker =
|
|
2180
|
-
this.dateUtil.expectDateToBe(dateTimePicker, date);
|
|
2539
|
+
const dateTimePicker = this.getFirstDate();
|
|
2540
|
+
await this.dateUtil.expectDateToBe(await dateTimePicker, date);
|
|
2181
2541
|
}
|
|
2182
2542
|
async expectEndDateToBe(date) {
|
|
2183
|
-
const dateTimePicker =
|
|
2184
|
-
this.dateUtil.expectDateToBe(dateTimePicker, date);
|
|
2543
|
+
const dateTimePicker = this.getLastDate();
|
|
2544
|
+
await this.dateUtil.expectDateToBe(await dateTimePicker, date);
|
|
2185
2545
|
}
|
|
2186
2546
|
async removeStartDate() {
|
|
2187
2547
|
const dateTimePicker = await this.getFirstDateEditor();
|
|
2188
2548
|
await this.dateUtil.removeDate(dateTimePicker);
|
|
2189
2549
|
}
|
|
2190
2550
|
async removeEndDate() {
|
|
2191
|
-
const dateTimePicker =
|
|
2192
|
-
await this.dateUtil.removeDate(dateTimePicker);
|
|
2551
|
+
const dateTimePicker = this.getLastDateEditor();
|
|
2552
|
+
await this.dateUtil.removeDate(await dateTimePicker);
|
|
2193
2553
|
}
|
|
2194
2554
|
async expectStartDateToBeInferred() {
|
|
2195
2555
|
const dateTimePicker = await this.getFirstDateEditor();
|
|
@@ -2235,6 +2595,7 @@ class $8681d8a3f46f87b7$export$d1077068a9cc9f17 extends (0, $f8721861c660dd88$ex
|
|
|
2235
2595
|
await this.page.locator("#release-form-title").fill(name);
|
|
2236
2596
|
}
|
|
2237
2597
|
async setDescription(description) {
|
|
2598
|
+
await this.page.locator(".task-description").hover();
|
|
2238
2599
|
await this.page.locator(".display > .xl-icon").first().click();
|
|
2239
2600
|
await this.page.locator("textarea").click();
|
|
2240
2601
|
await this.page.locator("textarea").clear();
|
|
@@ -2407,6 +2768,35 @@ class $8681d8a3f46f87b7$export$d1077068a9cc9f17 extends (0, $f8721861c660dd88$ex
|
|
|
2407
2768
|
async expectDescriptionToBe(description) {
|
|
2408
2769
|
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".release-description p").textContent()).toContain(description);
|
|
2409
2770
|
}
|
|
2771
|
+
async expectReleaseNameToBe(name) {
|
|
2772
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('form[name="releasePropertiesForm"]')).toContainText("Properties for " + name);
|
|
2773
|
+
}
|
|
2774
|
+
async expectStartDateReadonly() {
|
|
2775
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#release-properties .form-group").filter({
|
|
2776
|
+
hasText: "Start date"
|
|
2777
|
+
}).locator(".date-editor.readonly")).toBeVisible();
|
|
2778
|
+
}
|
|
2779
|
+
async expectEndDateReadonly() {
|
|
2780
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#release-properties .form-group").filter({
|
|
2781
|
+
hasText: "End date"
|
|
2782
|
+
}).locator(".date-editor.readonly")).toBeVisible();
|
|
2783
|
+
}
|
|
2784
|
+
async setOwner(user) {
|
|
2785
|
+
await this.page.locator(".release-owner").click();
|
|
2786
|
+
await this.page.locator(".release-owner input").clear();
|
|
2787
|
+
await this.page.locator(".release-owner input").fill(user);
|
|
2788
|
+
}
|
|
2789
|
+
async expectPageTitleToBeInBreadcrumbLink(releaseName) {
|
|
2790
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".dot-breadcrumbs a").allTextContents()).toContain(releaseName);
|
|
2791
|
+
}
|
|
2792
|
+
async reloadPage() {
|
|
2793
|
+
await this.page.reload({
|
|
2794
|
+
timeout: 3000
|
|
2795
|
+
});
|
|
2796
|
+
}
|
|
2797
|
+
async expectOwnerToBe(user) {
|
|
2798
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-owner")).toContainText(user);
|
|
2799
|
+
}
|
|
2410
2800
|
}
|
|
2411
2801
|
|
|
2412
2802
|
|
|
@@ -2432,47 +2822,253 @@ class $d330a7d6f7926d53$export$3bc3e140e0dcb075 extends (0, $f8721861c660dd88$ex
|
|
|
2432
2822
|
|
|
2433
2823
|
|
|
2434
2824
|
|
|
2435
|
-
class $
|
|
2825
|
+
class $c5c393ea4aecca6c$export$649fde34d823ece7 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2436
2826
|
constructor(page){
|
|
2437
2827
|
super(page);
|
|
2438
|
-
this.
|
|
2439
|
-
this.
|
|
2440
|
-
this.
|
|
2828
|
+
this.commentBox = this.page.locator(`.input-block-level`);
|
|
2829
|
+
this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
|
|
2830
|
+
this.refreshButton = this.page.getByTestId("refresh-btn");
|
|
2831
|
+
this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
|
|
2441
2832
|
}
|
|
2442
|
-
async
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2833
|
+
async openContextMenuForTask(taskTitle) {
|
|
2834
|
+
await this.page.locator(".name-cell-wrapper").filter({
|
|
2835
|
+
hasText: taskTitle
|
|
2836
|
+
}).locator(".context-menu-button").click();
|
|
2446
2837
|
}
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2838
|
+
// eslint-disable-next-line max-params
|
|
2839
|
+
async callMenuOptionsForTask(taskTitle, option, taskGroup, taskType) {
|
|
2840
|
+
await this.openContextMenuForTask(taskTitle);
|
|
2841
|
+
await this.page.locator(".dropdown-menu li").getByText(option).click();
|
|
2842
|
+
if (await this.commentBox.isVisible()) await this.commentBox.fill(" Automation Test Comment");
|
|
2843
|
+
else if (await this.page.getByRole("heading", {
|
|
2844
|
+
name: "Change task type"
|
|
2845
|
+
}).isVisible()) {
|
|
2846
|
+
await this.page.getByPlaceholder("Start typing to filter task").click();
|
|
2847
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2848
|
+
// @ts-ignore
|
|
2849
|
+
await this.page.locator("#task-selector").fill(taskGroup);
|
|
2850
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2851
|
+
// @ts-ignore
|
|
2852
|
+
await this.page.getByTestId(taskType).click();
|
|
2455
2853
|
}
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
async openSideNavMenu(menuItem) {
|
|
2459
|
-
await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
|
|
2854
|
+
if (await this.page.getByRole("button", {
|
|
2855
|
+
name: option,
|
|
2460
2856
|
exact: true
|
|
2461
|
-
}).
|
|
2462
|
-
|
|
2857
|
+
}).isVisible()) await this.page.getByRole("button", {
|
|
2858
|
+
name: option,
|
|
2463
2859
|
exact: true
|
|
2464
2860
|
}).click();
|
|
2465
2861
|
}
|
|
2466
|
-
async
|
|
2467
|
-
await this.
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
exact: true
|
|
2472
|
-
}).click();
|
|
2862
|
+
async expectAssignToUser(taskTitle, username) {
|
|
2863
|
+
await this.refreshButton.click();
|
|
2864
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".ui-grid-row").filter({
|
|
2865
|
+
hasText: taskTitle
|
|
2866
|
+
}).locator(`span[display-user="row.entity.planItem.owner"] span`).textContent()).toContain(username);
|
|
2473
2867
|
}
|
|
2474
|
-
async
|
|
2475
|
-
await this.
|
|
2868
|
+
async expectToHasGateIcon(taskTitle) {
|
|
2869
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".ui-grid-row").filter({
|
|
2870
|
+
hasText: taskTitle
|
|
2871
|
+
}).locator(".marker-check-icon")).toBeVisible();
|
|
2872
|
+
}
|
|
2873
|
+
async expectTaskRowCountToBe(title, expectedCount) {
|
|
2874
|
+
await this.refreshButton.click();
|
|
2875
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".name-cell-title").filter({
|
|
2876
|
+
hasText: title
|
|
2877
|
+
}).count()).toBe(expectedCount);
|
|
2878
|
+
}
|
|
2879
|
+
async setHeaderFilter(columnTitle, valueToFilter) {
|
|
2880
|
+
const filter = this.page.locator(`.ui-grid-header-cell`).filter({
|
|
2881
|
+
hasText: columnTitle
|
|
2882
|
+
}).locator(`input`);
|
|
2883
|
+
await filter.clear();
|
|
2884
|
+
await filter.fill(valueToFilter);
|
|
2885
|
+
}
|
|
2886
|
+
async expectRowCountToBe(cellCount) {
|
|
2887
|
+
const cont = await this.page.locator(".ui-grid-canvas .name-cell").count();
|
|
2888
|
+
(0, $kKeXs$playwrighttest.expect)(cont).toBe(cellCount);
|
|
2889
|
+
}
|
|
2890
|
+
async filterStartDate(date, monthYear) {
|
|
2891
|
+
await this.page.locator(`.ui-grid-header-cell`).filter({
|
|
2892
|
+
hasText: "Start Date"
|
|
2893
|
+
}).locator(`input`).click();
|
|
2894
|
+
await this.dateUtil.setDate(date, monthYear);
|
|
2895
|
+
}
|
|
2896
|
+
async filterEndDate(date, monthYear) {
|
|
2897
|
+
await this.page.locator(`.ui-grid-header-cell`).filter({
|
|
2898
|
+
hasText: "End Date"
|
|
2899
|
+
}).locator(`input`).click();
|
|
2900
|
+
await this.dateUtil.setDate(date, monthYear);
|
|
2901
|
+
}
|
|
2902
|
+
async openTaskDrawer(taskTitle) {
|
|
2903
|
+
await this.page.locator(".name-cell-title").filter({
|
|
2904
|
+
hasText: taskTitle
|
|
2905
|
+
}).click();
|
|
2906
|
+
return this.taskDrawer;
|
|
2907
|
+
}
|
|
2908
|
+
async collapseNthRowByIndex(Indexnumber) {
|
|
2909
|
+
await this.page.locator(".task-group-toggle .xl-icon.arrow-down-icon").nth(Indexnumber).click();
|
|
2910
|
+
}
|
|
2911
|
+
async closePhaseModal() {
|
|
2912
|
+
await this.page.locator("button[type='button'] i[class='xl-icon close-icon']").click();
|
|
2913
|
+
}
|
|
2914
|
+
async expectTaskToHaveStatus(taskTitle, status) {
|
|
2915
|
+
await this.refreshButton.click();
|
|
2916
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".ui-grid-row").filter({
|
|
2917
|
+
hasText: taskTitle
|
|
2918
|
+
}).locator(".label ").textContent()).toContain(status);
|
|
2919
|
+
}
|
|
2920
|
+
async expectOverdueOnEndDate(taskTitle) {
|
|
2921
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`.ui-grid-row`).filter({
|
|
2922
|
+
hasText: taskTitle
|
|
2923
|
+
}).locator(`i.xl-icon.delay-icon.overdue-icon`).isVisible()).toBe(true);
|
|
2924
|
+
}
|
|
2925
|
+
async selectTask(taskTitle) {
|
|
2926
|
+
await this.page.locator(`.ui-grid-cell-contents`).filter({
|
|
2927
|
+
hasText: taskTitle
|
|
2928
|
+
}).locator(`.item-selector`).click({
|
|
2929
|
+
force: true
|
|
2930
|
+
});
|
|
2931
|
+
}
|
|
2932
|
+
async expectSelectedTasksCounter(text) {
|
|
2933
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("release-grid-selected-tasks")).toBeVisible();
|
|
2934
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.getByTestId("release-grid-selected-tasks").textContent()).toContain(text);
|
|
2935
|
+
}
|
|
2936
|
+
async clearSelection() {
|
|
2937
|
+
await this.page.getByTestId("release-grid-unselect-btn").click();
|
|
2938
|
+
return this;
|
|
2939
|
+
}
|
|
2940
|
+
async assignSelectedTasks(owner, team) {
|
|
2941
|
+
await this.page.getByText("Assign to").click();
|
|
2942
|
+
if (owner) {
|
|
2943
|
+
const ownerSelector = this.page.locator(".task-owner");
|
|
2944
|
+
await ownerSelector.focus();
|
|
2945
|
+
await ownerSelector.click();
|
|
2946
|
+
await this.page.getByLabel("*").fill(owner);
|
|
2947
|
+
await this.page.locator("a").filter({
|
|
2948
|
+
hasText: owner
|
|
2949
|
+
}).click();
|
|
2950
|
+
}
|
|
2951
|
+
if (team) {
|
|
2952
|
+
const teamSelector = this.page.locator(".task-team > .display");
|
|
2953
|
+
await teamSelector.focus();
|
|
2954
|
+
await teamSelector.click();
|
|
2955
|
+
await this.page.getByLabel(team, {
|
|
2956
|
+
exact: true
|
|
2957
|
+
}).selectOption(team);
|
|
2958
|
+
}
|
|
2959
|
+
await this.page.getByRole("button", {
|
|
2960
|
+
name: "Assign"
|
|
2961
|
+
}).click();
|
|
2962
|
+
return this;
|
|
2963
|
+
}
|
|
2964
|
+
async expectSuccessMessage(successMessage) {
|
|
2965
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("success")).toContainText(successMessage);
|
|
2966
|
+
return this;
|
|
2967
|
+
}
|
|
2968
|
+
async completeSelectedTasks(comment) {
|
|
2969
|
+
await this.page.getByTestId("release-grid-complete-btn").click();
|
|
2970
|
+
await this.page.getByPlaceholder("Give feedback or place a").fill(comment);
|
|
2971
|
+
await this.page.getByRole("button", {
|
|
2972
|
+
name: "Complete"
|
|
2973
|
+
}).click();
|
|
2974
|
+
return this;
|
|
2975
|
+
}
|
|
2976
|
+
async selectFromMoreActions(menuItem) {
|
|
2977
|
+
await this.page.getByTestId("release-grid-dropdown-btn").click();
|
|
2978
|
+
await this.page.getByRole("menuitem", {
|
|
2979
|
+
name: menuItem
|
|
2980
|
+
}).click();
|
|
2981
|
+
if (await this.commentBox.isVisible() == true) await this.commentBox.fill(" Automation Test Comment");
|
|
2982
|
+
if (await this.page.getByRole("button", {
|
|
2983
|
+
name: menuItem,
|
|
2984
|
+
exact: true
|
|
2985
|
+
}).isVisible() == true) await this.page.getByRole("button", {
|
|
2986
|
+
name: menuItem,
|
|
2987
|
+
exact: true
|
|
2988
|
+
}).click();
|
|
2989
|
+
return this;
|
|
2990
|
+
}
|
|
2991
|
+
async addCommentToSelectedTask(comment) {
|
|
2992
|
+
await this.page.getByTestId("release-grid-comment-btn").click();
|
|
2993
|
+
await this.page.getByPlaceholder("Give feedback or place a").click();
|
|
2994
|
+
await this.page.getByPlaceholder("Give feedback or place a").fill(comment);
|
|
2995
|
+
await this.page.getByRole("button", {
|
|
2996
|
+
name: "Comment"
|
|
2997
|
+
}).click();
|
|
2998
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("success")).toBeVisible();
|
|
2999
|
+
return this;
|
|
3000
|
+
}
|
|
3001
|
+
async selectSubtasks(item) {
|
|
3002
|
+
await this.page.locator(`.ui-grid-cell-contents`).filter({
|
|
3003
|
+
hasText: item
|
|
3004
|
+
}).locator(`.tasks-group-select`).click({
|
|
3005
|
+
force: true
|
|
3006
|
+
});
|
|
3007
|
+
return this;
|
|
3008
|
+
}
|
|
3009
|
+
async shiftSelectFromTo(taskFrom, taskTo) {
|
|
3010
|
+
await this.page.locator(`.ui-grid-cell-contents`).filter({
|
|
3011
|
+
hasText: taskFrom
|
|
3012
|
+
}).locator(`.item-selector`).click({
|
|
3013
|
+
force: true
|
|
3014
|
+
});
|
|
3015
|
+
await this.page.keyboard.down("Shift");
|
|
3016
|
+
await this.page.locator(`.ui-grid-cell-contents`).filter({
|
|
3017
|
+
hasText: taskTo
|
|
3018
|
+
}).locator(`.item-selector`).click({
|
|
3019
|
+
force: true
|
|
3020
|
+
});
|
|
3021
|
+
await this.page.keyboard.up("Shift");
|
|
3022
|
+
return this;
|
|
3023
|
+
}
|
|
3024
|
+
}
|
|
3025
|
+
|
|
3026
|
+
|
|
3027
|
+
|
|
3028
|
+
|
|
3029
|
+
|
|
3030
|
+
|
|
3031
|
+
class $2c89ba54932fbba8$export$f8f26dd395d7e1bd extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
3032
|
+
constructor(page){
|
|
3033
|
+
super(page);
|
|
3034
|
+
this.tempDir = "";
|
|
3035
|
+
this.content = "";
|
|
3036
|
+
this.closeIcon = this.page.locator(".xl-icon.close-icon");
|
|
3037
|
+
}
|
|
3038
|
+
async createTempFile(fileName, testInfo) {
|
|
3039
|
+
const content = fileName.toString();
|
|
3040
|
+
const tempDir = testInfo.outputPath(fileName.toString());
|
|
3041
|
+
$kKeXs$fs.promises.writeFile(tempDir, content, "utf8");
|
|
3042
|
+
}
|
|
3043
|
+
async expandAllFolders() {
|
|
3044
|
+
const icExpandTreeview1 = this.page.locator(".rstm-toggle-icon.xl-icon.arrow-right-icon");
|
|
3045
|
+
for (const element of (await icExpandTreeview1.all())){
|
|
3046
|
+
const blnVal = await element.isVisible();
|
|
3047
|
+
if (blnVal) {
|
|
3048
|
+
await element.click();
|
|
3049
|
+
await this.expandAllFolders();
|
|
3050
|
+
}
|
|
3051
|
+
}
|
|
3052
|
+
await (0, $kKeXs$playwrighttest.expect)(icExpandTreeview1).not.toBeVisible();
|
|
3053
|
+
}
|
|
3054
|
+
async openSideNavMenu(menuItem) {
|
|
3055
|
+
await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
|
|
3056
|
+
exact: true
|
|
3057
|
+
}).scrollIntoViewIfNeeded();
|
|
3058
|
+
await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
|
|
3059
|
+
exact: true
|
|
3060
|
+
}).click();
|
|
3061
|
+
}
|
|
3062
|
+
async openNestedMenuItem(nestedMenuItem) {
|
|
3063
|
+
await this.page.locator(".MuiList-root li").getByText(nestedMenuItem, {
|
|
3064
|
+
exact: true
|
|
3065
|
+
}).scrollIntoViewIfNeeded();
|
|
3066
|
+
await this.page.locator(".MuiList-root li").getByText(nestedMenuItem, {
|
|
3067
|
+
exact: true
|
|
3068
|
+
}).click();
|
|
3069
|
+
}
|
|
3070
|
+
async clickCloseIcon() {
|
|
3071
|
+
await this.closeIcon.click();
|
|
2476
3072
|
}
|
|
2477
3073
|
async clickOnStatusField() {
|
|
2478
3074
|
await this.page.locator(".ci-filter-status.ng-isolate-scope").click();
|
|
@@ -2512,15 +3108,18 @@ class $2c89ba54932fbba8$export$f8f26dd395d7e1bd extends (0, $f8721861c660dd88$ex
|
|
|
2512
3108
|
|
|
2513
3109
|
|
|
2514
3110
|
class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
3111
|
+
defaultTimeout = 10000;
|
|
2515
3112
|
constructor(page){
|
|
2516
3113
|
super(page);
|
|
3114
|
+
this.addPhaseBtn = this.page.getByTestId("add-phase-btn");
|
|
2517
3115
|
this.createPage = new (0, $3d3f3946c54f5897$export$34addcca3f0ae43f)(page);
|
|
2518
3116
|
this.ganttPage = new (0, $e8395395d01b66bb$export$5a82be0a2a261cc6)(page);
|
|
3117
|
+
this.tableView = new (0, $c5c393ea4aecca6c$export$649fde34d823ece7)(page);
|
|
2519
3118
|
this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
|
|
2520
3119
|
this.teamsPermissions = new (0, $d330a7d6f7926d53$export$3bc3e140e0dcb075)(page);
|
|
2521
3120
|
this.phaseTitle = this.page.locator(".phase .phase-title");
|
|
2522
3121
|
this.properties = new (0, $8681d8a3f46f87b7$export$d1077068a9cc9f17)(page);
|
|
2523
|
-
this.variables = new (0, $
|
|
3122
|
+
this.variables = new (0, $59543fc69900e8db$export$f8e64fcf447db2bf)(page);
|
|
2524
3123
|
this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
|
|
2525
3124
|
}
|
|
2526
3125
|
async openTriggers() {
|
|
@@ -2535,6 +3134,7 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
2535
3134
|
await this.page.getByRole("button", {
|
|
2536
3135
|
name: "Abort"
|
|
2537
3136
|
}).click();
|
|
3137
|
+
await this.page.locator(".progress-status-and-percentage").waitFor();
|
|
2538
3138
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".progress-status-and-percentage")).toContainText("Aborted");
|
|
2539
3139
|
}
|
|
2540
3140
|
getPhase(phaseName) {
|
|
@@ -2558,75 +3158,87 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
2558
3158
|
await this.page.getByRole("button", {
|
|
2559
3159
|
name: "Start"
|
|
2560
3160
|
}).click();
|
|
3161
|
+
await this.page.waitForSelector("#release");
|
|
2561
3162
|
}
|
|
2562
|
-
async waitForCompletion(timeout) {
|
|
3163
|
+
async waitForCompletion(timeout = this.defaultTimeout) {
|
|
2563
3164
|
await this.page.locator("#release.completed").waitFor({
|
|
2564
3165
|
timeout: timeout
|
|
2565
3166
|
});
|
|
2566
3167
|
}
|
|
2567
|
-
async waitForTaskCompleted(taskTitle) {
|
|
3168
|
+
async waitForTaskCompleted(taskTitle, timeout = this.defaultTimeout) {
|
|
2568
3169
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.completed").getByText(taskTitle, {
|
|
2569
3170
|
exact: true
|
|
3171
|
+
})).toBeVisible({
|
|
3172
|
+
timeout: timeout
|
|
3173
|
+
});
|
|
3174
|
+
}
|
|
3175
|
+
async waitForTaskNeedsInput(taskTitle) {
|
|
3176
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.waiting_for_input").getByText(taskTitle, {
|
|
3177
|
+
exact: true
|
|
2570
3178
|
})).toBeVisible({
|
|
2571
3179
|
timeout: 10000
|
|
2572
3180
|
});
|
|
2573
3181
|
}
|
|
2574
|
-
async waitForTaskCompletedInAdvance(taskTitle) {
|
|
3182
|
+
async waitForTaskCompletedInAdvance(taskTitle, timeout = this.defaultTimeout) {
|
|
2575
3183
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.completed_in_advance").getByText(taskTitle, {
|
|
2576
3184
|
exact: true
|
|
2577
3185
|
})).toBeVisible({
|
|
2578
|
-
timeout:
|
|
3186
|
+
timeout: timeout
|
|
2579
3187
|
});
|
|
2580
3188
|
}
|
|
2581
|
-
async waitForTaskInProgress(taskTitle) {
|
|
3189
|
+
async waitForTaskInProgress(taskTitle, timeout = this.defaultTimeout) {
|
|
2582
3190
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.in_progress").getByText(taskTitle, {
|
|
2583
3191
|
exact: true
|
|
2584
|
-
})).toBeVisible(
|
|
3192
|
+
})).toBeVisible({
|
|
3193
|
+
timeout: timeout
|
|
3194
|
+
});
|
|
2585
3195
|
}
|
|
2586
|
-
async waitForTaskFailed(taskTitle) {
|
|
3196
|
+
async waitForTaskFailed(taskTitle, timeout = this.defaultTimeout) {
|
|
2587
3197
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.failed").getByText(taskTitle, {
|
|
2588
3198
|
exact: true
|
|
2589
3199
|
})).toBeVisible({
|
|
2590
|
-
timeout:
|
|
3200
|
+
timeout: timeout
|
|
2591
3201
|
});
|
|
2592
3202
|
}
|
|
2593
|
-
async waitForTaskSkipped(taskTitle) {
|
|
3203
|
+
async waitForTaskSkipped(taskTitle, timeout = this.defaultTimeout) {
|
|
2594
3204
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.skipped").getByText(taskTitle, {
|
|
2595
3205
|
exact: true
|
|
2596
3206
|
})).toBeVisible({
|
|
2597
|
-
timeout:
|
|
3207
|
+
timeout: timeout
|
|
2598
3208
|
});
|
|
2599
3209
|
}
|
|
2600
|
-
async waitForTaskSkippedInAdvance(taskTitle) {
|
|
3210
|
+
async waitForTaskSkippedInAdvance(taskTitle, timeout = this.defaultTimeout) {
|
|
2601
3211
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.skipped_in_advance").getByText(taskTitle, {
|
|
2602
3212
|
exact: true
|
|
2603
3213
|
})).toBeVisible({
|
|
2604
|
-
timeout:
|
|
3214
|
+
timeout: timeout
|
|
2605
3215
|
});
|
|
2606
3216
|
}
|
|
2607
|
-
async waitForTaskAborted(taskTitle) {
|
|
3217
|
+
async waitForTaskAborted(taskTitle, timeout = this.defaultTimeout) {
|
|
2608
3218
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.aborted").getByText(taskTitle, {
|
|
2609
3219
|
exact: true
|
|
2610
3220
|
})).toBeVisible({
|
|
2611
|
-
timeout:
|
|
3221
|
+
timeout: timeout
|
|
2612
3222
|
});
|
|
2613
3223
|
}
|
|
2614
|
-
async waitForStatusLine(statusLine) {
|
|
3224
|
+
async waitForStatusLine(statusLine, timeout = this.defaultTimeout) {
|
|
2615
3225
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task .status-line").getByText(statusLine, {
|
|
2616
3226
|
exact: true
|
|
2617
3227
|
})).toBeVisible({
|
|
2618
|
-
timeout:
|
|
3228
|
+
timeout: timeout
|
|
2619
3229
|
});
|
|
2620
3230
|
}
|
|
2621
|
-
async waitForTaskStarted(taskTitle) {
|
|
3231
|
+
async waitForTaskStarted(taskTitle, timeout = this.defaultTimeout) {
|
|
2622
3232
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.in_progress").getByTitle(taskTitle, {
|
|
2623
3233
|
exact: true
|
|
2624
3234
|
})).toBeVisible({
|
|
2625
|
-
timeout:
|
|
3235
|
+
timeout: timeout
|
|
2626
3236
|
});
|
|
2627
3237
|
}
|
|
2628
|
-
async waitForTaskPlanned(title) {
|
|
2629
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.task:has-text('${title}').planned`)).toBeVisible(
|
|
3238
|
+
async waitForTaskPlanned(title, timeout = this.defaultTimeout) {
|
|
3239
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.task:has-text('${title}').planned`)).toBeVisible({
|
|
3240
|
+
timeout: timeout
|
|
3241
|
+
});
|
|
2630
3242
|
}
|
|
2631
3243
|
async expectTaskCompletedInAdvance(taskTitle) {
|
|
2632
3244
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#release-content .completed_in_advance .task-title").filter({
|
|
@@ -2751,6 +3363,10 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
2751
3363
|
});
|
|
2752
3364
|
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".progress-status-and-percentage").textContent()).toContain("Aborted");
|
|
2753
3365
|
}
|
|
3366
|
+
async expectInProgressStatusToBePresent() {
|
|
3367
|
+
await this.page.getByTestId("refresh-btn").click();
|
|
3368
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".progress-status-and-percentage").textContent()).toContain("In progress");
|
|
3369
|
+
}
|
|
2754
3370
|
async openTableView() {
|
|
2755
3371
|
await this.util.openSideNavMenu("Table");
|
|
2756
3372
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-grid-container")).toBeVisible();
|
|
@@ -2783,7 +3399,7 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
2783
3399
|
})).toBeVisible();
|
|
2784
3400
|
}
|
|
2785
3401
|
async addNewPhase(phaseName) {
|
|
2786
|
-
await this.
|
|
3402
|
+
await this.addPhaseBtn.click();
|
|
2787
3403
|
if (phaseName) {
|
|
2788
3404
|
await this.phaseTitle.getByText("New Phase").click();
|
|
2789
3405
|
await this.phaseTitle.getByRole("textbox").clear();
|
|
@@ -2851,6 +3467,16 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
2851
3467
|
async expectOnePhaseDisplayed() {
|
|
2852
3468
|
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".phase-content").count()).toBe(1);
|
|
2853
3469
|
}
|
|
3470
|
+
async restartPhases() {
|
|
3471
|
+
await this.page.getByTestId("restart-btn").click();
|
|
3472
|
+
return new $9b9a8c3da392d020$var$RestartPhaseModel(this.page);
|
|
3473
|
+
}
|
|
3474
|
+
async expectAddPhaseNotVisible() {
|
|
3475
|
+
await (0, $kKeXs$playwrighttest.expect)(this.addPhaseBtn).not.toBeVisible();
|
|
3476
|
+
}
|
|
3477
|
+
async expectAddTaskNotVisible() {
|
|
3478
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".add-task.link")).not.toBeVisible();
|
|
3479
|
+
}
|
|
2854
3480
|
}
|
|
2855
3481
|
class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2856
3482
|
constructor(page, phaseName){
|
|
@@ -2943,6 +3569,23 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
2943
3569
|
exact: true
|
|
2944
3570
|
}).click();
|
|
2945
3571
|
}
|
|
3572
|
+
async completeFromContextMenu(taskTitle, comment) {
|
|
3573
|
+
await this.openContextMenuForTask(taskTitle);
|
|
3574
|
+
await this.page.locator(".dropdown-menu li").getByText("Complete").click();
|
|
3575
|
+
await this.commentBox.fill(comment);
|
|
3576
|
+
await this.page.getByRole("button", {
|
|
3577
|
+
name: "Complete",
|
|
3578
|
+
exact: true
|
|
3579
|
+
}).click();
|
|
3580
|
+
}
|
|
3581
|
+
async assignToMeFromContextMenu(taskTitle) {
|
|
3582
|
+
await this.openContextMenuForTask(taskTitle);
|
|
3583
|
+
await this.page.locator(".dropdown-menu li").getByText("Assign to me").click();
|
|
3584
|
+
}
|
|
3585
|
+
async duplicateFromContextMenu(taskTitle) {
|
|
3586
|
+
await this.openContextMenuForTask(taskTitle);
|
|
3587
|
+
await this.page.locator(".dropdown-menu li").getByText("Duplicate").click();
|
|
3588
|
+
}
|
|
2946
3589
|
async expectTemplateLabelNotToBePresent() {
|
|
2947
3590
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-chip").filter({
|
|
2948
3591
|
hasText: "TEMPLATE"
|
|
@@ -3020,6 +3663,43 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
3020
3663
|
hasText: phaseName
|
|
3021
3664
|
})).not.toBeVisible();
|
|
3022
3665
|
}
|
|
3666
|
+
async expectCompletedPhase() {
|
|
3667
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("View all completed phases")).toBeVisible();
|
|
3668
|
+
}
|
|
3669
|
+
async clickViewAllCompletedPhase() {
|
|
3670
|
+
await this.page.getByText("View all completed phases").click();
|
|
3671
|
+
}
|
|
3672
|
+
async expectTaskToBePresent(taskName) {
|
|
3673
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task").filter({
|
|
3674
|
+
hasText: taskName
|
|
3675
|
+
})).toBeVisible();
|
|
3676
|
+
}
|
|
3677
|
+
}
|
|
3678
|
+
class $9b9a8c3da392d020$var$RestartPhaseModel extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
3679
|
+
constructor(page){
|
|
3680
|
+
super(page);
|
|
3681
|
+
this.continueBtn = this.page.getByRole("button", {
|
|
3682
|
+
name: "Continue"
|
|
3683
|
+
});
|
|
3684
|
+
}
|
|
3685
|
+
async fromPhase(phase) {
|
|
3686
|
+
await this.page.locator('.modal select[data-test="fromPhase"]').selectOption(phase);
|
|
3687
|
+
}
|
|
3688
|
+
async fromTask(task) {
|
|
3689
|
+
await this.page.locator('.modal select[data-test="fromTask"]').selectOption(task);
|
|
3690
|
+
}
|
|
3691
|
+
async expectNoTaskSelectorVisible() {
|
|
3692
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator('.modal select[data-test="fromTask"]').isVisible()).toHaveLength(0);
|
|
3693
|
+
}
|
|
3694
|
+
async continue() {
|
|
3695
|
+
await this.page.locator(".modal .continue").click();
|
|
3696
|
+
}
|
|
3697
|
+
async resumeNow() {
|
|
3698
|
+
await this.page.locator(".modal .resume-now").click();
|
|
3699
|
+
}
|
|
3700
|
+
async resumeLater() {
|
|
3701
|
+
await this.page.locator(".modal .resume-later").click();
|
|
3702
|
+
}
|
|
3023
3703
|
}
|
|
3024
3704
|
|
|
3025
3705
|
|
|
@@ -3121,6 +3801,9 @@ class $b2d8d8d82fc8146c$export$eace2be4de1d3377 extends (0, $f8721861c660dd88$ex
|
|
|
3121
3801
|
hasText: "Deleted release delivery successfully"
|
|
3122
3802
|
})).toBeVisible();
|
|
3123
3803
|
}
|
|
3804
|
+
async expectDeliveryDisplayed(deliveryName) {
|
|
3805
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".fc-list-item-title").textContent()).toContain(deliveryName);
|
|
3806
|
+
}
|
|
3124
3807
|
}
|
|
3125
3808
|
|
|
3126
3809
|
|
|
@@ -3497,6 +4180,7 @@ class $04ff53be95b7a0a4$export$32284f8bcf0bc407 extends (0, $f8721861c660dd88$ex
|
|
|
3497
4180
|
|
|
3498
4181
|
|
|
3499
4182
|
|
|
4183
|
+
|
|
3500
4184
|
class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
3501
4185
|
constructor(page){
|
|
3502
4186
|
super(page);
|
|
@@ -3508,6 +4192,7 @@ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$ex
|
|
|
3508
4192
|
this.notificationPage = new (0, $04ff53be95b7a0a4$export$32284f8bcf0bc407)(page);
|
|
3509
4193
|
this.patternPage = new (0, $ceb2e9e08e1837c2$export$9b9454a7f137e99b)(page);
|
|
3510
4194
|
this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
|
|
4195
|
+
this.variables = new (0, $59543fc69900e8db$export$f8e64fcf447db2bf)(page);
|
|
3511
4196
|
}
|
|
3512
4197
|
async openFoldersPage() {
|
|
3513
4198
|
await this.page.goto("./#/folders");
|
|
@@ -3649,6 +4334,30 @@ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$ex
|
|
|
3649
4334
|
await this.util.openSideNavMenu("Templates");
|
|
3650
4335
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Templates")).toBeVisible();
|
|
3651
4336
|
}
|
|
4337
|
+
async openRelease() {
|
|
4338
|
+
await this.util.openSideNavMenu("Releases");
|
|
4339
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Releases")).toBeVisible();
|
|
4340
|
+
}
|
|
4341
|
+
async expectReleaseStarted(releaseName) {
|
|
4342
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release").filter({
|
|
4343
|
+
hasText: releaseName
|
|
4344
|
+
}).locator(".release-status").filter({
|
|
4345
|
+
hasText: "In progress"
|
|
4346
|
+
})).toBeVisible();
|
|
4347
|
+
}
|
|
4348
|
+
async openVariables() {
|
|
4349
|
+
await this.util.openSideNavMenu("Variables");
|
|
4350
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Variables")).toBeVisible();
|
|
4351
|
+
return this.variables;
|
|
4352
|
+
}
|
|
4353
|
+
async openCustomDashboard() {
|
|
4354
|
+
await this.util.openSideNavMenu("Custom dashboards");
|
|
4355
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Custom dashboards")).toBeVisible();
|
|
4356
|
+
}
|
|
4357
|
+
async openReleaseByName(releaseName) {
|
|
4358
|
+
await this.page.getByTitle(releaseName).click();
|
|
4359
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Flow")).toBeVisible();
|
|
4360
|
+
}
|
|
3652
4361
|
}
|
|
3653
4362
|
|
|
3654
4363
|
|
|
@@ -4617,173 +5326,496 @@ class $a8855257f8bb2b12$export$43682cddead1dd78 extends (0, $f8721861c660dd88$ex
|
|
|
4617
5326
|
// Check if the release name present in redirected URL
|
|
4618
5327
|
(0, $kKeXs$playwrighttest.expect)(currentURL).toContain(releaseurl);
|
|
4619
5328
|
}
|
|
4620
|
-
async viewDependency(source_release, dest_release) {
|
|
4621
|
-
const source_text = source_release + "dependencies";
|
|
4622
|
-
await this.page.locator(".tl-header-navigation").getByRole("combobox").click();
|
|
4623
|
-
await this.page.getByRole("option", {
|
|
4624
|
-
name: "Day"
|
|
4625
|
-
}).click();
|
|
4626
|
-
await this.page.getByRole("button", {
|
|
4627
|
-
name: "Today"
|
|
4628
|
-
}).click();
|
|
4629
|
-
await this.page.getByText(source_release).click();
|
|
4630
|
-
await this.page.locator(".release-modal-container").locator(".xl-icon.cluster-dependencies-icon").click();
|
|
4631
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".tl-drawer-navigation-header")).toHaveText(source_text);
|
|
4632
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".tl-drawer-dependency-body-title-text")).toHaveText(dest_release);
|
|
5329
|
+
async viewDependency(source_release, dest_release) {
|
|
5330
|
+
const source_text = source_release + "dependencies";
|
|
5331
|
+
await this.page.locator(".tl-header-navigation").getByRole("combobox").click();
|
|
5332
|
+
await this.page.getByRole("option", {
|
|
5333
|
+
name: "Day"
|
|
5334
|
+
}).click();
|
|
5335
|
+
await this.page.getByRole("button", {
|
|
5336
|
+
name: "Today"
|
|
5337
|
+
}).click();
|
|
5338
|
+
await this.page.getByText(source_release).click();
|
|
5339
|
+
await this.page.locator(".release-modal-container").locator(".xl-icon.cluster-dependencies-icon").click();
|
|
5340
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".tl-drawer-navigation-header")).toHaveText(source_text);
|
|
5341
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".tl-drawer-dependency-body-title-text")).toHaveText(dest_release);
|
|
5342
|
+
}
|
|
5343
|
+
async downloadIcsCalendar(release_title) {
|
|
5344
|
+
let downloadCount = 0;
|
|
5345
|
+
// Listen to download events
|
|
5346
|
+
this.page.on("download", (_download)=>{
|
|
5347
|
+
downloadCount++;
|
|
5348
|
+
});
|
|
5349
|
+
await this.page.locator(".tl-header-navigation").getByRole("combobox").click();
|
|
5350
|
+
await this.page.getByRole("option", {
|
|
5351
|
+
name: "Day"
|
|
5352
|
+
}).click();
|
|
5353
|
+
await this.page.getByRole("button", {
|
|
5354
|
+
name: "Today"
|
|
5355
|
+
}).click();
|
|
5356
|
+
await this.page.getByText(release_title).click();
|
|
5357
|
+
await this.page.locator(".release-modal-container").locator(".xl-icon.calendar-icon").click();
|
|
5358
|
+
return downloadCount;
|
|
5359
|
+
}
|
|
5360
|
+
}
|
|
5361
|
+
|
|
5362
|
+
|
|
5363
|
+
|
|
5364
|
+
|
|
5365
|
+
class $a6a3c1345fc4767e$export$b6fbc3e67030138f extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
5366
|
+
async setStatus(status) {
|
|
5367
|
+
await this.page.locator(".react-tagsinput").click({
|
|
5368
|
+
force: true
|
|
5369
|
+
});
|
|
5370
|
+
await this.page.getByText("Clear all").click();
|
|
5371
|
+
await this.page.locator(".react-tagsinput").click({
|
|
5372
|
+
force: true
|
|
5373
|
+
});
|
|
5374
|
+
if (status === "Select all") await this.page.getByText(status).click();
|
|
5375
|
+
else await this.page.getByTitle(status).locator("i").first().click();
|
|
5376
|
+
}
|
|
5377
|
+
async openReleaseGroup(title) {
|
|
5378
|
+
await this.page.locator("xlr-release-group-row").filter({
|
|
5379
|
+
hasText: title
|
|
5380
|
+
}).getByRole("link").click();
|
|
5381
|
+
await this.page.getByTitle(title).click();
|
|
5382
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page).toHaveURL(/.*ReleaseGroup/);
|
|
5383
|
+
}
|
|
5384
|
+
async expectReleaseGroupStatus(status) {
|
|
5385
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-status")).toContainText(status);
|
|
5386
|
+
}
|
|
5387
|
+
async expectReleaseGroupDisplayed(title) {
|
|
5388
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
|
|
5389
|
+
exact: true
|
|
5390
|
+
})).toBeVisible();
|
|
5391
|
+
}
|
|
5392
|
+
async expectReleaseGroupNotDisplayed(title) {
|
|
5393
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
|
|
5394
|
+
exact: true
|
|
5395
|
+
})).not.toBeVisible();
|
|
5396
|
+
}
|
|
5397
|
+
async searchReleaseGroupByTitle(title) {
|
|
5398
|
+
await this.page.getByPlaceholder("Search for groups...", {
|
|
5399
|
+
exact: true
|
|
5400
|
+
}).click();
|
|
5401
|
+
await this.page.getByPlaceholder("Search for groups...", {
|
|
5402
|
+
exact: true
|
|
5403
|
+
}).fill(title);
|
|
5404
|
+
await this.page.getByPlaceholder("Search for groups...", {
|
|
5405
|
+
exact: true
|
|
5406
|
+
}).press("Enter");
|
|
5407
|
+
}
|
|
5408
|
+
async deleteReleaseGroup(title) {
|
|
5409
|
+
await this.page.locator(".fc-list-item-line").filter({
|
|
5410
|
+
hasText: title
|
|
5411
|
+
}).locator(".fc-item-delete").click();
|
|
5412
|
+
await this.page.getByRole("button", {
|
|
5413
|
+
name: "Delete"
|
|
5414
|
+
}).click();
|
|
5415
|
+
}
|
|
5416
|
+
async clickReleaseGroupEdit(title) {
|
|
5417
|
+
await this.page.locator(".fc-list-item-line").filter({
|
|
5418
|
+
hasText: title
|
|
5419
|
+
}).locator(".fc-item-update").click();
|
|
5420
|
+
}
|
|
5421
|
+
async enterReleaseGroupDetails(new_title) {
|
|
5422
|
+
await this.page.locator(".modal-body").locator("#title").fill(new_title);
|
|
5423
|
+
}
|
|
5424
|
+
async clickSaveButton() {
|
|
5425
|
+
await this.page.locator(".modal-footer").getByRole("button", {
|
|
5426
|
+
name: "Save"
|
|
5427
|
+
}).click();
|
|
5428
|
+
}
|
|
5429
|
+
async clickCancelButton() {
|
|
5430
|
+
await this.page.locator(".modal-footer").getByRole("button", {
|
|
5431
|
+
name: "Cancel"
|
|
5432
|
+
}).click();
|
|
5433
|
+
}
|
|
5434
|
+
}
|
|
5435
|
+
|
|
5436
|
+
|
|
5437
|
+
|
|
5438
|
+
|
|
5439
|
+
class $3fad6a9449b6416f$export$1a0994e9c202d529 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
5440
|
+
async expectReleaseDisplayed(title) {
|
|
5441
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
|
|
5442
|
+
exact: true
|
|
5443
|
+
})).toBeVisible();
|
|
5444
|
+
}
|
|
5445
|
+
async expectReleaseNotDisplayed(title) {
|
|
5446
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
|
|
5447
|
+
exact: true
|
|
5448
|
+
})).not.toBeVisible({
|
|
5449
|
+
timeout: 10000
|
|
5450
|
+
});
|
|
5451
|
+
}
|
|
5452
|
+
async expectPhaseDisplayed(title) {
|
|
5453
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
|
|
5454
|
+
exact: true
|
|
5455
|
+
})).toBeVisible();
|
|
5456
|
+
}
|
|
5457
|
+
async openContextMenu(title) {
|
|
5458
|
+
await this.page.locator(".timeline-row-name").filter({
|
|
5459
|
+
hasText: title
|
|
5460
|
+
}).locator(".options-icon").click();
|
|
5461
|
+
}
|
|
5462
|
+
async removeFromReleaseGroup() {
|
|
5463
|
+
await this.page.getByRole("menuitem", {
|
|
5464
|
+
name: "Remove from group"
|
|
5465
|
+
}).locator("a").click();
|
|
5466
|
+
await this.page.getByRole("button", {
|
|
5467
|
+
name: "Remove"
|
|
5468
|
+
}).click();
|
|
5469
|
+
}
|
|
5470
|
+
async expectNumberOfReleases(num_of_release) {
|
|
5471
|
+
const elementCount = await this.page.locator(".timeline-row-name-release").count();
|
|
5472
|
+
(0, $kKeXs$playwrighttest.expect)(elementCount).toBe(num_of_release);
|
|
5473
|
+
}
|
|
5474
|
+
async openAddReleaseList() {
|
|
5475
|
+
await this.page.getByRole("button", {
|
|
5476
|
+
name: "Add release"
|
|
5477
|
+
}).click();
|
|
5478
|
+
}
|
|
5479
|
+
async filterReleases(title) {
|
|
5480
|
+
await this.page.getByPlaceholder("Search for a release...").click();
|
|
5481
|
+
await this.page.getByPlaceholder("Search for a release...").fill(title);
|
|
5482
|
+
await this.page.waitForTimeout(5000);
|
|
5483
|
+
await this.page.getByPlaceholder("Search for a release...").press("Enter");
|
|
5484
|
+
}
|
|
5485
|
+
async expectNumberOfReleasesOnModal(num_of_release) {
|
|
5486
|
+
const elementCount = await this.page.locator(".release-modal-line").count();
|
|
5487
|
+
(0, $kKeXs$playwrighttest.expect)(elementCount).toBe(num_of_release);
|
|
5488
|
+
}
|
|
5489
|
+
async selectAllReleaseCheckbox() {
|
|
5490
|
+
await this.page.getByLabel("Select all").check();
|
|
5491
|
+
}
|
|
5492
|
+
async addReleasesToGroup() {
|
|
5493
|
+
await this.page.getByRole("button", {
|
|
5494
|
+
name: "Add"
|
|
5495
|
+
}).click();
|
|
5496
|
+
}
|
|
5497
|
+
}
|
|
5498
|
+
|
|
5499
|
+
|
|
5500
|
+
|
|
5501
|
+
|
|
5502
|
+
|
|
5503
|
+
|
|
5504
|
+
|
|
5505
|
+
class $fd4eef3ad2b2e612$export$a87f0ae8695e74be extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
5506
|
+
constructor(page){
|
|
5507
|
+
super(page);
|
|
5508
|
+
this.addListValue = this.page.locator(".variable-selector .xl-components-input-full input");
|
|
5509
|
+
this.addVariableValue = this.page.locator(".variable-value .xl-components-input-full input");
|
|
5510
|
+
this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
|
|
5511
|
+
this.listAddButton = this.page.getByRole("button", {
|
|
5512
|
+
name: "Add"
|
|
5513
|
+
});
|
|
5514
|
+
}
|
|
5515
|
+
async openVariable(variableKey) {
|
|
5516
|
+
await this.page.locator(`.variables-list .variable`).getByText(variableKey).click();
|
|
5517
|
+
return new $fd4eef3ad2b2e612$var$ReleaseVariableModal(this.page);
|
|
5518
|
+
}
|
|
5519
|
+
async addNewVariable(variableName, labelname, description) {
|
|
5520
|
+
await this.page.locator("#action-toolbar").getByTestId("dot-button").click();
|
|
5521
|
+
await this.page.fill(`[name="fieldKey"]`, variableName);
|
|
5522
|
+
await this.page.locator(".variable-label input").fill(labelname);
|
|
5523
|
+
if (description) await this.page.locator(".variable-description input").fill(description);
|
|
5524
|
+
}
|
|
5525
|
+
async selectVariableTextType(valuename) {
|
|
5526
|
+
await this.page.getByRole("combobox").selectOption("StringVariable");
|
|
5527
|
+
await this.page.locator(".variable-value").type(valuename);
|
|
5528
|
+
}
|
|
5529
|
+
async selectVariableListboxType(possiblevalue, defaultValue, required) {
|
|
5530
|
+
await this.page.getByRole("combobox").selectOption("DropDownListBox");
|
|
5531
|
+
if (possiblevalue instanceof Array) for (const value of possiblevalue){
|
|
5532
|
+
await this.addListValue.fill(value);
|
|
5533
|
+
await this.listAddButton.click();
|
|
5534
|
+
}
|
|
5535
|
+
else {
|
|
5536
|
+
await this.addListValue.fill(possiblevalue);
|
|
5537
|
+
await this.listAddButton.click();
|
|
5538
|
+
}
|
|
5539
|
+
await this.page.locator(".variable-value select").type(defaultValue);
|
|
5540
|
+
if (required) await this.page.getByRole("checkbox").check();
|
|
5541
|
+
else await this.page.getByRole("checkbox").uncheck();
|
|
5542
|
+
}
|
|
5543
|
+
async selectVariablePasswordType(possiblevalue) {
|
|
5544
|
+
await this.page.getByRole("combobox").selectOption("PasswordStringVariable");
|
|
5545
|
+
await this.page.locator('input[type="password"]').type(possiblevalue);
|
|
5546
|
+
}
|
|
5547
|
+
async selectVariableCheckboxType() {
|
|
5548
|
+
await this.page.getByRole("combobox").selectOption("BooleanVariable");
|
|
5549
|
+
await this.page.getByRole("checkbox").check();
|
|
5550
|
+
}
|
|
5551
|
+
async selectVariableNumberType(possiblevalue) {
|
|
5552
|
+
await this.page.getByRole("combobox").selectOption("IntegerVariable");
|
|
5553
|
+
await this.page.locator('input[ng-model="var.value"]').fill(possiblevalue);
|
|
5554
|
+
}
|
|
5555
|
+
async selectVariableMultiListType(possiblevalue1, possiblevalue2) {
|
|
5556
|
+
await this.page.getByRole("combobox").selectOption("MultiSelectListBox");
|
|
5557
|
+
await this.addListValue.fill(possiblevalue1);
|
|
5558
|
+
await this.listAddButton.click();
|
|
5559
|
+
await this.addListValue.fill(possiblevalue2);
|
|
5560
|
+
await this.listAddButton.click();
|
|
5561
|
+
await this.page.locator(".react-tagsinput").click();
|
|
5562
|
+
await this.page.getByText("Select all", {
|
|
5563
|
+
exact: true
|
|
5564
|
+
}).click();
|
|
5565
|
+
}
|
|
5566
|
+
async addVariableDate() {
|
|
5567
|
+
await this.page.getByRole("combobox").selectOption("DateVariable");
|
|
5568
|
+
await this.page.getByText("Select date").click();
|
|
5569
|
+
}
|
|
5570
|
+
async setDate(date, monthYear) {
|
|
5571
|
+
await this.dateUtil.setDate(date, monthYear);
|
|
5572
|
+
}
|
|
5573
|
+
async addVariableKeyValueMap(keys1, values1) {
|
|
5574
|
+
await this.page.getByRole("combobox").selectOption("MapStringStringVariable");
|
|
5575
|
+
await this.page.getByPlaceholder("key").fill(keys1);
|
|
5576
|
+
await this.page.getByPlaceholder("Value").fill(values1);
|
|
5577
|
+
await this.listAddButton.click();
|
|
5578
|
+
await this.page.locator(".xl-map-string-string-div-buttons .search-icon").click();
|
|
5579
|
+
await this.page.getByRole("row", {
|
|
5580
|
+
name: "Search"
|
|
5581
|
+
}).getByRole("textbox").fill(keys1);
|
|
5582
|
+
const detail = await this.page.locator("table.table-condensed span").allInnerTexts();
|
|
5583
|
+
(0, $kKeXs$playwrighttest.expect)(detail[0]).toEqual(keys1);
|
|
5584
|
+
(0, $kKeXs$playwrighttest.expect)(detail[1]).toEqual(values1);
|
|
5585
|
+
}
|
|
5586
|
+
async addVariableSet(possiblevalue1) {
|
|
5587
|
+
await this.page.getByRole("combobox").selectOption("SetStringVariable");
|
|
5588
|
+
await this.page.locator(".dip-input input").fill(possiblevalue1);
|
|
5589
|
+
await this.listAddButton.click();
|
|
5590
|
+
}
|
|
5591
|
+
async submitTheVariable() {
|
|
5592
|
+
const createButton = this.page.locator(".modal-footer .save");
|
|
5593
|
+
await (0, $kKeXs$playwrighttest.expect)(createButton).toBeEnabled();
|
|
5594
|
+
await createButton.scrollIntoViewIfNeeded();
|
|
5595
|
+
await createButton.click();
|
|
5596
|
+
// Expect is needed here to avoid flackiness on clicking create button
|
|
5597
|
+
await (0, $kKeXs$playwrighttest.expect)(createButton).not.toBeVisible();
|
|
5598
|
+
}
|
|
5599
|
+
async expectVariableWithNameValueAndType(name, value, type) {
|
|
5600
|
+
const rowLocator = await this.page.locator(".variable .data-row").allTextContents();
|
|
5601
|
+
(0, $kKeXs$playwrighttest.expect)(rowLocator.toString()).toContain(name);
|
|
5602
|
+
(0, $kKeXs$playwrighttest.expect)(rowLocator.toString()).toContain(value);
|
|
5603
|
+
(0, $kKeXs$playwrighttest.expect)(rowLocator.toString()).toContain(type);
|
|
5604
|
+
}
|
|
5605
|
+
async clickEditVariable(variableName) {
|
|
5606
|
+
await this.page.locator("[id='variables-filter']").fill(variableName);
|
|
5607
|
+
await this.page.getByText("Edit").first().click();
|
|
5608
|
+
return new $fd4eef3ad2b2e612$var$ReleaseVariableModal(this.page);
|
|
5609
|
+
}
|
|
5610
|
+
async clickDeleteVariable(variableName) {
|
|
5611
|
+
await this.page.locator("[id='variables-filter']").fill(variableName);
|
|
5612
|
+
await this.page.locator(".action .delete-icon").first().click();
|
|
5613
|
+
return new $fd4eef3ad2b2e612$var$DeleteVariableModel(this.page);
|
|
5614
|
+
}
|
|
5615
|
+
async expectVariablesCountToBe(count) {
|
|
5616
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".variable .data-row")).toHaveCount(count);
|
|
5617
|
+
}
|
|
5618
|
+
async expectVariableNotPresent(variableName) {
|
|
5619
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".variable").filter({
|
|
5620
|
+
hasText: variableName
|
|
5621
|
+
})).not.toBeVisible();
|
|
5622
|
+
}
|
|
5623
|
+
async clearSearch() {
|
|
5624
|
+
await this.page.locator("[id='variables-filter']").clear();
|
|
5625
|
+
}
|
|
5626
|
+
async switchPossibleValuesToVariable(variableName) {
|
|
5627
|
+
await this.page.locator(".variable-toggle button").click();
|
|
5628
|
+
await this.page.locator(".ui-autocomplete-input").fill(variableName);
|
|
5629
|
+
await this.page.locator(".ui-menu-item-wrapper").filter({
|
|
5630
|
+
hasText: `${variableName}`
|
|
5631
|
+
}).click();
|
|
5632
|
+
}
|
|
5633
|
+
async selectVariableListboxTypeWithVariable(variableName, defaultValue, required) {
|
|
5634
|
+
await this.page.getByRole("combobox").selectOption("DropDownListBox");
|
|
5635
|
+
await this.page.locator(".variable-toggle button").click();
|
|
5636
|
+
await this.page.locator(".ui-autocomplete-input").fill(variableName);
|
|
5637
|
+
await this.page.locator(".ui-menu-item-wrapper").filter({
|
|
5638
|
+
hasText: `${variableName}`
|
|
5639
|
+
}).click();
|
|
5640
|
+
await this.page.locator(".variable-value select").type(defaultValue);
|
|
5641
|
+
if (required) await this.page.getByRole("checkbox").check();
|
|
5642
|
+
else await this.page.getByRole("checkbox").uncheck();
|
|
5643
|
+
}
|
|
5644
|
+
}
|
|
5645
|
+
class $fd4eef3ad2b2e612$var$ReleaseVariableModal extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
5646
|
+
constructor(page){
|
|
5647
|
+
super(page);
|
|
5648
|
+
this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
|
|
5649
|
+
}
|
|
5650
|
+
async expectValue(locators, expectFn) {
|
|
5651
|
+
const [index, locator] = await (0, $ef0df8ad8a777ce6$export$a0f926f04148e5d2)(locators);
|
|
5652
|
+
expectFn[index](locator);
|
|
5653
|
+
}
|
|
5654
|
+
async expectValueToBe(value) {
|
|
5655
|
+
await this.expectValue([
|
|
5656
|
+
this.page.locator("#modal .variable-value input"),
|
|
5657
|
+
this.page.locator("#modal .variable-value .field-readonly"),
|
|
5658
|
+
this.page.locator("#modal .variable-value .xl-map-string-string"),
|
|
5659
|
+
this.page.locator("#modal .variable-value .xl-list-display-mode .text-container")
|
|
5660
|
+
], [
|
|
5661
|
+
(l)=>(0, $kKeXs$playwrighttest.expect)(l).toHaveValue(value),
|
|
5662
|
+
(l)=>(0, $kKeXs$playwrighttest.expect)(l).toHaveText(value),
|
|
5663
|
+
(l)=>(0, $kKeXs$playwrighttest.expect)(l).toHaveText(value),
|
|
5664
|
+
(l)=>(0, $kKeXs$playwrighttest.expect)(l).toHaveText(value)
|
|
5665
|
+
]);
|
|
5666
|
+
}
|
|
5667
|
+
async expectValueToContain(value) {
|
|
5668
|
+
await this.expectValue([
|
|
5669
|
+
this.page.locator("#modal .variable-value input"),
|
|
5670
|
+
this.page.locator("#modal .variable-value .field-readonly"),
|
|
5671
|
+
this.page.locator("#modal .variable-value .xl-map-string-string"),
|
|
5672
|
+
this.page.locator("#modal .variable-value .xl-list-display-mode")
|
|
5673
|
+
], [
|
|
5674
|
+
(l)=>(0, $kKeXs$playwrighttest.expect)(l.inputValue()).toContain(value),
|
|
5675
|
+
(l)=>(0, $kKeXs$playwrighttest.expect)(l).toContainText(value),
|
|
5676
|
+
(l)=>(0, $kKeXs$playwrighttest.expect)(l).toContainText(value),
|
|
5677
|
+
(l)=>(0, $kKeXs$playwrighttest.expect)(l).toContainText(value)
|
|
5678
|
+
]);
|
|
5679
|
+
}
|
|
5680
|
+
async close() {
|
|
5681
|
+
await this.page.locator("#modal .modal-header button.close").click();
|
|
5682
|
+
}
|
|
5683
|
+
async expectPossibleValues(possiblevalue) {
|
|
5684
|
+
const listLocator = await this.page.locator(".editor .xl-list-row").allInnerTexts();
|
|
5685
|
+
if (possiblevalue instanceof Array) for (const value of possiblevalue)(0, $kKeXs$playwrighttest.expect)(listLocator).toContain(value);
|
|
5686
|
+
else (0, $kKeXs$playwrighttest.expect)(listLocator).toContain(possiblevalue);
|
|
5687
|
+
}
|
|
5688
|
+
async expectPossibleVariableValues(possiblevariablevalue) {
|
|
5689
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".variable-dropdown input")).toHaveValue(possiblevariablevalue);
|
|
5690
|
+
}
|
|
5691
|
+
async addPossibleValue(value) {
|
|
5692
|
+
if (value instanceof Array) for (const li of value){
|
|
5693
|
+
await this.page.locator(".xl-components-input-full input").fill(li);
|
|
5694
|
+
await this.page.getByRole("button", {
|
|
5695
|
+
name: "Add"
|
|
5696
|
+
}).click();
|
|
5697
|
+
}
|
|
5698
|
+
else {
|
|
5699
|
+
await this.page.locator(".xl-components-input-full input").fill(value);
|
|
5700
|
+
await this.page.getByRole("button", {
|
|
5701
|
+
name: "Add"
|
|
5702
|
+
}).click();
|
|
5703
|
+
}
|
|
5704
|
+
}
|
|
5705
|
+
async selectVariableValue(defaultValue) {
|
|
5706
|
+
await this.page.locator(".variable-value select").selectOption(defaultValue);
|
|
4633
5707
|
}
|
|
4634
|
-
async
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
5708
|
+
async save() {
|
|
5709
|
+
const saveButton = this.page.locator("#modal .modal-footer .save");
|
|
5710
|
+
await saveButton.scrollIntoViewIfNeeded();
|
|
5711
|
+
await saveButton.click({
|
|
5712
|
+
delay: 2000
|
|
4639
5713
|
});
|
|
4640
|
-
|
|
4641
|
-
await
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
await this.page.
|
|
4645
|
-
|
|
5714
|
+
// Expect is needed here to avoid flackiness on clicking save button on modal window
|
|
5715
|
+
await (0, $kKeXs$playwrighttest.expect)(saveButton).not.toBeVisible();
|
|
5716
|
+
}
|
|
5717
|
+
async createPossibleValuesVariable(variableName) {
|
|
5718
|
+
await this.page.locator(".variable-toggle button").click();
|
|
5719
|
+
await this.page.locator(".ui-autocomplete-input").fill(variableName);
|
|
5720
|
+
await this.page.locator(".ui-menu-item-wrapper").filter({
|
|
5721
|
+
hasText: `${variableName}`
|
|
4646
5722
|
}).click();
|
|
4647
|
-
await this.page.getByText(release_title).click();
|
|
4648
|
-
await this.page.locator(".release-modal-container").locator(".xl-icon.calendar-icon").click();
|
|
4649
|
-
return downloadCount;
|
|
4650
5723
|
}
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
class $a6a3c1345fc4767e$export$b6fbc3e67030138f extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
4657
|
-
async setStatus(status) {
|
|
4658
|
-
await this.page.locator(".react-tagsinput").click({
|
|
4659
|
-
force: true
|
|
4660
|
-
});
|
|
4661
|
-
await this.page.getByText("Clear all").click();
|
|
4662
|
-
await this.page.locator(".react-tagsinput").click({
|
|
4663
|
-
force: true
|
|
4664
|
-
});
|
|
4665
|
-
if (status === "Select all") await this.page.getByText(status).click();
|
|
4666
|
-
else await this.page.getByTitle(status).locator("i").first().click();
|
|
5724
|
+
async expectVariableValueToBe(value) {
|
|
5725
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator('.variable-value select option[selected="selected"]').textContent()).toBe(value);
|
|
4667
5726
|
}
|
|
4668
|
-
async
|
|
4669
|
-
await this.page.
|
|
4670
|
-
hasText: title
|
|
4671
|
-
}).getByRole("link").click();
|
|
4672
|
-
await this.page.getByTitle(title).click();
|
|
4673
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page).toHaveURL(/.*ReleaseGroup/);
|
|
5727
|
+
async expectNoVariablesInList() {
|
|
5728
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("No variables defined.")).toBeVisible();
|
|
4674
5729
|
}
|
|
4675
|
-
async
|
|
4676
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(
|
|
5730
|
+
async expectNameInput(value) {
|
|
5731
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`#modal .variable-name input`)).toHaveValue(value);
|
|
4677
5732
|
}
|
|
4678
|
-
async
|
|
4679
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.
|
|
4680
|
-
exact: true
|
|
4681
|
-
})).toBeVisible();
|
|
5733
|
+
async expectLabel(value) {
|
|
5734
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#modal .variable-label input")).toHaveValue(value);
|
|
4682
5735
|
}
|
|
4683
|
-
async
|
|
4684
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.
|
|
4685
|
-
|
|
4686
|
-
})).not.toBeVisible();
|
|
5736
|
+
async expectRequired(value) {
|
|
5737
|
+
if (value == true) await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.form-group input[ng-model="var.requiresValue"]')).toBeChecked();
|
|
5738
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.form-group input[ng-model="var.requiresValue"]')).not.toBeChecked();
|
|
4687
5739
|
}
|
|
4688
|
-
async
|
|
4689
|
-
await this.page.
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
await this.page.getByPlaceholder("Search for groups...", {
|
|
4693
|
-
exact: true
|
|
4694
|
-
}).fill(title);
|
|
4695
|
-
await this.page.getByPlaceholder("Search for groups...", {
|
|
4696
|
-
exact: true
|
|
4697
|
-
}).press("Enter");
|
|
5740
|
+
async setDescription(description) {
|
|
5741
|
+
await this.page.locator(".variable-description input").click();
|
|
5742
|
+
await this.page.locator(".variable-description input").clear();
|
|
5743
|
+
await this.page.locator(".variable-description input").fill(description);
|
|
4698
5744
|
}
|
|
4699
|
-
async
|
|
4700
|
-
await this.page.locator(".
|
|
4701
|
-
|
|
4702
|
-
|
|
5745
|
+
async setLabel(labelValue) {
|
|
5746
|
+
await this.page.locator(".variable-label input").fill(labelValue);
|
|
5747
|
+
}
|
|
5748
|
+
async setDate(date, monthYear) {
|
|
5749
|
+
await this.page.locator("#modal .date").click();
|
|
5750
|
+
await this.dateUtil.setDate(date, monthYear);
|
|
5751
|
+
}
|
|
5752
|
+
async setValue(value) {
|
|
5753
|
+
await this.page.locator(".variable-value input").fill(value);
|
|
5754
|
+
}
|
|
5755
|
+
}
|
|
5756
|
+
class $fd4eef3ad2b2e612$var$DeleteVariableModel extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
5757
|
+
constructor(page){
|
|
5758
|
+
super(page);
|
|
5759
|
+
this.model = new $fd4eef3ad2b2e612$var$ReleaseVariableModal(page);
|
|
5760
|
+
this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
|
|
5761
|
+
}
|
|
5762
|
+
async deleteVariable() {
|
|
5763
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
|
|
5764
|
+
name: "Replace and delete"
|
|
5765
|
+
})).toBeVisible();
|
|
4703
5766
|
await this.page.getByRole("button", {
|
|
4704
5767
|
name: "Delete"
|
|
4705
5768
|
}).click();
|
|
4706
5769
|
}
|
|
4707
|
-
async
|
|
4708
|
-
await this.
|
|
4709
|
-
hasText: title
|
|
4710
|
-
}).locator(".fc-item-update").click();
|
|
5770
|
+
async replaceItWithVariable(variable) {
|
|
5771
|
+
await this.model.createPossibleValuesVariable(variable);
|
|
4711
5772
|
}
|
|
4712
|
-
async
|
|
4713
|
-
await this.page.locator(".
|
|
5773
|
+
async replaceItwithValue(value) {
|
|
5774
|
+
await this.page.locator(".display").click();
|
|
5775
|
+
await this.page.getByLabel("*").fill(value);
|
|
4714
5776
|
}
|
|
4715
|
-
async
|
|
4716
|
-
await this.page.
|
|
4717
|
-
name: "
|
|
5777
|
+
async clickReplaceAndDelete() {
|
|
5778
|
+
await this.page.getByRole("button", {
|
|
5779
|
+
name: "Replace and delete"
|
|
4718
5780
|
}).click();
|
|
4719
5781
|
}
|
|
4720
|
-
async
|
|
4721
|
-
await this.page.locator(".
|
|
4722
|
-
|
|
5782
|
+
async addValue(value) {
|
|
5783
|
+
await this.page.locator(".xl-components-input-full input").fill(value);
|
|
5784
|
+
await this.page.getByRole("button", {
|
|
5785
|
+
name: "Add"
|
|
4723
5786
|
}).click();
|
|
4724
5787
|
}
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
class $3fad6a9449b6416f$export$1a0994e9c202d529 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
4731
|
-
async expectReleaseDisplayed(title) {
|
|
4732
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
|
|
4733
|
-
exact: true
|
|
4734
|
-
})).toBeVisible();
|
|
4735
|
-
}
|
|
4736
|
-
async expectReleaseNotDisplayed(title) {
|
|
4737
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(title, {
|
|
4738
|
-
exact: true
|
|
4739
|
-
})).not.toBeVisible({
|
|
4740
|
-
timeout: 10000
|
|
4741
|
-
});
|
|
5788
|
+
async remove(value) {
|
|
5789
|
+
await this.page.locator("li").filter({
|
|
5790
|
+
hasText: value
|
|
5791
|
+
}).locator("i.close-icon").click();
|
|
4742
5792
|
}
|
|
4743
|
-
async
|
|
4744
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.
|
|
4745
|
-
|
|
5793
|
+
async expectReplacementPromptDisplayed() {
|
|
5794
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
|
|
5795
|
+
name: "Replace and delete"
|
|
4746
5796
|
})).toBeVisible();
|
|
4747
5797
|
}
|
|
4748
|
-
async
|
|
4749
|
-
await this.page.locator(".
|
|
4750
|
-
hasText: title
|
|
4751
|
-
}).locator(".options-icon").click();
|
|
4752
|
-
}
|
|
4753
|
-
async removeFromReleaseGroup() {
|
|
4754
|
-
await this.page.getByRole("menuitem", {
|
|
4755
|
-
name: "Remove from group"
|
|
4756
|
-
}).locator("a").click();
|
|
4757
|
-
await this.page.getByRole("button", {
|
|
4758
|
-
name: "Remove"
|
|
4759
|
-
}).click();
|
|
4760
|
-
}
|
|
4761
|
-
async expectNumberOfReleases(num_of_release) {
|
|
4762
|
-
const elementCount = await this.page.locator(".timeline-row-name-release").count();
|
|
4763
|
-
(0, $kKeXs$playwrighttest.expect)(elementCount).toBe(num_of_release);
|
|
5798
|
+
async close() {
|
|
5799
|
+
await this.page.locator("#modal .modal-header button.close").click();
|
|
4764
5800
|
}
|
|
4765
|
-
async
|
|
4766
|
-
await this.page.
|
|
4767
|
-
|
|
4768
|
-
}).click();
|
|
5801
|
+
async removeItemOnSet(value) {
|
|
5802
|
+
await this.page.locator("tr").filter({
|
|
5803
|
+
hasText: value
|
|
5804
|
+
}).locator("i.close-icon").click();
|
|
4769
5805
|
}
|
|
4770
|
-
async
|
|
4771
|
-
await this.page.
|
|
4772
|
-
await this.page.
|
|
4773
|
-
await this.page.waitForTimeout(5000);
|
|
4774
|
-
await this.page.getByPlaceholder("Search for a release...").press("Enter");
|
|
5806
|
+
async addValueForSet(key, value) {
|
|
5807
|
+
await this.page.locator(".input-key").fill(key);
|
|
5808
|
+
await this.page.locator(".input-value").fill(value);
|
|
4775
5809
|
}
|
|
4776
|
-
async
|
|
4777
|
-
|
|
4778
|
-
(0, $kKeXs$playwrighttest.expect)(elementCount).toBe(num_of_release);
|
|
5810
|
+
async replaceWithIntegerValue(value) {
|
|
5811
|
+
await this.page.locator(".editable").fill(value);
|
|
4779
5812
|
}
|
|
4780
|
-
async
|
|
4781
|
-
await this.page.
|
|
5813
|
+
async replaceForBooleanValue() {
|
|
5814
|
+
await this.page.locator(".editor input").click();
|
|
4782
5815
|
}
|
|
4783
|
-
async
|
|
4784
|
-
await this.page.
|
|
4785
|
-
|
|
4786
|
-
}).click();
|
|
5816
|
+
async deleteBySettingDate(date, monthYear) {
|
|
5817
|
+
await this.page.locator("#modal .date").click();
|
|
5818
|
+
await this.dateUtil.setDate(date, monthYear);
|
|
4787
5819
|
}
|
|
4788
5820
|
}
|
|
4789
5821
|
|
|
@@ -4791,8 +5823,6 @@ class $3fad6a9449b6416f$export$1a0994e9c202d529 extends (0, $f8721861c660dd88$ex
|
|
|
4791
5823
|
|
|
4792
5824
|
|
|
4793
5825
|
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
5826
|
class $ed2d4739e27d43c1$export$60c3bfa6385e2a10 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
4797
5827
|
constructor(page){
|
|
4798
5828
|
super(page);
|
|
@@ -4803,6 +5833,17 @@ class $ed2d4739e27d43c1$export$60c3bfa6385e2a10 extends (0, $f8721861c660dd88$ex
|
|
|
4803
5833
|
await this.filterTaskByTitle(taskName);
|
|
4804
5834
|
await this.page.getByText(taskName).first().click();
|
|
4805
5835
|
}
|
|
5836
|
+
async complete(taskName, comment) {
|
|
5837
|
+
await this.page.locator(`.row.task-inner`, {
|
|
5838
|
+
hasText: taskName
|
|
5839
|
+
}).locator("span.complete").click();
|
|
5840
|
+
await this.commentBox.click();
|
|
5841
|
+
await this.commentBox.fill(comment);
|
|
5842
|
+
await this.page.getByRole("button", {
|
|
5843
|
+
name: "Complete",
|
|
5844
|
+
exact: true
|
|
5845
|
+
}).click();
|
|
5846
|
+
}
|
|
4806
5847
|
async skip(taskName, comment) {
|
|
4807
5848
|
await this.page.locator(`.row.task-inner`, {
|
|
4808
5849
|
hasText: taskName
|
|
@@ -5362,7 +6403,10 @@ class $959d38250779aa22$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
5362
6403
|
await this.page.locator(".icon-close").click();
|
|
5363
6404
|
await this.page.locator("#task-title").fill(taskTitle);
|
|
5364
6405
|
await this.page.getByTestId("save-select-task-btn").click();
|
|
5365
|
-
await
|
|
6406
|
+
await this.page.locator("#release-header").click();
|
|
6407
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task-title").filter({
|
|
6408
|
+
hasText: taskTitle
|
|
6409
|
+
})).toBeVisible();
|
|
5366
6410
|
}
|
|
5367
6411
|
async getNumberOfTasks() {
|
|
5368
6412
|
return await this.phaseLocator.locator(".task").count();
|
|
@@ -5910,6 +6954,7 @@ class $dbc8f157e7b24b12$export$2edf430132ca35d0 extends (0, $f8721861c660dd88$ex
|
|
|
5910
6954
|
}
|
|
5911
6955
|
|
|
5912
6956
|
|
|
6957
|
+
|
|
5913
6958
|
class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
5914
6959
|
constructor(page){
|
|
5915
6960
|
this.page = page;
|
|
@@ -5934,6 +6979,7 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
|
5934
6979
|
this.releaseGroupPage = new (0, $a6a3c1345fc4767e$export$b6fbc3e67030138f)(page);
|
|
5935
6980
|
this.releaseGroupTimelinePage = new (0, $3fad6a9449b6416f$export$1a0994e9c202d529)(page);
|
|
5936
6981
|
this.releaseListPage = new (0, $87643f2d97b0644e$export$a678525e79c4ccc4)(page);
|
|
6982
|
+
this.releaseGanttPage = new (0, $e8395395d01b66bb$export$5a82be0a2a261cc6)(page);
|
|
5937
6983
|
this.rolesPage = new (0, $84dbf24c796d0540$export$7a5b979a220f477c)(page);
|
|
5938
6984
|
this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
|
|
5939
6985
|
this.workflowCatalogPage = new (0, $7bcc05352d6debcf$export$5628dfd1b9e94785)(page);
|
|
@@ -5954,6 +7000,10 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
|
5954
7000
|
async openRelease(id) {
|
|
5955
7001
|
return this.openReleaseOrTemplate(id, true);
|
|
5956
7002
|
}
|
|
7003
|
+
async openPlannerView(releaseId) {
|
|
7004
|
+
await this.page.goto(`#/releases/${releaseId}/planner`);
|
|
7005
|
+
return new (0, $e8395395d01b66bb$export$5a82be0a2a261cc6)(this.page);
|
|
7006
|
+
}
|
|
5957
7007
|
async openApplicationsPage() {
|
|
5958
7008
|
return new (0, $dc91ece6da6cadfa$export$1533b625ec0c75e2)(this.page).goToApplicationsPage();
|
|
5959
7009
|
}
|
|
@@ -6835,6 +7885,8 @@ const $8977f8672c5de0fa$export$45f0aca2596a2bb3 = function() {
|
|
|
6835
7885
|
processTasks(subTask, task, idx);
|
|
6836
7886
|
});
|
|
6837
7887
|
(0, (/*@__PURE__*/$parcel$interopDefault($952a2b8d8056b381$exports)))(task.templateVariables, function(variable, idx) {
|
|
7888
|
+
if (variable.value !== undefined) // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
7889
|
+
// @ts-ignore
|
|
6838
7890
|
(0, (/*@__PURE__*/$parcel$interopDefault($732eba8dca8b5420$exports)))(variable, getVariableEntity(variable.value, variable.key, task.id, idx));
|
|
6839
7891
|
});
|
|
6840
7892
|
(0, (/*@__PURE__*/$parcel$interopDefault($952a2b8d8056b381$exports)))(task.attachments, function(attachment, idx) {
|
|
@@ -6906,6 +7958,8 @@ const $8977f8672c5de0fa$export$45f0aca2596a2bb3 = function() {
|
|
|
6906
7958
|
attachment.id = `${release.id}/Attachment${index}`;
|
|
6907
7959
|
});
|
|
6908
7960
|
(0, (/*@__PURE__*/$parcel$interopDefault($ae8Uz)))(release.variables, function(variable, index) {
|
|
7961
|
+
if (variable.value !== undefined) // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
7962
|
+
// @ts-ignore
|
|
6909
7963
|
(0, (/*@__PURE__*/$parcel$interopDefault($732eba8dca8b5420$exports)))(variable, getVariableEntity(variable.value, variable.key, release.id, index));
|
|
6910
7964
|
if (variable.valueProvider) (0, (/*@__PURE__*/$parcel$interopDefault($732eba8dca8b5420$exports)))(variable.valueProvider, getValueProviderConfigurationEntity(variable.id));
|
|
6911
7965
|
});
|
|
@@ -6956,12 +8010,14 @@ const $6998c6a53a9eb4fa$export$e0969da9b8fb378d = (0, $kKeXs$playwrighttest.test
|
|
|
6956
8010
|
class $6998c6a53a9eb4fa$var$Fixtures {
|
|
6957
8011
|
archivedReleaseIds = [];
|
|
6958
8012
|
releaseIds = [];
|
|
8013
|
+
riskProfiles = [];
|
|
6959
8014
|
triggerIds = [];
|
|
6960
8015
|
configurationIds = [];
|
|
6961
8016
|
globalVariableIds = [];
|
|
6962
8017
|
folderIds = [];
|
|
6963
8018
|
usernames = [];
|
|
6964
8019
|
userProfiles = [];
|
|
8020
|
+
folderVariableIds = [];
|
|
6965
8021
|
constructor(request, page){
|
|
6966
8022
|
this.request = request;
|
|
6967
8023
|
this.page = page;
|
|
@@ -7013,18 +8069,26 @@ class $6998c6a53a9eb4fa$var$Fixtures {
|
|
|
7013
8069
|
folder.type = "xlrelease.Folder";
|
|
7014
8070
|
let teams = folder.teams;
|
|
7015
8071
|
delete folder.teams;
|
|
7016
|
-
|
|
7017
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */ const children = folder.children || [];
|
|
8072
|
+
const children = folder.children || [];
|
|
7018
8073
|
delete folder.children;
|
|
8074
|
+
const folderVariables = (folder.variables || []).map((variable)=>{
|
|
8075
|
+
variable.folderId = folder.id;
|
|
8076
|
+
return variable;
|
|
8077
|
+
});
|
|
8078
|
+
delete folder.variables;
|
|
7019
8079
|
const response = await this.doPost(`api/v1/folders/${parentId}`, folder);
|
|
7020
8080
|
// Add the folder ID to the list
|
|
7021
8081
|
this.folderIds.push(folder.id);
|
|
7022
8082
|
// If teams are provided, send a request to add teams to the folder
|
|
7023
8083
|
if (teams) {
|
|
7024
8084
|
teams = this.addSystemTeams(teams);
|
|
7025
|
-
|
|
7026
|
-
return newresponse;
|
|
8085
|
+
return await this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
|
|
7027
8086
|
}
|
|
8087
|
+
if (children && children.length > 0) {
|
|
8088
|
+
await this.folderVariable(folderVariables);
|
|
8089
|
+
return await this.folder(children[0]);
|
|
8090
|
+
}
|
|
8091
|
+
if (folderVariables && folderVariables.length > 0) return await this.folderVariable(folderVariables);
|
|
7028
8092
|
return response;
|
|
7029
8093
|
}
|
|
7030
8094
|
createFolder(folderJson) {
|
|
@@ -7033,6 +8097,18 @@ class $6998c6a53a9eb4fa$var$Fixtures {
|
|
|
7033
8097
|
folderJson
|
|
7034
8098
|
]);
|
|
7035
8099
|
}
|
|
8100
|
+
async folderVariable(variable) {
|
|
8101
|
+
// Flatten and process the variables
|
|
8102
|
+
const variables = [].concat(variable).flat()// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
8103
|
+
.map((variable)=>{
|
|
8104
|
+
variable.id = null;
|
|
8105
|
+
variable.type = variable.type || "xlrelease.StringVariable";
|
|
8106
|
+
variable.requiresValue = false;
|
|
8107
|
+
variable.showOnReleaseStart = false;
|
|
8108
|
+
return variable;
|
|
8109
|
+
});
|
|
8110
|
+
return await this.doPost("fixtures/folders/variables", variables);
|
|
8111
|
+
}
|
|
7036
8112
|
trigger(trigger) {
|
|
7037
8113
|
this.triggerIds.push(trigger.id);
|
|
7038
8114
|
return this.doPost("fixtures/trigger", trigger);
|
|
@@ -7046,6 +8122,9 @@ class $6998c6a53a9eb4fa$var$Fixtures {
|
|
|
7046
8122
|
globalRoles(rolePrincipals) {
|
|
7047
8123
|
return this.doPost(`api/v1/roles/${rolePrincipals.name}`, rolePrincipals);
|
|
7048
8124
|
}
|
|
8125
|
+
dashboard(dashboard) {
|
|
8126
|
+
return this.doPost("fixtures/dashboard", dashboard);
|
|
8127
|
+
}
|
|
7049
8128
|
deleteGlobalRole(roleName) {
|
|
7050
8129
|
return this.doDelete(`api/v1/roles/${roleName}`);
|
|
7051
8130
|
}
|
|
@@ -7099,6 +8178,40 @@ class $6998c6a53a9eb4fa$var$Fixtures {
|
|
|
7099
8178
|
variable.showOnReleaseStart = false;
|
|
7100
8179
|
return this.doPost("api/v1/config/Configuration/variables/global", variable);
|
|
7101
8180
|
}
|
|
8181
|
+
addDefaultSmtpServer() {
|
|
8182
|
+
const defaultSmtpServer = [
|
|
8183
|
+
{
|
|
8184
|
+
type: "xlrelease.SmtpServer",
|
|
8185
|
+
id: "Configuration/mail/SmtpServer",
|
|
8186
|
+
host: "localhost",
|
|
8187
|
+
port: "25",
|
|
8188
|
+
fromAddress: "foo@bar.com",
|
|
8189
|
+
authentication: {
|
|
8190
|
+
id: "Configuration/mail/SmtpServer/authentication",
|
|
8191
|
+
type: "xlrelease.NoSmtpAuthentication"
|
|
8192
|
+
}
|
|
8193
|
+
}
|
|
8194
|
+
];
|
|
8195
|
+
return this.doPost("fixtures/", defaultSmtpServer);
|
|
8196
|
+
}
|
|
8197
|
+
riskProfile(riskProfile) {
|
|
8198
|
+
this.riskProfiles.push(riskProfile.id);
|
|
8199
|
+
return this.doPost("fixtures/riskProfiles", riskProfile);
|
|
8200
|
+
}
|
|
8201
|
+
deleteRiskProfile(riskProfileId) {
|
|
8202
|
+
return this.doDelete(`fixtures/riskProfiles/${riskProfileId}`);
|
|
8203
|
+
}
|
|
8204
|
+
// Release delivery pattern
|
|
8205
|
+
createDeliveryPattern(delivery, shouldResetPattern = true) {
|
|
8206
|
+
return this.doPost(`fixtures/deliveries/patterns/${shouldResetPattern}`, delivery);
|
|
8207
|
+
}
|
|
8208
|
+
// Release deliveries
|
|
8209
|
+
createDelivery(delivery) {
|
|
8210
|
+
return this.doPost("fixtures/deliveries", delivery);
|
|
8211
|
+
}
|
|
8212
|
+
deleteDelivery(delivery) {
|
|
8213
|
+
return this.doDelete(`fixtures/deliveries/${delivery}`);
|
|
8214
|
+
}
|
|
7102
8215
|
async cleanAll() {
|
|
7103
8216
|
for (const username of this.usernames)await this.deleteUser(username);
|
|
7104
8217
|
for (const userProfile of this.userProfiles)await this.deleteUserProfile(userProfile);
|