@digital-ai/devops-page-object-release 0.0.27 → 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 +7 -0
- package/dist/main.js +441 -114
- package/dist/main.js.map +1 -1
- package/dist/module.js +441 -114
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +110 -33
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1575,6 +1575,123 @@ class $59543fc69900e8db$var$DeleteVariableModel extends (0, $f8721861c660dd88$ex
|
|
|
1575
1575
|
|
|
1576
1576
|
|
|
1577
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
|
+
|
|
1578
1695
|
class $8be2ce0eccbe6d27$export$64c93bc7fb9ca44e extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1579
1696
|
constructor(page){
|
|
1580
1697
|
super(page);
|
|
@@ -1634,39 +1751,12 @@ class $8be2ce0eccbe6d27$export$64c93bc7fb9ca44e extends (0, $f8721861c660dd88$ex
|
|
|
1634
1751
|
|
|
1635
1752
|
|
|
1636
1753
|
|
|
1637
|
-
|
|
1638
|
-
class $9c0b0c2caed50730$export$d4865631ba74f3e2 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1639
|
-
constructor(page){
|
|
1640
|
-
super(page);
|
|
1641
|
-
this.railLocator = this.page.locator("task-drawer .dot-drawer .task-conditions");
|
|
1642
|
-
this.preconditionToggle = page.getByLabel("Enable precondition");
|
|
1643
|
-
this.textEditor = page.getByRole("textbox");
|
|
1644
|
-
this.saveButton = page.getByTestId("save-btn");
|
|
1645
|
-
}
|
|
1646
|
-
async enablePrecondition() {
|
|
1647
|
-
(0, $kKeXs$playwrighttest.expect)(await this.preconditionToggle.isChecked()).toBe(false);
|
|
1648
|
-
await this.preconditionToggle.check();
|
|
1649
|
-
}
|
|
1650
|
-
async disablePrecondition() {
|
|
1651
|
-
(0, $kKeXs$playwrighttest.expect)(await this.preconditionToggle.isChecked()).toBe(true);
|
|
1652
|
-
await this.preconditionToggle.uncheck();
|
|
1653
|
-
}
|
|
1654
|
-
async setPrecondition(script) {
|
|
1655
|
-
await this.enablePrecondition();
|
|
1656
|
-
await this.textEditor.fill(script);
|
|
1657
|
-
await this.saveButton.dblclick();
|
|
1658
|
-
await this.page.waitForTimeout(1000);
|
|
1659
|
-
}
|
|
1660
|
-
}
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
1754
|
class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1666
1755
|
constructor(page){
|
|
1667
1756
|
super(page);
|
|
1668
|
-
this.railLocator = this.page.locator("task-drawer .dot-drawer .task-drawer-content");
|
|
1669
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");
|
|
1670
1760
|
}
|
|
1671
1761
|
async openInputProperties() {
|
|
1672
1762
|
await this.railLocator.locator(".task-config-header").getByText("Input properties").click();
|
|
@@ -1729,6 +1819,11 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
1729
1819
|
async expectBodyToBe(value) {
|
|
1730
1820
|
return await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".notification-body-field p")).toHaveText(value);
|
|
1731
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
|
+
}
|
|
1732
1827
|
async setValueFromMap(propertyName, key, value) {
|
|
1733
1828
|
await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.add-new-button`).click();
|
|
1734
1829
|
await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] input[id="new-row-key-input"]`).fill(key);
|
|
@@ -1736,29 +1831,29 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
1736
1831
|
await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.map-row-save-button`).click();
|
|
1737
1832
|
}
|
|
1738
1833
|
async setScript(script) {
|
|
1739
|
-
await this.
|
|
1740
|
-
await this.
|
|
1834
|
+
await this.scriptTextArea.clear();
|
|
1835
|
+
await this.scriptTextArea.fill(script);
|
|
1741
1836
|
await this.page.locator('.code-editor .header button:has-text("Save")').click();
|
|
1742
1837
|
}
|
|
1743
1838
|
async expectScriptToContain(script) {
|
|
1744
1839
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".code-editor .ace_content")).toContainText(script);
|
|
1745
1840
|
}
|
|
1746
1841
|
async enterScriptForAutoComplete(script) {
|
|
1747
|
-
await this.
|
|
1748
|
-
await this.
|
|
1749
|
-
await this.
|
|
1842
|
+
await this.scriptTextArea.clear();
|
|
1843
|
+
await this.scriptTextArea.fill(script);
|
|
1844
|
+
await this.scriptTextArea.press(".");
|
|
1750
1845
|
}
|
|
1751
1846
|
async openScriptEditorInSeparateWindow() {
|
|
1752
1847
|
await this.page.getByTestId("fullscreen-enter-btn").click();
|
|
1753
|
-
(0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).toBeVisible();
|
|
1848
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).toBeVisible();
|
|
1754
1849
|
}
|
|
1755
1850
|
async closeFullscreenScriptWindowWithESC() {
|
|
1756
1851
|
await this.page.locator("#dialogTitle").press("Escape");
|
|
1757
|
-
(0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
|
|
1852
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
|
|
1758
1853
|
}
|
|
1759
1854
|
async closeFullscreenScriptWindow() {
|
|
1760
1855
|
await this.page.getByTestId("fullscreen-exit-btn").click();
|
|
1761
|
-
(0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
|
|
1856
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
|
|
1762
1857
|
}
|
|
1763
1858
|
async abort(comment) {
|
|
1764
1859
|
await this.page.getByTestId("single-action-button").click();
|
|
@@ -1795,6 +1890,10 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
1795
1890
|
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".add-dependency-btn")).toBeVisible();
|
|
1796
1891
|
await this.railLocator.locator(".add-dependency-btn").click();
|
|
1797
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
|
+
}
|
|
1798
1897
|
async expectDependencyText(dependencies) {
|
|
1799
1898
|
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
|
|
1800
1899
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.gate-task-dependencies`).getByLabel(dependencies).first()).toBeVisible();
|
|
@@ -1963,6 +2062,28 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
1963
2062
|
hasText: title
|
|
1964
2063
|
})).toBeVisible();
|
|
1965
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
|
+
}
|
|
1966
2087
|
}
|
|
1967
2088
|
class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1968
2089
|
constructor(page){
|
|
@@ -2057,68 +2178,6 @@ class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$ex
|
|
|
2057
2178
|
|
|
2058
2179
|
|
|
2059
2180
|
|
|
2060
|
-
class $6c924a95a765a086$export$15d3f9b095bb5188 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2061
|
-
async expectCommentToContain(comment) {
|
|
2062
|
-
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".markdown-wrapper").textContent()).toContain(comment);
|
|
2063
|
-
}
|
|
2064
|
-
async expectTaskIsCommentable(isCommentable) {
|
|
2065
|
-
return (0, $kKeXs$playwrighttest.expect)(await this.page.locator("#task-comment").count()).toBe(isCommentable ? 1 : 0);
|
|
2066
|
-
}
|
|
2067
|
-
}
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
class $f9016705c1a1eb20$export$aa59788fdecae2f2 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2073
|
-
async expectWithAttachment(filename) {
|
|
2074
|
-
const test = this.page.locator(".task-attachments-grid .file-item-text");
|
|
2075
|
-
await test.isVisible();
|
|
2076
|
-
await (0, $kKeXs$playwrighttest.expect)(test).toContainText(filename);
|
|
2077
|
-
}
|
|
2078
|
-
async getAttachmentsListCount() {
|
|
2079
|
-
return await this.page.locator(".file-upload-list div").count();
|
|
2080
|
-
}
|
|
2081
|
-
async uploadFile(filePath) {
|
|
2082
|
-
const fileChooserPromise = this.page.waitForEvent("filechooser");
|
|
2083
|
-
await this.page.getByRole("button", {
|
|
2084
|
-
name: "Select file(s)"
|
|
2085
|
-
}).click();
|
|
2086
|
-
const fileChooser = await fileChooserPromise;
|
|
2087
|
-
await fileChooser.setFiles(filePath);
|
|
2088
|
-
}
|
|
2089
|
-
async downloadFile(filename) {
|
|
2090
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2091
|
-
this.page.on("download", ()=>{});
|
|
2092
|
-
const downloadPromise = this.page.waitForEvent("download");
|
|
2093
|
-
await this.page.locator("li").filter({
|
|
2094
|
-
hasText: "" + filename + ""
|
|
2095
|
-
}).click();
|
|
2096
|
-
await downloadPromise;
|
|
2097
|
-
}
|
|
2098
|
-
async deleteAttachment(fileName) {
|
|
2099
|
-
await this.page.locator("li").filter({
|
|
2100
|
-
hasText: fileName
|
|
2101
|
-
}).click();
|
|
2102
|
-
await this.page.getByLabel("delete file").click();
|
|
2103
|
-
await this.page.getByRole("button", {
|
|
2104
|
-
name: "Delete"
|
|
2105
|
-
}).waitFor({
|
|
2106
|
-
state: "visible"
|
|
2107
|
-
});
|
|
2108
|
-
await this.page.getByRole("button", {
|
|
2109
|
-
name: "Delete"
|
|
2110
|
-
}).click();
|
|
2111
|
-
}
|
|
2112
|
-
async expectWithNoAttachment(tempFile) {
|
|
2113
|
-
const test = await this.page.locator(".task-attachments-grid .file-item-text").count();
|
|
2114
|
-
if (test > 0) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toContainText(tempFile);
|
|
2115
|
-
else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toBeVisible();
|
|
2116
|
-
}
|
|
2117
|
-
}
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
2181
|
|
|
2123
2182
|
|
|
2124
2183
|
|
|
@@ -2200,25 +2259,21 @@ class $1fbdec5dc9cde599$export$e3515314c13bc477 extends (0, $f8721861c660dd88$ex
|
|
|
2200
2259
|
}
|
|
2201
2260
|
|
|
2202
2261
|
|
|
2262
|
+
|
|
2203
2263
|
class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2204
2264
|
constructor(page){
|
|
2205
2265
|
super(page);
|
|
2206
|
-
this.
|
|
2207
|
-
this.
|
|
2208
|
-
|
|
2209
|
-
});
|
|
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);
|
|
2210
2269
|
this.cancelButton = this.page.getByTestId("task-action-cancel");
|
|
2211
2270
|
this.commentBox = this.page.getByTestId("task-action-comment");
|
|
2212
2271
|
this.confirm = this.page.locator(".popper-action-buttons").getByTestId("dot-button");
|
|
2213
|
-
this.activity = new (0, $6c924a95a765a086$export$15d3f9b095bb5188)(page);
|
|
2214
|
-
this.attachment = new (0, $f9016705c1a1eb20$export$aa59788fdecae2f2)(page);
|
|
2215
2272
|
this.config = new (0, $8be2ce0eccbe6d27$export$64c93bc7fb9ca44e)(page);
|
|
2216
2273
|
this.condition = new (0, $9c0b0c2caed50730$export$d4865631ba74f3e2)(page);
|
|
2217
|
-
this.
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
this.skipMenu = this.page.getByRole("menuitem", {
|
|
2221
|
-
name: "Skip"
|
|
2274
|
+
this.completeButton = this.page.getByRole("button", {
|
|
2275
|
+
name: "Complete",
|
|
2276
|
+
exact: true
|
|
2222
2277
|
});
|
|
2223
2278
|
this.failMenu = this.page.getByRole("menuitem", {
|
|
2224
2279
|
name: "Fail"
|
|
@@ -2227,10 +2282,16 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
2227
2282
|
name: "arrow-down icon",
|
|
2228
2283
|
exact: true
|
|
2229
2284
|
});
|
|
2230
|
-
this.
|
|
2231
|
-
|
|
2232
|
-
|
|
2285
|
+
this.overview = new (0, $eb81c1b930e440ff$export$519356f6c50361f7)(page);
|
|
2286
|
+
this.retryButton = this.page.getByRole("button", {
|
|
2287
|
+
name: "Retry"
|
|
2233
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");
|
|
2234
2295
|
}
|
|
2235
2296
|
async openOverviewRail() {
|
|
2236
2297
|
await this.openRail("Overview");
|
|
@@ -2283,6 +2344,12 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
2283
2344
|
await this.commentBox.fill(comment);
|
|
2284
2345
|
await this.confirm.click();
|
|
2285
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
|
+
}
|
|
2286
2353
|
async expectTaskTitle(taskTitle) {
|
|
2287
2354
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-drawer .task-title-input .dot-view-mode-typography")).toContainText(taskTitle);
|
|
2288
2355
|
}
|
|
@@ -3104,6 +3171,15 @@ class $2c89ba54932fbba8$export$f8f26dd395d7e1bd extends (0, $f8721861c660dd88$ex
|
|
|
3104
3171
|
async clearSearchFilter() {
|
|
3105
3172
|
await this.page.locator(".searchFilter").clear();
|
|
3106
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
|
+
}
|
|
3107
3183
|
}
|
|
3108
3184
|
|
|
3109
3185
|
|
|
@@ -3544,7 +3620,10 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
3544
3620
|
await this.page.locator(".icon-close").click();
|
|
3545
3621
|
await this.page.locator("#task-title").fill(taskTitle);
|
|
3546
3622
|
await this.page.getByTestId("save-select-task-btn").click();
|
|
3547
|
-
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();
|
|
3548
3627
|
}
|
|
3549
3628
|
async getNumberOfTasks() {
|
|
3550
3629
|
return await this.phaseLocator.locator(".task").count();
|
|
@@ -6955,9 +7034,233 @@ class $dbc8f157e7b24b12$export$2edf430132ca35d0 extends (0, $f8721861c660dd88$ex
|
|
|
6955
7034
|
|
|
6956
7035
|
|
|
6957
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
|
+
|
|
6958
7260
|
class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
6959
7261
|
constructor(page){
|
|
6960
7262
|
this.page = page;
|
|
7263
|
+
this.connections = new (0, $3ec0e9cf832fdde8$export$9823ddf5e80770e7)(page);
|
|
6961
7264
|
this.dataRandomGenerator = new (0, $ce55a4fc3c0aa96a$export$e40b5d3c74b04c89)();
|
|
6962
7265
|
this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
|
|
6963
7266
|
this.folderPage = new (0, $9058d40a81bdb1f5$export$b453f08936c58edb)(page);
|
|
@@ -7094,6 +7397,7 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
|
7094
7397
|
await this.page.locator("ul.side-nav li").getByLabel("Connections", {
|
|
7095
7398
|
exact: true
|
|
7096
7399
|
}).click();
|
|
7400
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Connections")).toBeVisible();
|
|
7097
7401
|
}
|
|
7098
7402
|
async openReleaseOrTemplate(id, release) {
|
|
7099
7403
|
const url = release ? "releases" : "templates";
|
|
@@ -7112,6 +7416,10 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
|
7112
7416
|
async openRisksProfile() {
|
|
7113
7417
|
await this.page.goto("./#/risks");
|
|
7114
7418
|
}
|
|
7419
|
+
async openConnection() {
|
|
7420
|
+
await this.page.goto("./#/configuration");
|
|
7421
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Connections")).toBeVisible();
|
|
7422
|
+
}
|
|
7115
7423
|
}
|
|
7116
7424
|
|
|
7117
7425
|
|
|
@@ -8265,6 +8573,25 @@ class $6998c6a53a9eb4fa$var$Fixtures {
|
|
|
8265
8573
|
this.userProfiles.push(profile.canonicalId);
|
|
8266
8574
|
await this.doPost("fixtures/userProfile", profile);
|
|
8267
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
|
+
}
|
|
8268
8595
|
async expectJiraTaskStatus(taskId, expectedStatus) {
|
|
8269
8596
|
const headers = {
|
|
8270
8597
|
Authorization: `Basic ${btoa("xlr-jira-testuser@xebialabs.com:zgsXK6c3oLVkJxrWVJQy9DB7")}`,
|