@digital-ai/devops-page-object-release 0.0.26 → 0.0.28
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 +1114 -210
- package/dist/main.js.map +1 -1
- package/dist/module.js +1114 -210
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +262 -54
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1246,9 +1246,12 @@ class $59543fc69900e8db$export$f8e64fcf447db2bf extends (0, $f8721861c660dd88$ex
|
|
|
1246
1246
|
await this.page.locator(".variable-label input").fill(labelname);
|
|
1247
1247
|
if (description) await this.page.locator(".variable-description input").fill(description);
|
|
1248
1248
|
}
|
|
1249
|
-
async selectVariableTextType(
|
|
1249
|
+
async selectVariableTextType(valueName, multiline) {
|
|
1250
1250
|
await this.page.getByRole("combobox").selectOption("StringVariable");
|
|
1251
|
-
|
|
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);
|
|
1252
1255
|
}
|
|
1253
1256
|
async selectVariableListboxType(possiblevalue, defaultValue, required) {
|
|
1254
1257
|
await this.page.getByRole("combobox").selectOption("DropDownListBox");
|
|
@@ -1262,7 +1265,6 @@ class $59543fc69900e8db$export$f8e64fcf447db2bf extends (0, $f8721861c660dd88$ex
|
|
|
1262
1265
|
}
|
|
1263
1266
|
await this.page.locator(".variable-value select").type(defaultValue);
|
|
1264
1267
|
if (required) await this.page.getByRole("checkbox").check();
|
|
1265
|
-
else await this.page.getByRole("checkbox").uncheck();
|
|
1266
1268
|
}
|
|
1267
1269
|
async selectVariablePasswordType(possiblevalue) {
|
|
1268
1270
|
await this.page.getByRole("combobox").selectOption("PasswordStringVariable");
|
|
@@ -1287,9 +1289,10 @@ class $59543fc69900e8db$export$f8e64fcf447db2bf extends (0, $f8721861c660dd88$ex
|
|
|
1287
1289
|
exact: true
|
|
1288
1290
|
}).click();
|
|
1289
1291
|
}
|
|
1290
|
-
async
|
|
1292
|
+
async selectVariableByDate(date, monthYear) {
|
|
1291
1293
|
await this.page.getByRole("combobox").selectOption("DateVariable");
|
|
1292
1294
|
await this.page.getByText("Select date").click();
|
|
1295
|
+
await this.setDate(date, monthYear);
|
|
1293
1296
|
}
|
|
1294
1297
|
async setDate(date, monthYear) {
|
|
1295
1298
|
await this.dateUtil.setDate(date, monthYear);
|
|
@@ -1367,12 +1370,21 @@ class $59543fc69900e8db$export$f8e64fcf447db2bf extends (0, $f8721861c660dd88$ex
|
|
|
1367
1370
|
if (required) await this.page.getByRole("checkbox").check();
|
|
1368
1371
|
else await this.page.getByRole("checkbox").uncheck();
|
|
1369
1372
|
}
|
|
1373
|
+
async clickMultiline() {
|
|
1374
|
+
await this.page.locator("#multiline").click();
|
|
1375
|
+
}
|
|
1370
1376
|
async searchFolderVariable(variableName) {
|
|
1371
1377
|
await this.page.locator(".searchFilter").fill(variableName);
|
|
1372
1378
|
}
|
|
1373
1379
|
async clearFolderVarSearch() {
|
|
1374
1380
|
await this.page.locator(".searchFilter").clear();
|
|
1375
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
|
+
}
|
|
1376
1388
|
}
|
|
1377
1389
|
class $59543fc69900e8db$var$VariableModal extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1378
1390
|
constructor(page){
|
|
@@ -1484,6 +1496,9 @@ class $59543fc69900e8db$var$VariableModal extends (0, $f8721861c660dd88$export$2
|
|
|
1484
1496
|
async setValue(value) {
|
|
1485
1497
|
await this.page.locator(".variable-value input").fill(value);
|
|
1486
1498
|
}
|
|
1499
|
+
async clearValue() {
|
|
1500
|
+
await this.page.locator(".variable-value input").clear();
|
|
1501
|
+
}
|
|
1487
1502
|
async clickMultiline() {
|
|
1488
1503
|
await this.page.locator("#multiline").click();
|
|
1489
1504
|
}
|
|
@@ -1560,6 +1575,123 @@ class $59543fc69900e8db$var$DeleteVariableModel extends (0, $f8721861c660dd88$ex
|
|
|
1560
1575
|
|
|
1561
1576
|
|
|
1562
1577
|
|
|
1578
|
+
class $6c924a95a765a086$export$15d3f9b095bb5188 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1579
|
+
async expectCommentToContain(comment) {
|
|
1580
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".markdown-wrapper").textContent()).toContain(comment);
|
|
1581
|
+
}
|
|
1582
|
+
async expectTaskIsCommentable(isCommentable) {
|
|
1583
|
+
return (0, $kKeXs$playwrighttest.expect)(await this.page.locator("#task-comment").count()).toBe(isCommentable ? 1 : 0);
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
|
|
1588
|
+
|
|
1589
|
+
|
|
1590
|
+
class $f9016705c1a1eb20$export$aa59788fdecae2f2 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1591
|
+
async expectWithAttachment(filename) {
|
|
1592
|
+
const test = this.page.locator(".task-attachments-grid .file-item-text");
|
|
1593
|
+
await test.isVisible();
|
|
1594
|
+
await (0, $kKeXs$playwrighttest.expect)(test).toContainText(filename);
|
|
1595
|
+
}
|
|
1596
|
+
async getAttachmentsListCount() {
|
|
1597
|
+
return await this.page.locator(".file-upload-list div").count();
|
|
1598
|
+
}
|
|
1599
|
+
async uploadFile(filePath) {
|
|
1600
|
+
const fileChooserPromise = this.page.waitForEvent("filechooser");
|
|
1601
|
+
await this.page.getByRole("button", {
|
|
1602
|
+
name: "Select file(s)"
|
|
1603
|
+
}).click();
|
|
1604
|
+
const fileChooser = await fileChooserPromise;
|
|
1605
|
+
await fileChooser.setFiles(filePath);
|
|
1606
|
+
}
|
|
1607
|
+
async downloadFile(filename) {
|
|
1608
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1609
|
+
this.page.on("download", ()=>{});
|
|
1610
|
+
const downloadPromise = this.page.waitForEvent("download");
|
|
1611
|
+
await this.page.locator("li").filter({
|
|
1612
|
+
hasText: "" + filename + ""
|
|
1613
|
+
}).click();
|
|
1614
|
+
await downloadPromise;
|
|
1615
|
+
}
|
|
1616
|
+
async deleteAttachment(fileName) {
|
|
1617
|
+
await this.page.locator("li").filter({
|
|
1618
|
+
hasText: fileName
|
|
1619
|
+
}).click();
|
|
1620
|
+
await this.page.getByLabel("delete file").click();
|
|
1621
|
+
await this.page.getByRole("button", {
|
|
1622
|
+
name: "Delete"
|
|
1623
|
+
}).waitFor({
|
|
1624
|
+
state: "visible"
|
|
1625
|
+
});
|
|
1626
|
+
await this.page.getByRole("button", {
|
|
1627
|
+
name: "Delete"
|
|
1628
|
+
}).click();
|
|
1629
|
+
}
|
|
1630
|
+
async expectWithNoAttachment(tempFile) {
|
|
1631
|
+
const test = await this.page.locator(".task-attachments-grid .file-item-text").count();
|
|
1632
|
+
if (test > 0) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toContainText(tempFile);
|
|
1633
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toBeVisible();
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
|
|
1638
|
+
|
|
1639
|
+
|
|
1640
|
+
class $6e382f24d680cc9b$export$a87b4660f21fba58 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1641
|
+
constructor(page){
|
|
1642
|
+
super(page);
|
|
1643
|
+
}
|
|
1644
|
+
async clickAddAttribute() {
|
|
1645
|
+
await this.page.getByTestId("add-btn").click();
|
|
1646
|
+
}
|
|
1647
|
+
async expectAttributeEditable() {
|
|
1648
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#facet-type")).not.toHaveAttribute("readonly", "");
|
|
1649
|
+
}
|
|
1650
|
+
async addTag(tagName) {
|
|
1651
|
+
await this.page.locator("#task-tags").click();
|
|
1652
|
+
await this.page.locator("#task-tags").fill(tagName);
|
|
1653
|
+
await this.page.locator("#task-tags").press("Enter");
|
|
1654
|
+
}
|
|
1655
|
+
async expectContainsTag(tagName) {
|
|
1656
|
+
if (Array.isArray(tagName)) for (const tag of tagName)await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-tags-wrapper .dot-chip").filter({
|
|
1657
|
+
hasText: tag
|
|
1658
|
+
})).toBeVisible();
|
|
1659
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-tags-wrapper .dot-chip").filter({
|
|
1660
|
+
hasText: tagName
|
|
1661
|
+
})).toBeVisible();
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
|
|
1668
|
+
class $9c0b0c2caed50730$export$d4865631ba74f3e2 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1669
|
+
constructor(page){
|
|
1670
|
+
super(page);
|
|
1671
|
+
this.railLocator = this.page.locator("task-drawer .dot-drawer .task-conditions");
|
|
1672
|
+
this.preconditionToggle = page.getByLabel("Enable precondition");
|
|
1673
|
+
this.textEditor = page.getByRole("textbox");
|
|
1674
|
+
this.saveButton = page.getByTestId("save-btn");
|
|
1675
|
+
}
|
|
1676
|
+
async enablePrecondition() {
|
|
1677
|
+
(0, $kKeXs$playwrighttest.expect)(await this.preconditionToggle.isChecked()).toBe(false);
|
|
1678
|
+
await this.preconditionToggle.check();
|
|
1679
|
+
}
|
|
1680
|
+
async disablePrecondition() {
|
|
1681
|
+
(0, $kKeXs$playwrighttest.expect)(await this.preconditionToggle.isChecked()).toBe(true);
|
|
1682
|
+
await this.preconditionToggle.uncheck();
|
|
1683
|
+
}
|
|
1684
|
+
async setPrecondition(script) {
|
|
1685
|
+
await this.enablePrecondition();
|
|
1686
|
+
await this.textEditor.fill(script);
|
|
1687
|
+
await this.saveButton.dblclick();
|
|
1688
|
+
await this.page.waitForTimeout(1000);
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
|
|
1693
|
+
|
|
1694
|
+
|
|
1563
1695
|
class $8be2ce0eccbe6d27$export$64c93bc7fb9ca44e extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1564
1696
|
constructor(page){
|
|
1565
1697
|
super(page);
|
|
@@ -1619,39 +1751,12 @@ class $8be2ce0eccbe6d27$export$64c93bc7fb9ca44e extends (0, $f8721861c660dd88$ex
|
|
|
1619
1751
|
|
|
1620
1752
|
|
|
1621
1753
|
|
|
1622
|
-
|
|
1623
|
-
class $9c0b0c2caed50730$export$d4865631ba74f3e2 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1624
|
-
constructor(page){
|
|
1625
|
-
super(page);
|
|
1626
|
-
this.railLocator = this.page.locator("task-drawer .dot-drawer .task-conditions");
|
|
1627
|
-
this.preconditionToggle = page.getByLabel("Enable precondition");
|
|
1628
|
-
this.textEditor = page.getByRole("textbox");
|
|
1629
|
-
this.saveButton = page.getByTestId("save-btn");
|
|
1630
|
-
}
|
|
1631
|
-
async enablePrecondition() {
|
|
1632
|
-
(0, $kKeXs$playwrighttest.expect)(await this.preconditionToggle.isChecked()).toBe(false);
|
|
1633
|
-
await this.preconditionToggle.check();
|
|
1634
|
-
}
|
|
1635
|
-
async disablePrecondition() {
|
|
1636
|
-
(0, $kKeXs$playwrighttest.expect)(await this.preconditionToggle.isChecked()).toBe(true);
|
|
1637
|
-
await this.preconditionToggle.uncheck();
|
|
1638
|
-
}
|
|
1639
|
-
async setPrecondition(script) {
|
|
1640
|
-
await this.enablePrecondition();
|
|
1641
|
-
await this.textEditor.fill(script);
|
|
1642
|
-
await this.saveButton.dblclick();
|
|
1643
|
-
await this.page.waitForTimeout(1000);
|
|
1644
|
-
}
|
|
1645
|
-
}
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
1754
|
class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1651
1755
|
constructor(page){
|
|
1652
1756
|
super(page);
|
|
1653
|
-
this.railLocator = this.page.locator("task-drawer .dot-drawer .task-drawer-content");
|
|
1654
1757
|
this.dependency = new $eb81c1b930e440ff$export$fbbf45eff21470e3(page);
|
|
1758
|
+
this.railLocator = this.page.locator("task-drawer .dot-drawer .task-drawer-content");
|
|
1759
|
+
this.scriptTextArea = this.page.locator(".code-editor textarea.ace_text-input");
|
|
1655
1760
|
}
|
|
1656
1761
|
async openInputProperties() {
|
|
1657
1762
|
await this.railLocator.locator(".task-config-header").getByText("Input properties").click();
|
|
@@ -1699,9 +1804,26 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
1699
1804
|
async setVariable(propertyName, variableName) {
|
|
1700
1805
|
await this.railLocator.locator(`input[id="${propertyName}"]`).fill(variableName);
|
|
1701
1806
|
}
|
|
1807
|
+
async expectVariable(propertyName) {
|
|
1808
|
+
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`input[id="${propertyName}"]`)).toBeVisible();
|
|
1809
|
+
}
|
|
1702
1810
|
async expectValueFromString(propertyName, propertyValue) {
|
|
1703
1811
|
return await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`)).toHaveText(propertyValue);
|
|
1704
1812
|
}
|
|
1813
|
+
async expectTo(value) {
|
|
1814
|
+
return await (0, $kKeXs$playwrighttest.expect)(this.railLocator.getByTestId(`dot-autocomplete-chip`)).toHaveText(value);
|
|
1815
|
+
}
|
|
1816
|
+
async expectSubjectToBe(value) {
|
|
1817
|
+
return (0, $kKeXs$playwrighttest.expect)(await this.page.locator("#notification-subject").getAttribute("value")).toContain(value);
|
|
1818
|
+
}
|
|
1819
|
+
async expectBodyToBe(value) {
|
|
1820
|
+
return await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".notification-body-field p")).toHaveText(value);
|
|
1821
|
+
}
|
|
1822
|
+
async setBody(value) {
|
|
1823
|
+
await this.page.locator(".notification-body-field p").dblclick();
|
|
1824
|
+
await this.page.locator(".notification-body-field #notification-body").fill(value);
|
|
1825
|
+
await this.page.getByTestId(`save-button`).click();
|
|
1826
|
+
}
|
|
1705
1827
|
async setValueFromMap(propertyName, key, value) {
|
|
1706
1828
|
await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.add-new-button`).click();
|
|
1707
1829
|
await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] input[id="new-row-key-input"]`).fill(key);
|
|
@@ -1709,29 +1831,29 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
1709
1831
|
await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.map-row-save-button`).click();
|
|
1710
1832
|
}
|
|
1711
1833
|
async setScript(script) {
|
|
1712
|
-
await this.
|
|
1713
|
-
await this.
|
|
1834
|
+
await this.scriptTextArea.clear();
|
|
1835
|
+
await this.scriptTextArea.fill(script);
|
|
1714
1836
|
await this.page.locator('.code-editor .header button:has-text("Save")').click();
|
|
1715
1837
|
}
|
|
1716
1838
|
async expectScriptToContain(script) {
|
|
1717
1839
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".code-editor .ace_content")).toContainText(script);
|
|
1718
1840
|
}
|
|
1719
1841
|
async enterScriptForAutoComplete(script) {
|
|
1720
|
-
await this.
|
|
1721
|
-
await this.
|
|
1722
|
-
await this.
|
|
1842
|
+
await this.scriptTextArea.clear();
|
|
1843
|
+
await this.scriptTextArea.fill(script);
|
|
1844
|
+
await this.scriptTextArea.press(".");
|
|
1723
1845
|
}
|
|
1724
1846
|
async openScriptEditorInSeparateWindow() {
|
|
1725
1847
|
await this.page.getByTestId("fullscreen-enter-btn").click();
|
|
1726
|
-
(0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).toBeVisible();
|
|
1848
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).toBeVisible();
|
|
1727
1849
|
}
|
|
1728
1850
|
async closeFullscreenScriptWindowWithESC() {
|
|
1729
1851
|
await this.page.locator("#dialogTitle").press("Escape");
|
|
1730
|
-
(0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
|
|
1852
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
|
|
1731
1853
|
}
|
|
1732
1854
|
async closeFullscreenScriptWindow() {
|
|
1733
1855
|
await this.page.getByTestId("fullscreen-exit-btn").click();
|
|
1734
|
-
(0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
|
|
1856
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
|
|
1735
1857
|
}
|
|
1736
1858
|
async abort(comment) {
|
|
1737
1859
|
await this.page.getByTestId("single-action-button").click();
|
|
@@ -1768,6 +1890,10 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
1768
1890
|
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".add-dependency-btn")).toBeVisible();
|
|
1769
1891
|
await this.railLocator.locator(".add-dependency-btn").click();
|
|
1770
1892
|
}
|
|
1893
|
+
async addCondition() {
|
|
1894
|
+
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.getByTestId("add-condition")).toBeVisible();
|
|
1895
|
+
await this.railLocator.getByTestId("add-condition").click();
|
|
1896
|
+
}
|
|
1771
1897
|
async expectDependencyText(dependencies) {
|
|
1772
1898
|
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
|
|
1773
1899
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.gate-task-dependencies`).getByLabel(dependencies).first()).toBeVisible();
|
|
@@ -1789,21 +1915,29 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
1789
1915
|
}).click();
|
|
1790
1916
|
}
|
|
1791
1917
|
}
|
|
1792
|
-
async
|
|
1918
|
+
async validateAutoCompleteOptionsInDescription(descriptionName, expectedVariableCount, variableToSelection) {
|
|
1793
1919
|
await this.page.getByLabel("Double-click to edit").waitFor({
|
|
1794
1920
|
timeout: 10000
|
|
1795
1921
|
});
|
|
1796
1922
|
await this.page.getByLabel("Double-click to edit").hover();
|
|
1797
1923
|
await this.page.locator(".markdown-viewer-actions").getByTestId("edit-button").click();
|
|
1798
1924
|
await this.page.locator("#task-description-input").fill(descriptionName);
|
|
1799
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-popper-content-wrapper .option-name")).toHaveCount(
|
|
1800
|
-
await this.page.locator(".dot-popper-content-wrapper .option-name").filter({
|
|
1801
|
-
hasText:
|
|
1925
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-popper-content-wrapper .option-name")).toHaveCount(expectedVariableCount);
|
|
1926
|
+
if (variableToSelection) await this.page.locator(".dot-popper-content-wrapper .option-name").filter({
|
|
1927
|
+
hasText: variableToSelection
|
|
1802
1928
|
}).click();
|
|
1803
1929
|
await this.page.getByRole("button", {
|
|
1804
1930
|
name: "Save"
|
|
1805
1931
|
}).click();
|
|
1806
|
-
|
|
1932
|
+
}
|
|
1933
|
+
// eslint-disable-next-line max-params
|
|
1934
|
+
async validateAutoCompleteOptions(fieldLabel, value, expectedVariableCount, variableToSelect) {
|
|
1935
|
+
await this.page.getByLabel(fieldLabel).click();
|
|
1936
|
+
await this.page.getByLabel(fieldLabel).fill(value);
|
|
1937
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("option")).toHaveCount(expectedVariableCount);
|
|
1938
|
+
if (variableToSelect) await this.page.getByRole("option", {
|
|
1939
|
+
name: variableToSelect
|
|
1940
|
+
}).click();
|
|
1807
1941
|
}
|
|
1808
1942
|
async setReleaseTitle(releaseName) {
|
|
1809
1943
|
await this.page.getByLabel("Release title *").fill(releaseName);
|
|
@@ -1883,6 +2017,73 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
1883
2017
|
name: "Abort"
|
|
1884
2018
|
}).isVisible()).toBe(visible);
|
|
1885
2019
|
}
|
|
2020
|
+
async setPattern(patternName) {
|
|
2021
|
+
await this.page.locator("#patternId").click();
|
|
2022
|
+
await this.page.locator("#patternId").fill(patternName);
|
|
2023
|
+
await this.page.getByRole("option", {
|
|
2024
|
+
name: patternName
|
|
2025
|
+
}).click();
|
|
2026
|
+
}
|
|
2027
|
+
async setStartDate(date) {
|
|
2028
|
+
await this.page.locator("#startDate").click();
|
|
2029
|
+
await this.page.locator("#startDate").fill(date);
|
|
2030
|
+
}
|
|
2031
|
+
async setEndDate(date) {
|
|
2032
|
+
await this.page.locator("#endDate").click();
|
|
2033
|
+
await this.page.locator("#endDate").fill(date);
|
|
2034
|
+
}
|
|
2035
|
+
async clickVariableButton(objectID, variableValue) {
|
|
2036
|
+
await this.page.locator(`div[data-testid="${objectID}"] .icon-variable`).click();
|
|
2037
|
+
await this.page.locator(`#${objectID}`).fill(variableValue);
|
|
2038
|
+
await this.page.getByRole("option", {
|
|
2039
|
+
name: variableValue
|
|
2040
|
+
}).click();
|
|
2041
|
+
}
|
|
2042
|
+
async enableFallback() {
|
|
2043
|
+
await this.page.getByLabel("Fallback").check();
|
|
2044
|
+
}
|
|
2045
|
+
async expectDescription(description) {
|
|
2046
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("dot-accordion-details")).toHaveText(description);
|
|
2047
|
+
}
|
|
2048
|
+
async editDescription(description) {
|
|
2049
|
+
await this.page.getByLabel("Double-click to edit").waitFor({
|
|
2050
|
+
timeout: 10000
|
|
2051
|
+
});
|
|
2052
|
+
await this.page.getByLabel("Double-click to edit").hover();
|
|
2053
|
+
await this.page.locator(".markdown-viewer-actions").getByTestId("edit-button").click();
|
|
2054
|
+
await this.page.locator("#task-description-input").clear();
|
|
2055
|
+
await this.page.locator("#task-description-input").fill(description);
|
|
2056
|
+
await this.page.getByRole("button", {
|
|
2057
|
+
name: "Save"
|
|
2058
|
+
}).click();
|
|
2059
|
+
}
|
|
2060
|
+
async expectedGateConditionDisplayed(title) {
|
|
2061
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".gate-task-condition-input").filter({
|
|
2062
|
+
hasText: title
|
|
2063
|
+
})).toBeVisible();
|
|
2064
|
+
}
|
|
2065
|
+
async expectScriptEditable() {
|
|
2066
|
+
await this.page.locator("div.ace_content").click();
|
|
2067
|
+
await (0, $kKeXs$playwrighttest.expect)(this.scriptTextArea).not.toHaveAttribute("disabled", "");
|
|
2068
|
+
await (0, $kKeXs$playwrighttest.expect)(this.scriptTextArea).not.toHaveAttribute("readonly", "");
|
|
2069
|
+
}
|
|
2070
|
+
async expectInputPropertiesEditable(propertyName) {
|
|
2071
|
+
if (typeof propertyName !== "string") for (const pName of propertyName){
|
|
2072
|
+
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`input[id="${pName}"]`)).not.toHaveAttribute("disabled", "");
|
|
2073
|
+
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`input[id="${pName}"]`)).not.toHaveAttribute("readonly", "");
|
|
2074
|
+
}
|
|
2075
|
+
else {
|
|
2076
|
+
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`input[id="${propertyName}"]`)).not.toHaveAttribute("disabled", "");
|
|
2077
|
+
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`input[id="${propertyName}"]`)).not.toHaveAttribute("readonly", "");
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
async setSelectField(fieldName, fieldValue) {
|
|
2081
|
+
await this.page.getByTestId(`${fieldName}-input`).click();
|
|
2082
|
+
const closeIcon = this.page.getByTestId(`CloseIcon`);
|
|
2083
|
+
if (await closeIcon.isVisible()) await closeIcon.click();
|
|
2084
|
+
await this.page.getByTestId(`${fieldName}-input`).fill(fieldValue);
|
|
2085
|
+
await this.page.getByText(fieldValue).click();
|
|
2086
|
+
}
|
|
1886
2087
|
}
|
|
1887
2088
|
class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1888
2089
|
constructor(page){
|
|
@@ -1894,18 +2095,15 @@ class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$ex
|
|
|
1894
2095
|
}
|
|
1895
2096
|
async getRelease() {
|
|
1896
2097
|
await this.release.isVisible();
|
|
1897
|
-
|
|
1898
|
-
return releaseValue;
|
|
2098
|
+
return await this.release.getAttribute("value");
|
|
1899
2099
|
}
|
|
1900
2100
|
async getPhase() {
|
|
1901
2101
|
await this.phase.isVisible();
|
|
1902
|
-
|
|
1903
|
-
return phaseValue;
|
|
2102
|
+
return await this.phase.getAttribute("value");
|
|
1904
2103
|
}
|
|
1905
2104
|
async getTask() {
|
|
1906
2105
|
await this.task.isVisible();
|
|
1907
|
-
|
|
1908
|
-
return taskValue;
|
|
2106
|
+
return await this.task.getAttribute("value");
|
|
1909
2107
|
}
|
|
1910
2108
|
async setRelease(releaseTitle) {
|
|
1911
2109
|
await this.release.click();
|
|
@@ -1949,8 +2147,8 @@ class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$ex
|
|
|
1949
2147
|
}
|
|
1950
2148
|
async expectVariableModeEnabled(mode) {
|
|
1951
2149
|
await (0, $kKeXs$playwrighttest.expect)(this.dependencyLocator.getByLabel("input-variable")).toBeVisible();
|
|
1952
|
-
const
|
|
1953
|
-
(0, $kKeXs$playwrighttest.expect)(
|
|
2150
|
+
const variableMode = await this.dependencyLocator.getByLabel("input-variable").getAttribute("aria-pressed");
|
|
2151
|
+
(0, $kKeXs$playwrighttest.expect)(variableMode).toBe("" + mode + "");
|
|
1954
2152
|
}
|
|
1955
2153
|
async clickVariable() {
|
|
1956
2154
|
await this.dependencyLocator.getByLabel("input-variable").waitFor();
|
|
@@ -1964,15 +2162,15 @@ class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$ex
|
|
|
1964
2162
|
(0, $kKeXs$playwrighttest.expect)(options[i]).toContain(option);
|
|
1965
2163
|
}
|
|
1966
2164
|
}
|
|
1967
|
-
async enterNewVariable(
|
|
2165
|
+
async enterNewVariable(variableName) {
|
|
1968
2166
|
await this.page.getByLabel("Please select a variable of").click();
|
|
1969
|
-
await this.page.getByLabel("Please select a variable of").fill(
|
|
2167
|
+
await this.page.getByLabel("Please select a variable of").fill(variableName);
|
|
1970
2168
|
await this.page.getByTestId("dot-action-item-btn").click();
|
|
1971
2169
|
}
|
|
1972
|
-
async selectVariable(
|
|
2170
|
+
async selectVariable(variableName) {
|
|
1973
2171
|
await this.page.getByLabel("Please select a variable of").click();
|
|
1974
2172
|
await this.page.getByRole("option", {
|
|
1975
|
-
name:
|
|
2173
|
+
name: variableName
|
|
1976
2174
|
}).click();
|
|
1977
2175
|
}
|
|
1978
2176
|
}
|
|
@@ -1980,72 +2178,13 @@ class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$ex
|
|
|
1980
2178
|
|
|
1981
2179
|
|
|
1982
2180
|
|
|
1983
|
-
class $6c924a95a765a086$export$15d3f9b095bb5188 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1984
|
-
async expectCommentToContain(text) {
|
|
1985
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-comment .markdown-wrapper p")).toContainText(text);
|
|
1986
|
-
}
|
|
1987
|
-
async expectTaskIsCommentable(isCommentable) {
|
|
1988
|
-
(0, $kKeXs$playwrighttest.expect)(await this.page.locator("#task-comment").count()).toBe(isCommentable ? 1 : 0);
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
class $f9016705c1a1eb20$export$aa59788fdecae2f2 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1996
|
-
async expectWithAttachment(filename) {
|
|
1997
|
-
const test = this.page.locator(".task-attachments-grid .file-item-text");
|
|
1998
|
-
await test.isVisible();
|
|
1999
|
-
await (0, $kKeXs$playwrighttest.expect)(test).toContainText(filename);
|
|
2000
|
-
}
|
|
2001
|
-
async getAttachmentsListCount() {
|
|
2002
|
-
return await this.page.locator(".file-upload-list div").count();
|
|
2003
|
-
}
|
|
2004
|
-
async uploadFile(filePath) {
|
|
2005
|
-
const fileChooserPromise = this.page.waitForEvent("filechooser");
|
|
2006
|
-
await this.page.getByRole("button", {
|
|
2007
|
-
name: "Select file(s)"
|
|
2008
|
-
}).click();
|
|
2009
|
-
const fileChooser = await fileChooserPromise;
|
|
2010
|
-
await fileChooser.setFiles(filePath);
|
|
2011
|
-
}
|
|
2012
|
-
async downloadFile(filename) {
|
|
2013
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2014
|
-
this.page.on("download", ()=>{});
|
|
2015
|
-
const downloadPromise = this.page.waitForEvent("download");
|
|
2016
|
-
await this.page.locator("li").filter({
|
|
2017
|
-
hasText: "" + filename + ""
|
|
2018
|
-
}).click();
|
|
2019
|
-
await downloadPromise;
|
|
2020
|
-
}
|
|
2021
|
-
async deleteAttachment(fileName) {
|
|
2022
|
-
await this.page.locator("li").filter({
|
|
2023
|
-
hasText: fileName
|
|
2024
|
-
}).click();
|
|
2025
|
-
await this.page.getByLabel("delete file").click();
|
|
2026
|
-
await this.page.getByRole("button", {
|
|
2027
|
-
name: "Delete"
|
|
2028
|
-
}).waitFor({
|
|
2029
|
-
state: "visible"
|
|
2030
|
-
});
|
|
2031
|
-
await this.page.getByRole("button", {
|
|
2032
|
-
name: "Delete"
|
|
2033
|
-
}).click();
|
|
2034
|
-
}
|
|
2035
|
-
async expectWithNoAttachment(tempFile) {
|
|
2036
|
-
const test = await this.page.locator(".task-attachments-grid .file-item-text").count();
|
|
2037
|
-
if (test > 0) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toContainText(tempFile);
|
|
2038
|
-
else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toBeVisible();
|
|
2039
|
-
}
|
|
2040
|
-
}
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
2181
|
|
|
2044
2182
|
|
|
2045
2183
|
|
|
2046
|
-
class $1fbdec5dc9cde599$export$
|
|
2184
|
+
class $1fbdec5dc9cde599$export$e3515314c13bc477 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2047
2185
|
constructor(page){
|
|
2048
2186
|
super(page);
|
|
2187
|
+
this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
|
|
2049
2188
|
}
|
|
2050
2189
|
async expectStartDateToBeDisplayed() {
|
|
2051
2190
|
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".flex-section.column").filter({
|
|
@@ -2057,26 +2196,84 @@ class $1fbdec5dc9cde599$export$b7be47b40aa877fc extends (0, $f8721861c660dd88$ex
|
|
|
2057
2196
|
hasText: "End Date"
|
|
2058
2197
|
}).locator(".task-date-view-content").isVisible()).toBe(true);
|
|
2059
2198
|
}
|
|
2199
|
+
async switchWaitForScheduledDate() {
|
|
2200
|
+
await this.page.locator(".wait-for-start input").click();
|
|
2201
|
+
}
|
|
2202
|
+
async expectWaitForScheduledDateToBeChecked() {
|
|
2203
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".wait-for-start input")).toBeChecked();
|
|
2204
|
+
}
|
|
2205
|
+
async expectWaitForScheduledDateToBeUnchecked() {
|
|
2206
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".wait-for-start input")).not.toBeChecked();
|
|
2207
|
+
}
|
|
2208
|
+
async setDueTime(day, hour, minute) {
|
|
2209
|
+
await this.page.locator(".duration-view-content").click();
|
|
2210
|
+
if (day) {
|
|
2211
|
+
await this.page.locator("#days").clear();
|
|
2212
|
+
await this.page.locator("#days").fill(day);
|
|
2213
|
+
}
|
|
2214
|
+
if (hour) {
|
|
2215
|
+
await this.page.locator("#hours").clear();
|
|
2216
|
+
await this.page.locator("#hours").fill(hour);
|
|
2217
|
+
}
|
|
2218
|
+
if (minute) {
|
|
2219
|
+
await this.page.locator("#minutes").clear();
|
|
2220
|
+
await this.page.locator("#minutes").fill(minute);
|
|
2221
|
+
}
|
|
2222
|
+
await this.page.getByTestId("save-button").click();
|
|
2223
|
+
}
|
|
2224
|
+
async setStartDate(date, monthYear) {
|
|
2225
|
+
await this.page.locator(".flex-section.column").filter({
|
|
2226
|
+
hasText: "Start date"
|
|
2227
|
+
}).locator(".task-date").waitFor({
|
|
2228
|
+
timeout: 10000
|
|
2229
|
+
});
|
|
2230
|
+
await this.page.locator(".flex-section.column").filter({
|
|
2231
|
+
hasText: "Start date"
|
|
2232
|
+
}).locator(".task-date").click();
|
|
2233
|
+
await this.setDate(date, monthYear);
|
|
2234
|
+
}
|
|
2235
|
+
async setEndDate(date, monthYear) {
|
|
2236
|
+
await this.page.locator(".flex-section.column").filter({
|
|
2237
|
+
hasText: "End date"
|
|
2238
|
+
}).locator(".task-date").waitFor({
|
|
2239
|
+
timeout: 10000
|
|
2240
|
+
});
|
|
2241
|
+
await this.page.locator(".flex-section.column").filter({
|
|
2242
|
+
hasText: "End date"
|
|
2243
|
+
}).locator(".task-date").click();
|
|
2244
|
+
await this.setDate(date, monthYear);
|
|
2245
|
+
}
|
|
2246
|
+
async setDate(date, monthYear) {
|
|
2247
|
+
const prev = this.page.getByTestId("ArrowLeftIcon");
|
|
2248
|
+
const next = this.page.getByTestId("ArrowRightIcon");
|
|
2249
|
+
const monYear = this.page.locator(".MuiPickersCalendarHeader-label");
|
|
2250
|
+
const currentDate = await monYear.textContent();
|
|
2251
|
+
const thisMonth = (0, ($parcel$interopDefault($kKeXs$moment)))(monthYear, "MMMM YYYY").isBefore(currentDate);
|
|
2252
|
+
while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
|
|
2253
|
+
else await next.click();
|
|
2254
|
+
await this.page.getByRole("gridcell", {
|
|
2255
|
+
name: "" + date + "",
|
|
2256
|
+
exact: true
|
|
2257
|
+
}).first().click();
|
|
2258
|
+
}
|
|
2060
2259
|
}
|
|
2061
2260
|
|
|
2062
2261
|
|
|
2262
|
+
|
|
2063
2263
|
class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2064
2264
|
constructor(page){
|
|
2065
2265
|
super(page);
|
|
2066
|
-
this.
|
|
2067
|
-
this.
|
|
2068
|
-
|
|
2069
|
-
});
|
|
2266
|
+
this.activity = new (0, $6c924a95a765a086$export$15d3f9b095bb5188)(page);
|
|
2267
|
+
this.attachment = new (0, $f9016705c1a1eb20$export$aa59788fdecae2f2)(page);
|
|
2268
|
+
this.attribute = new (0, $6e382f24d680cc9b$export$a87b4660f21fba58)(page);
|
|
2070
2269
|
this.cancelButton = this.page.getByTestId("task-action-cancel");
|
|
2071
2270
|
this.commentBox = this.page.getByTestId("task-action-comment");
|
|
2072
2271
|
this.confirm = this.page.locator(".popper-action-buttons").getByTestId("dot-button");
|
|
2073
|
-
this.activity = new (0, $6c924a95a765a086$export$15d3f9b095bb5188)(page);
|
|
2074
|
-
this.attachment = new (0, $f9016705c1a1eb20$export$aa59788fdecae2f2)(page);
|
|
2075
2272
|
this.config = new (0, $8be2ce0eccbe6d27$export$64c93bc7fb9ca44e)(page);
|
|
2076
2273
|
this.condition = new (0, $9c0b0c2caed50730$export$d4865631ba74f3e2)(page);
|
|
2077
|
-
this.
|
|
2078
|
-
|
|
2079
|
-
|
|
2274
|
+
this.completeButton = this.page.getByRole("button", {
|
|
2275
|
+
name: "Complete",
|
|
2276
|
+
exact: true
|
|
2080
2277
|
});
|
|
2081
2278
|
this.failMenu = this.page.getByRole("menuitem", {
|
|
2082
2279
|
name: "Fail"
|
|
@@ -2085,10 +2282,16 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
2085
2282
|
name: "arrow-down icon",
|
|
2086
2283
|
exact: true
|
|
2087
2284
|
});
|
|
2088
|
-
this.
|
|
2089
|
-
|
|
2090
|
-
|
|
2285
|
+
this.overview = new (0, $eb81c1b930e440ff$export$519356f6c50361f7)(page);
|
|
2286
|
+
this.retryButton = this.page.getByRole("button", {
|
|
2287
|
+
name: "Retry"
|
|
2091
2288
|
});
|
|
2289
|
+
this.scheduling = new (0, $1fbdec5dc9cde599$export$e3515314c13bc477)(page);
|
|
2290
|
+
this.startButton = this.page.getByTestId("single-action-button");
|
|
2291
|
+
this.skipMenu = this.page.getByRole("menuitem", {
|
|
2292
|
+
name: "Skip"
|
|
2293
|
+
});
|
|
2294
|
+
this.taskDrawerLocator = this.page.locator("task-drawer .dot-drawer");
|
|
2092
2295
|
}
|
|
2093
2296
|
async openOverviewRail() {
|
|
2094
2297
|
await this.openRail("Overview");
|
|
@@ -2098,7 +2301,7 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
2098
2301
|
}
|
|
2099
2302
|
async openSchedulingRail() {
|
|
2100
2303
|
await this.openRail("Scheduling");
|
|
2101
|
-
return new (0, $1fbdec5dc9cde599$export$
|
|
2304
|
+
return new (0, $1fbdec5dc9cde599$export$e3515314c13bc477)(this.page);
|
|
2102
2305
|
}
|
|
2103
2306
|
async openConditionRail() {
|
|
2104
2307
|
await this.openRail("Conditions");
|
|
@@ -2141,9 +2344,21 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
2141
2344
|
await this.commentBox.fill(comment);
|
|
2142
2345
|
await this.confirm.click();
|
|
2143
2346
|
}
|
|
2347
|
+
async startNow(comment) {
|
|
2348
|
+
await this.startButton.click();
|
|
2349
|
+
await this.commentBox.fill(comment);
|
|
2350
|
+
await this.page.getByTestId("dot-button").click();
|
|
2351
|
+
await (0, $kKeXs$playwrighttest.expect)(this.startButton).not.toBeVisible();
|
|
2352
|
+
}
|
|
2144
2353
|
async expectTaskTitle(taskTitle) {
|
|
2145
2354
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-drawer .task-title-input .dot-view-mode-typography")).toContainText(taskTitle);
|
|
2146
2355
|
}
|
|
2356
|
+
async setTitle(title) {
|
|
2357
|
+
await this.page.getByTestId("task-title-input-view-mode-typography").click();
|
|
2358
|
+
await this.page.getByTestId("task-title-input-input").clear();
|
|
2359
|
+
await this.page.getByTestId("task-title-input-input").fill(title);
|
|
2360
|
+
await this.page.getByTestId("task-title-input-input").press("Enter");
|
|
2361
|
+
}
|
|
2147
2362
|
async expectTypeToContain(taskType) {
|
|
2148
2363
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-drawer .task-type")).toContainText(taskType);
|
|
2149
2364
|
}
|
|
@@ -2168,26 +2383,16 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
2168
2383
|
name: username
|
|
2169
2384
|
})).toBeVisible();
|
|
2170
2385
|
}
|
|
2171
|
-
async
|
|
2172
|
-
await (0, $kKeXs$playwrighttest.expect)(this.
|
|
2173
|
-
|
|
2174
|
-
async startNow(comment) {
|
|
2175
|
-
await this.page.getByTestId("single-action-button").click();
|
|
2176
|
-
await this.page.getByTestId("task-action-comment").fill(comment);
|
|
2177
|
-
await this.page.getByTestId("dot-button").click();
|
|
2178
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("single-action-button")).not.toBeVisible();
|
|
2179
|
-
}
|
|
2180
|
-
async expectCommentsToContain(text) {
|
|
2181
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-comment-body .markdown-wrapper p")).toContainText(text);
|
|
2182
|
-
}
|
|
2183
|
-
async switchWaitForScheduledDate() {
|
|
2184
|
-
await this.page.locator(".wait-for-start input").click();
|
|
2185
|
-
}
|
|
2186
|
-
async expectWaitForScheduledDateToBeChecked() {
|
|
2187
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".wait-for-start input")).toBeChecked();
|
|
2386
|
+
async expectStartButtonToBeEnabled(isEnabled = true) {
|
|
2387
|
+
if (isEnabled) await (0, $kKeXs$playwrighttest.expect)(this.startButton).toBeEnabled();
|
|
2388
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.startButton).not.toBeEnabled();
|
|
2188
2389
|
}
|
|
2189
|
-
async
|
|
2190
|
-
await
|
|
2390
|
+
async startTask(comment) {
|
|
2391
|
+
await this.startButton.click();
|
|
2392
|
+
await this.completeButton.click();
|
|
2393
|
+
await this.commentBox.fill(comment);
|
|
2394
|
+
await this.completeButton.click();
|
|
2395
|
+
await (0, $kKeXs$playwrighttest.expect)(this.startButton).not.toBeVisible();
|
|
2191
2396
|
}
|
|
2192
2397
|
// Other locators are flaky and it can be replaced if we get locator change in the frontend
|
|
2193
2398
|
async clickOnStartDate() {
|
|
@@ -2247,10 +2452,12 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
2247
2452
|
|
|
2248
2453
|
|
|
2249
2454
|
|
|
2455
|
+
|
|
2250
2456
|
class $e8395395d01b66bb$export$5a82be0a2a261cc6 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2251
2457
|
constructor(page){
|
|
2252
2458
|
super(page);
|
|
2253
2459
|
this.releaseHeader = this.page.locator(".release-header");
|
|
2460
|
+
this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
|
|
2254
2461
|
}
|
|
2255
2462
|
async enableShowDates() {
|
|
2256
2463
|
await this.page.locator("#toggleIsDatesColumnsShown").check();
|
|
@@ -2264,6 +2471,105 @@ class $e8395395d01b66bb$export$5a82be0a2a261cc6 extends (0, $f8721861c660dd88$ex
|
|
|
2264
2471
|
async expectPlanningDateColumnsShown() {
|
|
2265
2472
|
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`#gantt .gantt_grid_data .gantt_row`).first().locator(`.gantt_cell`).count()).toEqual(4);
|
|
2266
2473
|
}
|
|
2474
|
+
async expectReleaseOnBreadcrumb(title) {
|
|
2475
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
|
|
2476
|
+
name: title
|
|
2477
|
+
})).toBeVisible();
|
|
2478
|
+
}
|
|
2479
|
+
async expectPhaseDisplayed(phaseName) {
|
|
2480
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTitle(phaseName, {
|
|
2481
|
+
exact: true
|
|
2482
|
+
})).toBeVisible();
|
|
2483
|
+
}
|
|
2484
|
+
async expectTaskDisplayed(taskName, isDisplayed = true) {
|
|
2485
|
+
if (isDisplayed) await (0, $kKeXs$playwrighttest.expect)(this.page.getByTitle(taskName)).toBeVisible();
|
|
2486
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.page.getByTitle(taskName)).not.toBeVisible();
|
|
2487
|
+
}
|
|
2488
|
+
async expandGanttTree(title) {
|
|
2489
|
+
return await this.page.locator(".gantt_cell").filter({
|
|
2490
|
+
hasText: title
|
|
2491
|
+
}).locator(".gantt_open").click();
|
|
2492
|
+
}
|
|
2493
|
+
async expectDifferentWidth(title1, title2) {
|
|
2494
|
+
const releaseWidth = await this.page.locator(`.gantt_task_content`).getByText(title1, {
|
|
2495
|
+
exact: true
|
|
2496
|
+
}).getAttribute("style");
|
|
2497
|
+
const PhaseWidth = await this.page.locator(`.gantt_task_content`).getByText(title2, {
|
|
2498
|
+
exact: true
|
|
2499
|
+
}).getAttribute("style");
|
|
2500
|
+
return (0, $kKeXs$playwrighttest.expect)(releaseWidth).not.toEqual(PhaseWidth);
|
|
2501
|
+
}
|
|
2502
|
+
async expectSameWidth(title1, title2) {
|
|
2503
|
+
const releaseWidth = await this.page.locator(`.gantt_task_content`).getByText(title1, {
|
|
2504
|
+
exact: true
|
|
2505
|
+
}).getAttribute("style");
|
|
2506
|
+
const PhaseWidth = await this.page.locator(`.gantt_task_content`).getByText(title2, {
|
|
2507
|
+
exact: true
|
|
2508
|
+
}).getAttribute("style");
|
|
2509
|
+
return (0, $kKeXs$playwrighttest.expect)(releaseWidth).toEqual(PhaseWidth);
|
|
2510
|
+
}
|
|
2511
|
+
async expectElementWithClasses(title, classes) {
|
|
2512
|
+
const eleNumber = await this.page.locator(`.${classes.join(".")}`).locator(`.gantt_task_content`).getByText(title, {
|
|
2513
|
+
exact: true
|
|
2514
|
+
}).count();
|
|
2515
|
+
return (0, $kKeXs$playwrighttest.expect)(eleNumber).toBe(1);
|
|
2516
|
+
}
|
|
2517
|
+
async resizeToDayIndex(title, index) {
|
|
2518
|
+
await this.page.locator(`#gantt .gantt_container .gantt_task_line`).filter({
|
|
2519
|
+
hasText: title
|
|
2520
|
+
}).click();
|
|
2521
|
+
await this.page.locator(`.gantt_task_line`).filter({
|
|
2522
|
+
hasText: title
|
|
2523
|
+
}).locator(`.gantt_task_drag.task_right`).hover();
|
|
2524
|
+
const objId = await this.page.locator(`.gantt_task_line`).filter({
|
|
2525
|
+
hasText: title
|
|
2526
|
+
}).getAttribute("task_id");
|
|
2527
|
+
await this.page.mouse.down();
|
|
2528
|
+
await this.page.locator(`div[task_id='${objId}']`).locator(".gantt_task_cell").nth(index).hover();
|
|
2529
|
+
await this.page.mouse.up();
|
|
2530
|
+
}
|
|
2531
|
+
async expectLinksToBeDisplayed(countOfLinks) {
|
|
2532
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".gantt_task_link").count()).toEqual(countOfLinks);
|
|
2533
|
+
}
|
|
2534
|
+
async expectLeftHandleVisibility(title, visible) {
|
|
2535
|
+
const objId = await this.page.locator(`.gantt_task_line`).filter({
|
|
2536
|
+
hasText: title
|
|
2537
|
+
}).getAttribute("task_id");
|
|
2538
|
+
if (visible) {
|
|
2539
|
+
await this.page.locator("#gantt .gantt_container .gantt_task_line").filter({
|
|
2540
|
+
hasText: title
|
|
2541
|
+
}).hover();
|
|
2542
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#gantt .gantt_container ").locator(`div[task_id="${objId}"].gantt-no-left-handle`)).not.toBeVisible();
|
|
2543
|
+
} else {
|
|
2544
|
+
await this.page.locator("#gantt .gantt_container .gantt_task_line").filter({
|
|
2545
|
+
hasText: title
|
|
2546
|
+
}).hover();
|
|
2547
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#gantt .gantt_container ").locator(`div[task_id="${objId}"].gantt-no-left-handle`)).toBeVisible();
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
async expectRightHandleVisibility(title, visible) {
|
|
2551
|
+
const objId = await this.page.locator(`.gantt_task_line`).filter({
|
|
2552
|
+
hasText: title
|
|
2553
|
+
}).getAttribute("task_id");
|
|
2554
|
+
if (visible) {
|
|
2555
|
+
await this.page.locator("#gantt .gantt_container .gantt_task_line").filter({
|
|
2556
|
+
hasText: title
|
|
2557
|
+
}).hover();
|
|
2558
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#gantt .gantt_container").locator(`div[task_id='${objId}'].gantt-no-right-handle`)).not.toBeVisible();
|
|
2559
|
+
} else {
|
|
2560
|
+
await this.page.locator("#gantt .gantt_container .gantt_task_line").filter({
|
|
2561
|
+
hasText: title
|
|
2562
|
+
}).hover();
|
|
2563
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#gantt .gantt_container").locator(`div[task_id='${objId}'].gantt-no-right-handle`)).toBeVisible();
|
|
2564
|
+
}
|
|
2565
|
+
}
|
|
2566
|
+
async openTaskDrawer(title) {
|
|
2567
|
+
await this.page.getByTitle(title).dblclick();
|
|
2568
|
+
return this.taskDrawer;
|
|
2569
|
+
}
|
|
2570
|
+
async openPhaseDetails(phaseName) {
|
|
2571
|
+
await this.page.getByTitle(phaseName).dblclick();
|
|
2572
|
+
}
|
|
2267
2573
|
getRow(phaseName) {
|
|
2268
2574
|
return new $e8395395d01b66bb$var$GanttRow(this.page, phaseName);
|
|
2269
2575
|
}
|
|
@@ -2297,20 +2603,20 @@ class $e8395395d01b66bb$var$GanttRow extends (0, $f8721861c660dd88$export$2b65d1
|
|
|
2297
2603
|
await this.dateUtil.setDate(date, monthYear);
|
|
2298
2604
|
}
|
|
2299
2605
|
async expectStartDateToBe(date) {
|
|
2300
|
-
const dateTimePicker =
|
|
2301
|
-
this.dateUtil.expectDateToBe(dateTimePicker, date);
|
|
2606
|
+
const dateTimePicker = this.getFirstDate();
|
|
2607
|
+
await this.dateUtil.expectDateToBe(await dateTimePicker, date);
|
|
2302
2608
|
}
|
|
2303
2609
|
async expectEndDateToBe(date) {
|
|
2304
|
-
const dateTimePicker =
|
|
2305
|
-
this.dateUtil.expectDateToBe(dateTimePicker, date);
|
|
2610
|
+
const dateTimePicker = this.getLastDate();
|
|
2611
|
+
await this.dateUtil.expectDateToBe(await dateTimePicker, date);
|
|
2306
2612
|
}
|
|
2307
2613
|
async removeStartDate() {
|
|
2308
2614
|
const dateTimePicker = await this.getFirstDateEditor();
|
|
2309
2615
|
await this.dateUtil.removeDate(dateTimePicker);
|
|
2310
2616
|
}
|
|
2311
2617
|
async removeEndDate() {
|
|
2312
|
-
const dateTimePicker =
|
|
2313
|
-
await this.dateUtil.removeDate(dateTimePicker);
|
|
2618
|
+
const dateTimePicker = this.getLastDateEditor();
|
|
2619
|
+
await this.dateUtil.removeDate(await dateTimePicker);
|
|
2314
2620
|
}
|
|
2315
2621
|
async expectStartDateToBeInferred() {
|
|
2316
2622
|
const dateTimePicker = await this.getFirstDateEditor();
|
|
@@ -2356,6 +2662,7 @@ class $8681d8a3f46f87b7$export$d1077068a9cc9f17 extends (0, $f8721861c660dd88$ex
|
|
|
2356
2662
|
await this.page.locator("#release-form-title").fill(name);
|
|
2357
2663
|
}
|
|
2358
2664
|
async setDescription(description) {
|
|
2665
|
+
await this.page.locator(".task-description").hover();
|
|
2359
2666
|
await this.page.locator(".display > .xl-icon").first().click();
|
|
2360
2667
|
await this.page.locator("textarea").click();
|
|
2361
2668
|
await this.page.locator("textarea").clear();
|
|
@@ -2490,61 +2797,296 @@ class $8681d8a3f46f87b7$export$d1077068a9cc9f17 extends (0, $f8721861c660dd88$ex
|
|
|
2490
2797
|
async expectScheduledStartDateToBe(date) {
|
|
2491
2798
|
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`.scheduled-start-date .date input`).getAttribute("value")).toContain(date);
|
|
2492
2799
|
}
|
|
2493
|
-
async expectScheduledStartTimeToBe(date) {
|
|
2494
|
-
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`.scheduled-start-date .time input`).getAttribute("value")).toContain(date);
|
|
2800
|
+
async expectScheduledStartTimeToBe(date) {
|
|
2801
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`.scheduled-start-date .time input`).getAttribute("value")).toContain(date);
|
|
2802
|
+
}
|
|
2803
|
+
async expectDueDateToBe(date) {
|
|
2804
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".due-date .date input").getAttribute("value")).toContain(date);
|
|
2805
|
+
}
|
|
2806
|
+
async expectedDueDateTime(time) {
|
|
2807
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".due-date .time input").getAttribute("value")).toContain(time);
|
|
2808
|
+
}
|
|
2809
|
+
async expectDurationToBe(duration) {
|
|
2810
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".duration-editor").textContent()).toBe(duration);
|
|
2811
|
+
}
|
|
2812
|
+
async setDueDate(hrs, min, meridian) {
|
|
2813
|
+
await this.page.locator(".due-date .time-picker-holder").click();
|
|
2814
|
+
if (typeof hrs !== "undefined") {
|
|
2815
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-hour").click();
|
|
2816
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-hour").clear();
|
|
2817
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-hour").fill(hrs);
|
|
2818
|
+
}
|
|
2819
|
+
if (typeof min !== "undefined") {
|
|
2820
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-minute").click();
|
|
2821
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-minute").clear();
|
|
2822
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-minute").fill(min);
|
|
2823
|
+
}
|
|
2824
|
+
if (typeof meridian !== "undefined") {
|
|
2825
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-meridian").click();
|
|
2826
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-meridian").clear();
|
|
2827
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-meridian").fill(meridian);
|
|
2828
|
+
}
|
|
2829
|
+
await this.page.keyboard.press("Escape");
|
|
2830
|
+
}
|
|
2831
|
+
async checkAbortOnFailure() {
|
|
2832
|
+
await this.page.locator("#release-form-abort-on-failure").check();
|
|
2833
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#release-form-abort-on-failure")).toBeChecked();
|
|
2834
|
+
}
|
|
2835
|
+
async expectDescriptionToBe(description) {
|
|
2836
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".release-description p").textContent()).toContain(description);
|
|
2837
|
+
}
|
|
2838
|
+
async expectReleaseNameToBe(name) {
|
|
2839
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator('form[name="releasePropertiesForm"]')).toContainText("Properties for " + name);
|
|
2840
|
+
}
|
|
2841
|
+
async expectStartDateReadonly() {
|
|
2842
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#release-properties .form-group").filter({
|
|
2843
|
+
hasText: "Start date"
|
|
2844
|
+
}).locator(".date-editor.readonly")).toBeVisible();
|
|
2845
|
+
}
|
|
2846
|
+
async expectEndDateReadonly() {
|
|
2847
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#release-properties .form-group").filter({
|
|
2848
|
+
hasText: "End date"
|
|
2849
|
+
}).locator(".date-editor.readonly")).toBeVisible();
|
|
2850
|
+
}
|
|
2851
|
+
async setOwner(user) {
|
|
2852
|
+
await this.page.locator(".release-owner").click();
|
|
2853
|
+
await this.page.locator(".release-owner input").clear();
|
|
2854
|
+
await this.page.locator(".release-owner input").fill(user);
|
|
2855
|
+
}
|
|
2856
|
+
async expectPageTitleToBeInBreadcrumbLink(releaseName) {
|
|
2857
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".dot-breadcrumbs a").allTextContents()).toContain(releaseName);
|
|
2858
|
+
}
|
|
2859
|
+
async reloadPage() {
|
|
2860
|
+
await this.page.reload({
|
|
2861
|
+
timeout: 3000
|
|
2862
|
+
});
|
|
2863
|
+
}
|
|
2864
|
+
async expectOwnerToBe(user) {
|
|
2865
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-owner")).toContainText(user);
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2868
|
+
|
|
2869
|
+
|
|
2870
|
+
|
|
2871
|
+
|
|
2872
|
+
class $d330a7d6f7926d53$export$3bc3e140e0dcb075 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2873
|
+
constructor(page){
|
|
2874
|
+
super(page);
|
|
2875
|
+
this.resetButton = this.page.getByRole("button", {
|
|
2876
|
+
name: "Reset"
|
|
2877
|
+
});
|
|
2878
|
+
this.saveButton = this.page.getByRole("button", {
|
|
2879
|
+
name: "Save"
|
|
2880
|
+
});
|
|
2881
|
+
}
|
|
2882
|
+
async expectSaveButtonDisabled() {
|
|
2883
|
+
(0, $kKeXs$playwrighttest.expect)(this.saveButton).toBeDisabled();
|
|
2884
|
+
}
|
|
2885
|
+
}
|
|
2886
|
+
|
|
2887
|
+
|
|
2888
|
+
|
|
2889
|
+
|
|
2890
|
+
|
|
2891
|
+
|
|
2892
|
+
class $c5c393ea4aecca6c$export$649fde34d823ece7 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2893
|
+
constructor(page){
|
|
2894
|
+
super(page);
|
|
2895
|
+
this.commentBox = this.page.locator(`.input-block-level`);
|
|
2896
|
+
this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
|
|
2897
|
+
this.refreshButton = this.page.getByTestId("refresh-btn");
|
|
2898
|
+
this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
|
|
2899
|
+
}
|
|
2900
|
+
async openContextMenuForTask(taskTitle) {
|
|
2901
|
+
await this.page.locator(".name-cell-wrapper").filter({
|
|
2902
|
+
hasText: taskTitle
|
|
2903
|
+
}).locator(".context-menu-button").click();
|
|
2904
|
+
}
|
|
2905
|
+
// eslint-disable-next-line max-params
|
|
2906
|
+
async callMenuOptionsForTask(taskTitle, option, taskGroup, taskType) {
|
|
2907
|
+
await this.openContextMenuForTask(taskTitle);
|
|
2908
|
+
await this.page.locator(".dropdown-menu li").getByText(option).click();
|
|
2909
|
+
if (await this.commentBox.isVisible()) await this.commentBox.fill(" Automation Test Comment");
|
|
2910
|
+
else if (await this.page.getByRole("heading", {
|
|
2911
|
+
name: "Change task type"
|
|
2912
|
+
}).isVisible()) {
|
|
2913
|
+
await this.page.getByPlaceholder("Start typing to filter task").click();
|
|
2914
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2915
|
+
// @ts-ignore
|
|
2916
|
+
await this.page.locator("#task-selector").fill(taskGroup);
|
|
2917
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2918
|
+
// @ts-ignore
|
|
2919
|
+
await this.page.getByTestId(taskType).click();
|
|
2920
|
+
}
|
|
2921
|
+
if (await this.page.getByRole("button", {
|
|
2922
|
+
name: option,
|
|
2923
|
+
exact: true
|
|
2924
|
+
}).isVisible()) await this.page.getByRole("button", {
|
|
2925
|
+
name: option,
|
|
2926
|
+
exact: true
|
|
2927
|
+
}).click();
|
|
2928
|
+
}
|
|
2929
|
+
async expectAssignToUser(taskTitle, username) {
|
|
2930
|
+
await this.refreshButton.click();
|
|
2931
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".ui-grid-row").filter({
|
|
2932
|
+
hasText: taskTitle
|
|
2933
|
+
}).locator(`span[display-user="row.entity.planItem.owner"] span`).textContent()).toContain(username);
|
|
2934
|
+
}
|
|
2935
|
+
async expectToHasGateIcon(taskTitle) {
|
|
2936
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".ui-grid-row").filter({
|
|
2937
|
+
hasText: taskTitle
|
|
2938
|
+
}).locator(".marker-check-icon")).toBeVisible();
|
|
2939
|
+
}
|
|
2940
|
+
async expectTaskRowCountToBe(title, expectedCount) {
|
|
2941
|
+
await this.refreshButton.click();
|
|
2942
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".name-cell-title").filter({
|
|
2943
|
+
hasText: title
|
|
2944
|
+
}).count()).toBe(expectedCount);
|
|
2945
|
+
}
|
|
2946
|
+
async setHeaderFilter(columnTitle, valueToFilter) {
|
|
2947
|
+
const filter = this.page.locator(`.ui-grid-header-cell`).filter({
|
|
2948
|
+
hasText: columnTitle
|
|
2949
|
+
}).locator(`input`);
|
|
2950
|
+
await filter.clear();
|
|
2951
|
+
await filter.fill(valueToFilter);
|
|
2952
|
+
}
|
|
2953
|
+
async expectRowCountToBe(cellCount) {
|
|
2954
|
+
const cont = await this.page.locator(".ui-grid-canvas .name-cell").count();
|
|
2955
|
+
(0, $kKeXs$playwrighttest.expect)(cont).toBe(cellCount);
|
|
2956
|
+
}
|
|
2957
|
+
async filterStartDate(date, monthYear) {
|
|
2958
|
+
await this.page.locator(`.ui-grid-header-cell`).filter({
|
|
2959
|
+
hasText: "Start Date"
|
|
2960
|
+
}).locator(`input`).click();
|
|
2961
|
+
await this.dateUtil.setDate(date, monthYear);
|
|
2962
|
+
}
|
|
2963
|
+
async filterEndDate(date, monthYear) {
|
|
2964
|
+
await this.page.locator(`.ui-grid-header-cell`).filter({
|
|
2965
|
+
hasText: "End Date"
|
|
2966
|
+
}).locator(`input`).click();
|
|
2967
|
+
await this.dateUtil.setDate(date, monthYear);
|
|
2968
|
+
}
|
|
2969
|
+
async openTaskDrawer(taskTitle) {
|
|
2970
|
+
await this.page.locator(".name-cell-title").filter({
|
|
2971
|
+
hasText: taskTitle
|
|
2972
|
+
}).click();
|
|
2973
|
+
return this.taskDrawer;
|
|
2974
|
+
}
|
|
2975
|
+
async collapseNthRowByIndex(Indexnumber) {
|
|
2976
|
+
await this.page.locator(".task-group-toggle .xl-icon.arrow-down-icon").nth(Indexnumber).click();
|
|
2977
|
+
}
|
|
2978
|
+
async closePhaseModal() {
|
|
2979
|
+
await this.page.locator("button[type='button'] i[class='xl-icon close-icon']").click();
|
|
2980
|
+
}
|
|
2981
|
+
async expectTaskToHaveStatus(taskTitle, status) {
|
|
2982
|
+
await this.refreshButton.click();
|
|
2983
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".ui-grid-row").filter({
|
|
2984
|
+
hasText: taskTitle
|
|
2985
|
+
}).locator(".label ").textContent()).toContain(status);
|
|
2986
|
+
}
|
|
2987
|
+
async expectOverdueOnEndDate(taskTitle) {
|
|
2988
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`.ui-grid-row`).filter({
|
|
2989
|
+
hasText: taskTitle
|
|
2990
|
+
}).locator(`i.xl-icon.delay-icon.overdue-icon`).isVisible()).toBe(true);
|
|
2495
2991
|
}
|
|
2496
|
-
async
|
|
2497
|
-
|
|
2992
|
+
async selectTask(taskTitle) {
|
|
2993
|
+
await this.page.locator(`.ui-grid-cell-contents`).filter({
|
|
2994
|
+
hasText: taskTitle
|
|
2995
|
+
}).locator(`.item-selector`).click({
|
|
2996
|
+
force: true
|
|
2997
|
+
});
|
|
2498
2998
|
}
|
|
2499
|
-
async
|
|
2500
|
-
(0, $kKeXs$playwrighttest.expect)(
|
|
2999
|
+
async expectSelectedTasksCounter(text) {
|
|
3000
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("release-grid-selected-tasks")).toBeVisible();
|
|
3001
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.getByTestId("release-grid-selected-tasks").textContent()).toContain(text);
|
|
2501
3002
|
}
|
|
2502
|
-
async
|
|
2503
|
-
|
|
3003
|
+
async clearSelection() {
|
|
3004
|
+
await this.page.getByTestId("release-grid-unselect-btn").click();
|
|
3005
|
+
return this;
|
|
2504
3006
|
}
|
|
2505
|
-
async
|
|
2506
|
-
await this.page.
|
|
2507
|
-
if (
|
|
2508
|
-
|
|
2509
|
-
await
|
|
2510
|
-
await
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-minute").fill(min);
|
|
3007
|
+
async assignSelectedTasks(owner, team) {
|
|
3008
|
+
await this.page.getByText("Assign to").click();
|
|
3009
|
+
if (owner) {
|
|
3010
|
+
const ownerSelector = this.page.locator(".task-owner");
|
|
3011
|
+
await ownerSelector.focus();
|
|
3012
|
+
await ownerSelector.click();
|
|
3013
|
+
await this.page.getByLabel("*").fill(owner);
|
|
3014
|
+
await this.page.locator("a").filter({
|
|
3015
|
+
hasText: owner
|
|
3016
|
+
}).click();
|
|
2516
3017
|
}
|
|
2517
|
-
if (
|
|
2518
|
-
|
|
2519
|
-
await
|
|
2520
|
-
await
|
|
3018
|
+
if (team) {
|
|
3019
|
+
const teamSelector = this.page.locator(".task-team > .display");
|
|
3020
|
+
await teamSelector.focus();
|
|
3021
|
+
await teamSelector.click();
|
|
3022
|
+
await this.page.getByLabel(team, {
|
|
3023
|
+
exact: true
|
|
3024
|
+
}).selectOption(team);
|
|
2521
3025
|
}
|
|
2522
|
-
await this.page.
|
|
3026
|
+
await this.page.getByRole("button", {
|
|
3027
|
+
name: "Assign"
|
|
3028
|
+
}).click();
|
|
3029
|
+
return this;
|
|
2523
3030
|
}
|
|
2524
|
-
async
|
|
2525
|
-
await this.page.
|
|
2526
|
-
|
|
3031
|
+
async expectSuccessMessage(successMessage) {
|
|
3032
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("success")).toContainText(successMessage);
|
|
3033
|
+
return this;
|
|
2527
3034
|
}
|
|
2528
|
-
async
|
|
2529
|
-
|
|
3035
|
+
async completeSelectedTasks(comment) {
|
|
3036
|
+
await this.page.getByTestId("release-grid-complete-btn").click();
|
|
3037
|
+
await this.page.getByPlaceholder("Give feedback or place a").fill(comment);
|
|
3038
|
+
await this.page.getByRole("button", {
|
|
3039
|
+
name: "Complete"
|
|
3040
|
+
}).click();
|
|
3041
|
+
return this;
|
|
2530
3042
|
}
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
3043
|
+
async selectFromMoreActions(menuItem) {
|
|
3044
|
+
await this.page.getByTestId("release-grid-dropdown-btn").click();
|
|
3045
|
+
await this.page.getByRole("menuitem", {
|
|
3046
|
+
name: menuItem
|
|
3047
|
+
}).click();
|
|
3048
|
+
if (await this.commentBox.isVisible() == true) await this.commentBox.fill(" Automation Test Comment");
|
|
3049
|
+
if (await this.page.getByRole("button", {
|
|
3050
|
+
name: menuItem,
|
|
3051
|
+
exact: true
|
|
3052
|
+
}).isVisible() == true) await this.page.getByRole("button", {
|
|
3053
|
+
name: menuItem,
|
|
3054
|
+
exact: true
|
|
3055
|
+
}).click();
|
|
3056
|
+
return this;
|
|
3057
|
+
}
|
|
3058
|
+
async addCommentToSelectedTask(comment) {
|
|
3059
|
+
await this.page.getByTestId("release-grid-comment-btn").click();
|
|
3060
|
+
await this.page.getByPlaceholder("Give feedback or place a").click();
|
|
3061
|
+
await this.page.getByPlaceholder("Give feedback or place a").fill(comment);
|
|
3062
|
+
await this.page.getByRole("button", {
|
|
3063
|
+
name: "Comment"
|
|
3064
|
+
}).click();
|
|
3065
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("success")).toBeVisible();
|
|
3066
|
+
return this;
|
|
3067
|
+
}
|
|
3068
|
+
async selectSubtasks(item) {
|
|
3069
|
+
await this.page.locator(`.ui-grid-cell-contents`).filter({
|
|
3070
|
+
hasText: item
|
|
3071
|
+
}).locator(`.tasks-group-select`).click({
|
|
3072
|
+
force: true
|
|
2544
3073
|
});
|
|
3074
|
+
return this;
|
|
2545
3075
|
}
|
|
2546
|
-
async
|
|
2547
|
-
|
|
3076
|
+
async shiftSelectFromTo(taskFrom, taskTo) {
|
|
3077
|
+
await this.page.locator(`.ui-grid-cell-contents`).filter({
|
|
3078
|
+
hasText: taskFrom
|
|
3079
|
+
}).locator(`.item-selector`).click({
|
|
3080
|
+
force: true
|
|
3081
|
+
});
|
|
3082
|
+
await this.page.keyboard.down("Shift");
|
|
3083
|
+
await this.page.locator(`.ui-grid-cell-contents`).filter({
|
|
3084
|
+
hasText: taskTo
|
|
3085
|
+
}).locator(`.item-selector`).click({
|
|
3086
|
+
force: true
|
|
3087
|
+
});
|
|
3088
|
+
await this.page.keyboard.up("Shift");
|
|
3089
|
+
return this;
|
|
2548
3090
|
}
|
|
2549
3091
|
}
|
|
2550
3092
|
|
|
@@ -2629,6 +3171,15 @@ class $2c89ba54932fbba8$export$f8f26dd395d7e1bd extends (0, $f8721861c660dd88$ex
|
|
|
2629
3171
|
async clearSearchFilter() {
|
|
2630
3172
|
await this.page.locator(".searchFilter").clear();
|
|
2631
3173
|
}
|
|
3174
|
+
async leaveWithoutSaving() {
|
|
3175
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
|
|
3176
|
+
name: "Confirm leave"
|
|
3177
|
+
})).toBeVisible();
|
|
3178
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("paragraph")).toContainText("You have unsaved changes that will be lost.");
|
|
3179
|
+
await this.page.getByRole("button", {
|
|
3180
|
+
name: "Leave without saving"
|
|
3181
|
+
}).click();
|
|
3182
|
+
}
|
|
2632
3183
|
}
|
|
2633
3184
|
|
|
2634
3185
|
|
|
@@ -2636,8 +3187,10 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
2636
3187
|
defaultTimeout = 10000;
|
|
2637
3188
|
constructor(page){
|
|
2638
3189
|
super(page);
|
|
3190
|
+
this.addPhaseBtn = this.page.getByTestId("add-phase-btn");
|
|
2639
3191
|
this.createPage = new (0, $3d3f3946c54f5897$export$34addcca3f0ae43f)(page);
|
|
2640
3192
|
this.ganttPage = new (0, $e8395395d01b66bb$export$5a82be0a2a261cc6)(page);
|
|
3193
|
+
this.tableView = new (0, $c5c393ea4aecca6c$export$649fde34d823ece7)(page);
|
|
2641
3194
|
this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
|
|
2642
3195
|
this.teamsPermissions = new (0, $d330a7d6f7926d53$export$3bc3e140e0dcb075)(page);
|
|
2643
3196
|
this.phaseTitle = this.page.locator(".phase .phase-title");
|
|
@@ -2657,6 +3210,7 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
2657
3210
|
await this.page.getByRole("button", {
|
|
2658
3211
|
name: "Abort"
|
|
2659
3212
|
}).click();
|
|
3213
|
+
await this.page.locator(".progress-status-and-percentage").waitFor();
|
|
2660
3214
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".progress-status-and-percentage")).toContainText("Aborted");
|
|
2661
3215
|
}
|
|
2662
3216
|
getPhase(phaseName) {
|
|
@@ -2680,6 +3234,7 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
2680
3234
|
await this.page.getByRole("button", {
|
|
2681
3235
|
name: "Start"
|
|
2682
3236
|
}).click();
|
|
3237
|
+
await this.page.waitForSelector("#release");
|
|
2683
3238
|
}
|
|
2684
3239
|
async waitForCompletion(timeout = this.defaultTimeout) {
|
|
2685
3240
|
await this.page.locator("#release.completed").waitFor({
|
|
@@ -2693,6 +3248,13 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
2693
3248
|
timeout: timeout
|
|
2694
3249
|
});
|
|
2695
3250
|
}
|
|
3251
|
+
async waitForTaskNeedsInput(taskTitle) {
|
|
3252
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.waiting_for_input").getByText(taskTitle, {
|
|
3253
|
+
exact: true
|
|
3254
|
+
})).toBeVisible({
|
|
3255
|
+
timeout: 10000
|
|
3256
|
+
});
|
|
3257
|
+
}
|
|
2696
3258
|
async waitForTaskCompletedInAdvance(taskTitle, timeout = this.defaultTimeout) {
|
|
2697
3259
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.completed_in_advance").getByText(taskTitle, {
|
|
2698
3260
|
exact: true
|
|
@@ -2877,6 +3439,10 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
2877
3439
|
});
|
|
2878
3440
|
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".progress-status-and-percentage").textContent()).toContain("Aborted");
|
|
2879
3441
|
}
|
|
3442
|
+
async expectInProgressStatusToBePresent() {
|
|
3443
|
+
await this.page.getByTestId("refresh-btn").click();
|
|
3444
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".progress-status-and-percentage").textContent()).toContain("In progress");
|
|
3445
|
+
}
|
|
2880
3446
|
async openTableView() {
|
|
2881
3447
|
await this.util.openSideNavMenu("Table");
|
|
2882
3448
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-grid-container")).toBeVisible();
|
|
@@ -2909,7 +3475,7 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
2909
3475
|
})).toBeVisible();
|
|
2910
3476
|
}
|
|
2911
3477
|
async addNewPhase(phaseName) {
|
|
2912
|
-
await this.
|
|
3478
|
+
await this.addPhaseBtn.click();
|
|
2913
3479
|
if (phaseName) {
|
|
2914
3480
|
await this.phaseTitle.getByText("New Phase").click();
|
|
2915
3481
|
await this.phaseTitle.getByRole("textbox").clear();
|
|
@@ -2981,6 +3547,12 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
2981
3547
|
await this.page.getByTestId("restart-btn").click();
|
|
2982
3548
|
return new $9b9a8c3da392d020$var$RestartPhaseModel(this.page);
|
|
2983
3549
|
}
|
|
3550
|
+
async expectAddPhaseNotVisible() {
|
|
3551
|
+
await (0, $kKeXs$playwrighttest.expect)(this.addPhaseBtn).not.toBeVisible();
|
|
3552
|
+
}
|
|
3553
|
+
async expectAddTaskNotVisible() {
|
|
3554
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".add-task.link")).not.toBeVisible();
|
|
3555
|
+
}
|
|
2984
3556
|
}
|
|
2985
3557
|
class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2986
3558
|
constructor(page, phaseName){
|
|
@@ -3048,7 +3620,10 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
3048
3620
|
await this.page.locator(".icon-close").click();
|
|
3049
3621
|
await this.page.locator("#task-title").fill(taskTitle);
|
|
3050
3622
|
await this.page.getByTestId("save-select-task-btn").click();
|
|
3051
|
-
await
|
|
3623
|
+
await this.page.locator("#release-header").click();
|
|
3624
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task-title").filter({
|
|
3625
|
+
hasText: taskTitle
|
|
3626
|
+
})).toBeVisible();
|
|
3052
3627
|
}
|
|
3053
3628
|
async getNumberOfTasks() {
|
|
3054
3629
|
return await this.phaseLocator.locator(".task").count();
|
|
@@ -3073,6 +3648,23 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
3073
3648
|
exact: true
|
|
3074
3649
|
}).click();
|
|
3075
3650
|
}
|
|
3651
|
+
async completeFromContextMenu(taskTitle, comment) {
|
|
3652
|
+
await this.openContextMenuForTask(taskTitle);
|
|
3653
|
+
await this.page.locator(".dropdown-menu li").getByText("Complete").click();
|
|
3654
|
+
await this.commentBox.fill(comment);
|
|
3655
|
+
await this.page.getByRole("button", {
|
|
3656
|
+
name: "Complete",
|
|
3657
|
+
exact: true
|
|
3658
|
+
}).click();
|
|
3659
|
+
}
|
|
3660
|
+
async assignToMeFromContextMenu(taskTitle) {
|
|
3661
|
+
await this.openContextMenuForTask(taskTitle);
|
|
3662
|
+
await this.page.locator(".dropdown-menu li").getByText("Assign to me").click();
|
|
3663
|
+
}
|
|
3664
|
+
async duplicateFromContextMenu(taskTitle) {
|
|
3665
|
+
await this.openContextMenuForTask(taskTitle);
|
|
3666
|
+
await this.page.locator(".dropdown-menu li").getByText("Duplicate").click();
|
|
3667
|
+
}
|
|
3076
3668
|
async expectTemplateLabelNotToBePresent() {
|
|
3077
3669
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-chip").filter({
|
|
3078
3670
|
hasText: "TEMPLATE"
|
|
@@ -3151,7 +3743,15 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
3151
3743
|
})).not.toBeVisible();
|
|
3152
3744
|
}
|
|
3153
3745
|
async expectCompletedPhase() {
|
|
3154
|
-
await (0, $kKeXs$playwrighttest.expect)(this.
|
|
3746
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("View all completed phases")).toBeVisible();
|
|
3747
|
+
}
|
|
3748
|
+
async clickViewAllCompletedPhase() {
|
|
3749
|
+
await this.page.getByText("View all completed phases").click();
|
|
3750
|
+
}
|
|
3751
|
+
async expectTaskToBePresent(taskName) {
|
|
3752
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task").filter({
|
|
3753
|
+
hasText: taskName
|
|
3754
|
+
})).toBeVisible();
|
|
3155
3755
|
}
|
|
3156
3756
|
}
|
|
3157
3757
|
class $9b9a8c3da392d020$var$RestartPhaseModel extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
@@ -3280,6 +3880,9 @@ class $b2d8d8d82fc8146c$export$eace2be4de1d3377 extends (0, $f8721861c660dd88$ex
|
|
|
3280
3880
|
hasText: "Deleted release delivery successfully"
|
|
3281
3881
|
})).toBeVisible();
|
|
3282
3882
|
}
|
|
3883
|
+
async expectDeliveryDisplayed(deliveryName) {
|
|
3884
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".fc-list-item-title").textContent()).toContain(deliveryName);
|
|
3885
|
+
}
|
|
3283
3886
|
}
|
|
3284
3887
|
|
|
3285
3888
|
|
|
@@ -3826,6 +4429,14 @@ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$ex
|
|
|
3826
4429
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Variables")).toBeVisible();
|
|
3827
4430
|
return this.variables;
|
|
3828
4431
|
}
|
|
4432
|
+
async openCustomDashboard() {
|
|
4433
|
+
await this.util.openSideNavMenu("Custom dashboards");
|
|
4434
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Custom dashboards")).toBeVisible();
|
|
4435
|
+
}
|
|
4436
|
+
async openReleaseByName(releaseName) {
|
|
4437
|
+
await this.page.getByTitle(releaseName).click();
|
|
4438
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Flow")).toBeVisible();
|
|
4439
|
+
}
|
|
3829
4440
|
}
|
|
3830
4441
|
|
|
3831
4442
|
|
|
@@ -6422,9 +7033,234 @@ class $dbc8f157e7b24b12$export$2edf430132ca35d0 extends (0, $f8721861c660dd88$ex
|
|
|
6422
7033
|
}
|
|
6423
7034
|
|
|
6424
7035
|
|
|
7036
|
+
|
|
7037
|
+
|
|
7038
|
+
|
|
7039
|
+
class $3ec0e9cf832fdde8$export$9823ddf5e80770e7 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
7040
|
+
constructor(page){
|
|
7041
|
+
super(page);
|
|
7042
|
+
}
|
|
7043
|
+
async addNewInstance(typeName) {
|
|
7044
|
+
await this.page.locator(`.configuration-type`).filter({
|
|
7045
|
+
hasText: typeName
|
|
7046
|
+
}).locator(`.new-instance .button`).click({
|
|
7047
|
+
force: true
|
|
7048
|
+
});
|
|
7049
|
+
return new $3ec0e9cf832fdde8$var$ConfigurationInstancePage(this.page);
|
|
7050
|
+
}
|
|
7051
|
+
async expectInstanceDisplayed(instanceName) {
|
|
7052
|
+
await this.page.locator("#configuration").waitFor({
|
|
7053
|
+
state: "visible",
|
|
7054
|
+
timeout: 200000
|
|
7055
|
+
});
|
|
7056
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`.configuration-instance`).filter({
|
|
7057
|
+
hasText: instanceName
|
|
7058
|
+
}).isVisible()).toBe(true);
|
|
7059
|
+
return this;
|
|
7060
|
+
}
|
|
7061
|
+
async expectInstanceNotDisplayed(instanceName) {
|
|
7062
|
+
await this.page.locator("#configuration").waitFor({
|
|
7063
|
+
state: "visible"
|
|
7064
|
+
});
|
|
7065
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`.configuration-instance`).filter({
|
|
7066
|
+
hasText: instanceName
|
|
7067
|
+
}).isVisible()).toBe(false);
|
|
7068
|
+
return this;
|
|
7069
|
+
}
|
|
7070
|
+
async openInstance(instanceName) {
|
|
7071
|
+
await this.page.locator(`.configuration-instance`).filter({
|
|
7072
|
+
hasText: instanceName
|
|
7073
|
+
}).locator(`.edit-instance`).click({
|
|
7074
|
+
force: true
|
|
7075
|
+
});
|
|
7076
|
+
return new $3ec0e9cf832fdde8$var$ConfigurationInstancePage(this.page);
|
|
7077
|
+
}
|
|
7078
|
+
async deleteInstance(instanceName) {
|
|
7079
|
+
await this.page.locator(`.configuration-instance`).filter({
|
|
7080
|
+
hasText: instanceName
|
|
7081
|
+
}).locator(`.delete-instance`).click({
|
|
7082
|
+
force: true
|
|
7083
|
+
});
|
|
7084
|
+
return this;
|
|
7085
|
+
}
|
|
7086
|
+
async expectSuccessMsgToBeDisplayed(text) {
|
|
7087
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".success")).toBeVisible();
|
|
7088
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".success").textContent()).toContain(text);
|
|
7089
|
+
return this;
|
|
7090
|
+
}
|
|
7091
|
+
async clearFilter() {
|
|
7092
|
+
await this.page.locator(".search-input-filter input").clear({
|
|
7093
|
+
force: true
|
|
7094
|
+
});
|
|
7095
|
+
return this;
|
|
7096
|
+
}
|
|
7097
|
+
async searchInstances(instanceName) {
|
|
7098
|
+
await this.page.getByPlaceholder("Search...").click();
|
|
7099
|
+
await this.page.getByPlaceholder("Search...").fill(instanceName);
|
|
7100
|
+
return this;
|
|
7101
|
+
}
|
|
7102
|
+
async expectErrorDisplayed() {
|
|
7103
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".modal-header h4")).toContainText("Error");
|
|
7104
|
+
await this.page.locator(".modal-header .xl-icon.close-icon").click();
|
|
7105
|
+
}
|
|
7106
|
+
}
|
|
7107
|
+
class $3ec0e9cf832fdde8$var$ConfigurationInstancePage extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
7108
|
+
constructor(page){
|
|
7109
|
+
super(page);
|
|
7110
|
+
}
|
|
7111
|
+
async setTextField(fieldName, fieldValue) {
|
|
7112
|
+
await this.page.locator(`input[name=${fieldName}]`).clear({
|
|
7113
|
+
force: true
|
|
7114
|
+
});
|
|
7115
|
+
await this.page.locator(`input[name=${fieldName}]`).fill(fieldValue, {
|
|
7116
|
+
force: true
|
|
7117
|
+
});
|
|
7118
|
+
return this;
|
|
7119
|
+
}
|
|
7120
|
+
async setNumberField(fieldName, fieldValue) {
|
|
7121
|
+
await this.page.locator(`#${fieldName}`).clear({
|
|
7122
|
+
force: true
|
|
7123
|
+
});
|
|
7124
|
+
await this.page.locator(`#${fieldName}`).fill(fieldValue.toString(), {
|
|
7125
|
+
force: true
|
|
7126
|
+
});
|
|
7127
|
+
return this;
|
|
7128
|
+
}
|
|
7129
|
+
async selectFromDropdown(fieldName, element) {
|
|
7130
|
+
await this.page.getByLabel(fieldName).click();
|
|
7131
|
+
await this.page.getByRole("option", {
|
|
7132
|
+
name: element
|
|
7133
|
+
}).click();
|
|
7134
|
+
return this;
|
|
7135
|
+
}
|
|
7136
|
+
async save() {
|
|
7137
|
+
await this.page.getByRole("button", {
|
|
7138
|
+
name: "Save"
|
|
7139
|
+
}).click();
|
|
7140
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("success")).toBeVisible();
|
|
7141
|
+
return this;
|
|
7142
|
+
}
|
|
7143
|
+
async test() {
|
|
7144
|
+
await this.page.getByRole("button", {
|
|
7145
|
+
name: "Test"
|
|
7146
|
+
}).click();
|
|
7147
|
+
return this;
|
|
7148
|
+
}
|
|
7149
|
+
async cancel() {
|
|
7150
|
+
await this.page.getByRole("button", {
|
|
7151
|
+
name: "Cancel"
|
|
7152
|
+
}).click();
|
|
7153
|
+
return this;
|
|
7154
|
+
}
|
|
7155
|
+
async expectResultBanner(message) {
|
|
7156
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".configuration-result-banner")).toBeVisible();
|
|
7157
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".configuration-result-banner")).toContainText(message);
|
|
7158
|
+
return this;
|
|
7159
|
+
}
|
|
7160
|
+
async expectDropdownToBe(fieldName, fieldValue) {
|
|
7161
|
+
const value = await this.page.locator(`#${fieldName}`).getAttribute("value");
|
|
7162
|
+
(0, $kKeXs$playwrighttest.expect)(value).toBe(fieldValue);
|
|
7163
|
+
return this;
|
|
7164
|
+
}
|
|
7165
|
+
async clearDropdown(fieldName) {
|
|
7166
|
+
await this.page.locator(`input[id=${fieldName}]`).click({
|
|
7167
|
+
force: true
|
|
7168
|
+
});
|
|
7169
|
+
await this.page.getByRole(`button`, {
|
|
7170
|
+
name: "Clear"
|
|
7171
|
+
}).click();
|
|
7172
|
+
return this;
|
|
7173
|
+
}
|
|
7174
|
+
async clickField(fieldName) {
|
|
7175
|
+
await this.page.getByLabel(fieldName).click();
|
|
7176
|
+
return this;
|
|
7177
|
+
}
|
|
7178
|
+
async expectTextFieldToBe(fieldName, fieldValue) {
|
|
7179
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`input[name=${fieldName}]`).getAttribute("value")).toContain(fieldValue);
|
|
7180
|
+
return this;
|
|
7181
|
+
}
|
|
7182
|
+
async setStringList(value) {
|
|
7183
|
+
await this.page.locator(".input-list input#stringList").click();
|
|
7184
|
+
if (value instanceof Array) for (const val of value){
|
|
7185
|
+
await this.page.locator(".input-list input#stringList").fill(val);
|
|
7186
|
+
await this.page.locator('[data-test-id="stringList"]').getByLabel("add icon button").click();
|
|
7187
|
+
}
|
|
7188
|
+
else await this.page.locator(".input-list input#stringList").fill(value);
|
|
7189
|
+
return this;
|
|
7190
|
+
}
|
|
7191
|
+
async expectStringListCountToBe(count) {
|
|
7192
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`[data-test-id="stringList"] .list`).count()).toBe(count);
|
|
7193
|
+
return this;
|
|
7194
|
+
}
|
|
7195
|
+
async removeString(value) {
|
|
7196
|
+
await this.page.locator("li").filter({
|
|
7197
|
+
hasText: value
|
|
7198
|
+
}).getByLabel("close icon button").click();
|
|
7199
|
+
return this;
|
|
7200
|
+
}
|
|
7201
|
+
async setStringSet(value) {
|
|
7202
|
+
await this.page.locator(".input-list input#stringSet").click();
|
|
7203
|
+
if (value instanceof Array) for (const val of value){
|
|
7204
|
+
await this.page.locator(".input-list input#stringSet").fill(val);
|
|
7205
|
+
await this.page.locator('[data-test-id="stringSet"]').getByLabel("add icon button").click();
|
|
7206
|
+
}
|
|
7207
|
+
else await this.page.locator(".input-list input#stringSet").fill(value);
|
|
7208
|
+
return this;
|
|
7209
|
+
}
|
|
7210
|
+
async expectStringSetCountToBe(count) {
|
|
7211
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`[data-test-id="stringSet"] .list`).count()).toBe(count);
|
|
7212
|
+
return this;
|
|
7213
|
+
}
|
|
7214
|
+
async setStringMap(pairs) {
|
|
7215
|
+
await this.page.locator('[data-test-id="stringMap"]').getByTestId("icon-button-tooltip").getByLabel("Add key-value pair").click();
|
|
7216
|
+
await this.page.locator("#new-row-key-input").fill(pairs.key);
|
|
7217
|
+
await this.page.locator("#new-row-value-input").fill(pairs.value);
|
|
7218
|
+
await this.page.getByRole("button", {
|
|
7219
|
+
name: "check-line icon"
|
|
7220
|
+
}).click();
|
|
7221
|
+
}
|
|
7222
|
+
async expectStringMapCountToBe(count) {
|
|
7223
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`[data-test-id="stringMap"] .map-data-row`).count()).toBe(count);
|
|
7224
|
+
return this;
|
|
7225
|
+
}
|
|
7226
|
+
async expectTestButtonToBeDisabled() {
|
|
7227
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("action-toolbar button").filter({
|
|
7228
|
+
hasText: "Test"
|
|
7229
|
+
})).toBeDisabled();
|
|
7230
|
+
return this;
|
|
7231
|
+
}
|
|
7232
|
+
async togglePasswordFieldVariable(fieldName) {
|
|
7233
|
+
await this.page.locator(`.input-with-variables[data-test-id="${fieldName}"] button`).click({
|
|
7234
|
+
force: true
|
|
7235
|
+
});
|
|
7236
|
+
return this;
|
|
7237
|
+
}
|
|
7238
|
+
async setPasswordFieldVariable(fieldName, fieldValue) {
|
|
7239
|
+
await this.page.locator(`.input-with-variables[data-test-id="${fieldName}"] input`).click({
|
|
7240
|
+
force: true
|
|
7241
|
+
});
|
|
7242
|
+
await this.page.locator(`.input-with-variables[data-test-id="${fieldName}"] li`).filter({
|
|
7243
|
+
hasText: fieldValue
|
|
7244
|
+
}).click();
|
|
7245
|
+
return this;
|
|
7246
|
+
}
|
|
7247
|
+
async expectFieldsToNotBeVisible(fieldNames) {
|
|
7248
|
+
if (typeof fieldNames !== "string") for (const fName of fieldNames)await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`#${fName}`)).not.toBeVisible();
|
|
7249
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`#${fieldNames}`)).not.toBeVisible();
|
|
7250
|
+
return this;
|
|
7251
|
+
}
|
|
7252
|
+
async expectFieldsToBeVisible(fieldNames) {
|
|
7253
|
+
if (typeof fieldNames !== "string") for (const fName of fieldNames)await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`input[name=${fName}]`)).toBeVisible();
|
|
7254
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`input[name=${fieldNames}]`)).toBeVisible();
|
|
7255
|
+
return this;
|
|
7256
|
+
}
|
|
7257
|
+
}
|
|
7258
|
+
|
|
7259
|
+
|
|
6425
7260
|
class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
6426
7261
|
constructor(page){
|
|
6427
7262
|
this.page = page;
|
|
7263
|
+
this.connections = new (0, $3ec0e9cf832fdde8$export$9823ddf5e80770e7)(page);
|
|
6428
7264
|
this.dataRandomGenerator = new (0, $ce55a4fc3c0aa96a$export$e40b5d3c74b04c89)();
|
|
6429
7265
|
this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
|
|
6430
7266
|
this.folderPage = new (0, $9058d40a81bdb1f5$export$b453f08936c58edb)(page);
|
|
@@ -6446,6 +7282,7 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
|
6446
7282
|
this.releaseGroupPage = new (0, $a6a3c1345fc4767e$export$b6fbc3e67030138f)(page);
|
|
6447
7283
|
this.releaseGroupTimelinePage = new (0, $3fad6a9449b6416f$export$1a0994e9c202d529)(page);
|
|
6448
7284
|
this.releaseListPage = new (0, $87643f2d97b0644e$export$a678525e79c4ccc4)(page);
|
|
7285
|
+
this.releaseGanttPage = new (0, $e8395395d01b66bb$export$5a82be0a2a261cc6)(page);
|
|
6449
7286
|
this.rolesPage = new (0, $84dbf24c796d0540$export$7a5b979a220f477c)(page);
|
|
6450
7287
|
this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
|
|
6451
7288
|
this.workflowCatalogPage = new (0, $7bcc05352d6debcf$export$5628dfd1b9e94785)(page);
|
|
@@ -6466,6 +7303,10 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
|
6466
7303
|
async openRelease(id) {
|
|
6467
7304
|
return this.openReleaseOrTemplate(id, true);
|
|
6468
7305
|
}
|
|
7306
|
+
async openPlannerView(releaseId) {
|
|
7307
|
+
await this.page.goto(`#/releases/${releaseId}/planner`);
|
|
7308
|
+
return new (0, $e8395395d01b66bb$export$5a82be0a2a261cc6)(this.page);
|
|
7309
|
+
}
|
|
6469
7310
|
async openApplicationsPage() {
|
|
6470
7311
|
return new (0, $dc91ece6da6cadfa$export$1533b625ec0c75e2)(this.page).goToApplicationsPage();
|
|
6471
7312
|
}
|
|
@@ -6556,6 +7397,7 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
|
6556
7397
|
await this.page.locator("ul.side-nav li").getByLabel("Connections", {
|
|
6557
7398
|
exact: true
|
|
6558
7399
|
}).click();
|
|
7400
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Connections")).toBeVisible();
|
|
6559
7401
|
}
|
|
6560
7402
|
async openReleaseOrTemplate(id, release) {
|
|
6561
7403
|
const url = release ? "releases" : "templates";
|
|
@@ -6574,6 +7416,10 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
|
6574
7416
|
async openRisksProfile() {
|
|
6575
7417
|
await this.page.goto("./#/risks");
|
|
6576
7418
|
}
|
|
7419
|
+
async openConnection() {
|
|
7420
|
+
await this.page.goto("./#/configuration");
|
|
7421
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Connections")).toBeVisible();
|
|
7422
|
+
}
|
|
6577
7423
|
}
|
|
6578
7424
|
|
|
6579
7425
|
|
|
@@ -7347,7 +8193,9 @@ const $8977f8672c5de0fa$export$45f0aca2596a2bb3 = function() {
|
|
|
7347
8193
|
processTasks(subTask, task, idx);
|
|
7348
8194
|
});
|
|
7349
8195
|
(0, (/*@__PURE__*/$parcel$interopDefault($952a2b8d8056b381$exports)))(task.templateVariables, function(variable, idx) {
|
|
7350
|
-
if (variable.value !== undefined)
|
|
8196
|
+
if (variable.value !== undefined) // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
8197
|
+
// @ts-ignore
|
|
8198
|
+
(0, (/*@__PURE__*/$parcel$interopDefault($732eba8dca8b5420$exports)))(variable, getVariableEntity(variable.value, variable.key, task.id, idx));
|
|
7351
8199
|
});
|
|
7352
8200
|
(0, (/*@__PURE__*/$parcel$interopDefault($952a2b8d8056b381$exports)))(task.attachments, function(attachment, idx) {
|
|
7353
8201
|
attachment.type = ATTACHMENT_TYPE;
|
|
@@ -7418,7 +8266,9 @@ const $8977f8672c5de0fa$export$45f0aca2596a2bb3 = function() {
|
|
|
7418
8266
|
attachment.id = `${release.id}/Attachment${index}`;
|
|
7419
8267
|
});
|
|
7420
8268
|
(0, (/*@__PURE__*/$parcel$interopDefault($ae8Uz)))(release.variables, function(variable, index) {
|
|
7421
|
-
if (variable.value !== undefined)
|
|
8269
|
+
if (variable.value !== undefined) // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
8270
|
+
// @ts-ignore
|
|
8271
|
+
(0, (/*@__PURE__*/$parcel$interopDefault($732eba8dca8b5420$exports)))(variable, getVariableEntity(variable.value, variable.key, release.id, index));
|
|
7422
8272
|
if (variable.valueProvider) (0, (/*@__PURE__*/$parcel$interopDefault($732eba8dca8b5420$exports)))(variable.valueProvider, getValueProviderConfigurationEntity(variable.id));
|
|
7423
8273
|
});
|
|
7424
8274
|
(0, (/*@__PURE__*/$parcel$interopDefault($ae8Uz)))((0, (/*@__PURE__*/$parcel$interopDefault($f51969c4a7467fa0$exports)))(release.variableValues), function(keyValue, index) {
|
|
@@ -7475,6 +8325,7 @@ class $6998c6a53a9eb4fa$var$Fixtures {
|
|
|
7475
8325
|
folderIds = [];
|
|
7476
8326
|
usernames = [];
|
|
7477
8327
|
userProfiles = [];
|
|
8328
|
+
folderVariableIds = [];
|
|
7478
8329
|
constructor(request, page){
|
|
7479
8330
|
this.request = request;
|
|
7480
8331
|
this.page = page;
|
|
@@ -7526,18 +8377,26 @@ class $6998c6a53a9eb4fa$var$Fixtures {
|
|
|
7526
8377
|
folder.type = "xlrelease.Folder";
|
|
7527
8378
|
let teams = folder.teams;
|
|
7528
8379
|
delete folder.teams;
|
|
7529
|
-
|
|
7530
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */ const children = folder.children || [];
|
|
8380
|
+
const children = folder.children || [];
|
|
7531
8381
|
delete folder.children;
|
|
8382
|
+
const folderVariables = (folder.variables || []).map((variable)=>{
|
|
8383
|
+
variable.folderId = folder.id;
|
|
8384
|
+
return variable;
|
|
8385
|
+
});
|
|
8386
|
+
delete folder.variables;
|
|
7532
8387
|
const response = await this.doPost(`api/v1/folders/${parentId}`, folder);
|
|
7533
8388
|
// Add the folder ID to the list
|
|
7534
8389
|
this.folderIds.push(folder.id);
|
|
7535
8390
|
// If teams are provided, send a request to add teams to the folder
|
|
7536
8391
|
if (teams) {
|
|
7537
8392
|
teams = this.addSystemTeams(teams);
|
|
7538
|
-
|
|
7539
|
-
return newresponse;
|
|
8393
|
+
return await this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
|
|
7540
8394
|
}
|
|
8395
|
+
if (children && children.length > 0) {
|
|
8396
|
+
await this.folderVariable(folderVariables);
|
|
8397
|
+
return await this.folder(children[0]);
|
|
8398
|
+
}
|
|
8399
|
+
if (folderVariables && folderVariables.length > 0) return await this.folderVariable(folderVariables);
|
|
7541
8400
|
return response;
|
|
7542
8401
|
}
|
|
7543
8402
|
createFolder(folderJson) {
|
|
@@ -7546,6 +8405,18 @@ class $6998c6a53a9eb4fa$var$Fixtures {
|
|
|
7546
8405
|
folderJson
|
|
7547
8406
|
]);
|
|
7548
8407
|
}
|
|
8408
|
+
async folderVariable(variable) {
|
|
8409
|
+
// Flatten and process the variables
|
|
8410
|
+
const variables = [].concat(variable).flat()// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
8411
|
+
.map((variable)=>{
|
|
8412
|
+
variable.id = null;
|
|
8413
|
+
variable.type = variable.type || "xlrelease.StringVariable";
|
|
8414
|
+
variable.requiresValue = false;
|
|
8415
|
+
variable.showOnReleaseStart = false;
|
|
8416
|
+
return variable;
|
|
8417
|
+
});
|
|
8418
|
+
return await this.doPost("fixtures/folders/variables", variables);
|
|
8419
|
+
}
|
|
7549
8420
|
trigger(trigger) {
|
|
7550
8421
|
this.triggerIds.push(trigger.id);
|
|
7551
8422
|
return this.doPost("fixtures/trigger", trigger);
|
|
@@ -7559,6 +8430,9 @@ class $6998c6a53a9eb4fa$var$Fixtures {
|
|
|
7559
8430
|
globalRoles(rolePrincipals) {
|
|
7560
8431
|
return this.doPost(`api/v1/roles/${rolePrincipals.name}`, rolePrincipals);
|
|
7561
8432
|
}
|
|
8433
|
+
dashboard(dashboard) {
|
|
8434
|
+
return this.doPost("fixtures/dashboard", dashboard);
|
|
8435
|
+
}
|
|
7562
8436
|
deleteGlobalRole(roleName) {
|
|
7563
8437
|
return this.doDelete(`api/v1/roles/${roleName}`);
|
|
7564
8438
|
}
|
|
@@ -7635,6 +8509,17 @@ class $6998c6a53a9eb4fa$var$Fixtures {
|
|
|
7635
8509
|
deleteRiskProfile(riskProfileId) {
|
|
7636
8510
|
return this.doDelete(`fixtures/riskProfiles/${riskProfileId}`);
|
|
7637
8511
|
}
|
|
8512
|
+
// Release delivery pattern
|
|
8513
|
+
createDeliveryPattern(delivery, shouldResetPattern = true) {
|
|
8514
|
+
return this.doPost(`fixtures/deliveries/patterns/${shouldResetPattern}`, delivery);
|
|
8515
|
+
}
|
|
8516
|
+
// Release deliveries
|
|
8517
|
+
createDelivery(delivery) {
|
|
8518
|
+
return this.doPost("fixtures/deliveries", delivery);
|
|
8519
|
+
}
|
|
8520
|
+
deleteDelivery(delivery) {
|
|
8521
|
+
return this.doDelete(`fixtures/deliveries/${delivery}`);
|
|
8522
|
+
}
|
|
7638
8523
|
async cleanAll() {
|
|
7639
8524
|
for (const username of this.usernames)await this.deleteUser(username);
|
|
7640
8525
|
for (const userProfile of this.userProfiles)await this.deleteUserProfile(userProfile);
|
|
@@ -7688,6 +8573,25 @@ class $6998c6a53a9eb4fa$var$Fixtures {
|
|
|
7688
8573
|
this.userProfiles.push(profile.canonicalId);
|
|
7689
8574
|
await this.doPost("fixtures/userProfile", profile);
|
|
7690
8575
|
}
|
|
8576
|
+
async resetUserProfile(username, fullName) {
|
|
8577
|
+
this.usernames.push(username);
|
|
8578
|
+
return this.updateProfile({
|
|
8579
|
+
username: username,
|
|
8580
|
+
external: false,
|
|
8581
|
+
profileId: username,
|
|
8582
|
+
email: "",
|
|
8583
|
+
fullName: fullName ? fullName : username,
|
|
8584
|
+
loginAllowed: true,
|
|
8585
|
+
// dateFormat: "dd/MM/yy",
|
|
8586
|
+
dateFormat: "M/d/yy",
|
|
8587
|
+
// timeFormat: "HH:mm",
|
|
8588
|
+
timeFormat: "h:mm a",
|
|
8589
|
+
firstDayOfWeek: 0
|
|
8590
|
+
});
|
|
8591
|
+
}
|
|
8592
|
+
async updateProfile(profile) {
|
|
8593
|
+
return this.doPut("profile", profile);
|
|
8594
|
+
}
|
|
7691
8595
|
async expectJiraTaskStatus(taskId, expectedStatus) {
|
|
7692
8596
|
const headers = {
|
|
7693
8597
|
Authorization: `Basic ${btoa("xlr-jira-testuser@xebialabs.com:zgsXK6c3oLVkJxrWVJQy9DB7")}`,
|