@digital-ai/devops-page-object-release 0.0.27 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -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.page.locator(".code-editor textarea.ace_text-input").clear();
1740
- await this.page.locator(".code-editor textarea.ace_text-input").fill(script);
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.page.locator(".code-editor textarea.ace_text-input").clear();
1748
- await this.page.locator(".code-editor textarea.ace_text-input").fill(script);
1749
- await this.page.locator(".code-editor textarea.ace_text-input").press(".");
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.taskDrawerLocator = this.page.locator("task-drawer .dot-drawer");
2207
- this.retryButton = this.page.getByRole("button", {
2208
- name: "Retry"
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.overview = new (0, $eb81c1b930e440ff$export$519356f6c50361f7)(page);
2218
- this.scheduling = new (0, $1fbdec5dc9cde599$export$e3515314c13bc477)(page);
2219
- this.startButton = this.page.getByTestId("single-action-button");
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.completeButton = this.page.getByRole("button", {
2231
- name: "Complete",
2232
- exact: true
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
  }
@@ -2368,6 +2435,16 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
2368
2435
  async expectStartDateToBeDisplayed() {
2369
2436
  await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("start-date-title")).toHaveCount(1);
2370
2437
  }
2438
+ async expectStartDayToBeInAvatar(expectedDay) {
2439
+ const startDayAvatar = this.page.locator(`.task-date-content .MuiAvatar-root[aria-label] `).nth(0);
2440
+ const startDay = await startDayAvatar.locator("..").locator("h3").textContent();
2441
+ (0, $kKeXs$playwrighttest.expect)(startDay?.trim()).toBe(expectedDay);
2442
+ }
2443
+ async expectEndDayToBeInAvatar(expectedDay) {
2444
+ const endDayAvatar = this.page.locator(`.task-date-content .MuiAvatar-root[aria-label] `).nth(1);
2445
+ const endDay = await endDayAvatar.locator("..").locator("h3").textContent();
2446
+ (0, $kKeXs$playwrighttest.expect)(endDay?.trim()).toBe(expectedDay);
2447
+ }
2371
2448
  async expectEndDateToBeDisplayed() {
2372
2449
  await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("end-date-title")).toHaveCount(1);
2373
2450
  }
@@ -3104,6 +3181,15 @@ class $2c89ba54932fbba8$export$f8f26dd395d7e1bd extends (0, $f8721861c660dd88$ex
3104
3181
  async clearSearchFilter() {
3105
3182
  await this.page.locator(".searchFilter").clear();
3106
3183
  }
3184
+ async leaveWithoutSaving() {
3185
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
3186
+ name: "Confirm leave"
3187
+ })).toBeVisible();
3188
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("paragraph")).toContainText("You have unsaved changes that will be lost.");
3189
+ await this.page.getByRole("button", {
3190
+ name: "Leave without saving"
3191
+ }).click();
3192
+ }
3107
3193
  }
3108
3194
 
3109
3195
 
@@ -3140,6 +3226,13 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
3140
3226
  getPhase(phaseName) {
3141
3227
  return new $9b9a8c3da392d020$var$Phase(this.page, phaseName);
3142
3228
  }
3229
+ async expectPhaseCountToBe(expectedPhaseCount) {
3230
+ const phaseCount = await this.page.locator(".phase").count();
3231
+ (0, $kKeXs$playwrighttest.expect)(phaseCount).toBe(expectedPhaseCount);
3232
+ }
3233
+ async expectVariableToBeFound(variableName) {
3234
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`span.variable:has-text("${variableName}")`)).toHaveCount(1);
3235
+ }
3143
3236
  async expectNotFlagged() {
3144
3237
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".flag-none-icon")).toBeHidden();
3145
3238
  }
@@ -3507,12 +3600,13 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
3507
3600
  }
3508
3601
  async isMenuItemDisabled(menuName, taskTitle) {
3509
3602
  await this.openContextMenuForTask(taskTitle);
3510
- await (0, $kKeXs$playwrighttest.expect)(this.contextMenuButton.filter({
3603
+ const menuItem = this.contextMenuButton.filter({
3511
3604
  hasText: menuName
3512
- })).toHaveClass(/disabled/);
3513
- await (0, $kKeXs$playwrighttest.expect)(this.contextMenuButton.filter({
3514
- hasText: menuName
3515
- }).locator("a")).toBeDisabled();
3605
+ });
3606
+ await (0, $kKeXs$playwrighttest.expect)(menuItem).toHaveClass(/disabled/);
3607
+ const anchorTag = menuItem.locator("a");
3608
+ const disabledAttribute = await anchorTag.getAttribute("disabled");
3609
+ await (0, $kKeXs$playwrighttest.expect)(disabledAttribute).not.toBeNull();
3516
3610
  await this.closeContextMenu();
3517
3611
  }
3518
3612
  async expectMenuItemIsNotVisible(menuName, taskTitle) {
@@ -3544,7 +3638,10 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
3544
3638
  await this.page.locator(".icon-close").click();
3545
3639
  await this.page.locator("#task-title").fill(taskTitle);
3546
3640
  await this.page.getByTestId("save-select-task-btn").click();
3547
- await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.getByText(taskTitle)).toBeVisible();
3641
+ await this.page.locator("#release-header").click();
3642
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task-title").filter({
3643
+ hasText: taskTitle
3644
+ })).toBeVisible();
3548
3645
  }
3549
3646
  async getNumberOfTasks() {
3550
3647
  return await this.phaseLocator.locator(".task").count();
@@ -3674,6 +3771,51 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
3674
3771
  hasText: taskName
3675
3772
  })).toBeVisible();
3676
3773
  }
3774
+ async expectContainingTask(taskName, exist = true) {
3775
+ const taskHeaderLocator = this.phaseLocator.locator(".task-header").filter({
3776
+ hasText: taskName
3777
+ });
3778
+ if (exist) await (0, $kKeXs$playwrighttest.expect)(taskHeaderLocator).toContainText(taskName);
3779
+ else await (0, $kKeXs$playwrighttest.expect)(taskHeaderLocator).not.toContainText(taskName);
3780
+ }
3781
+ // eslint-disable-next-line max-params
3782
+ async addTaskInGroup(currentGroupType, taskTitle, taskGroup, taskType) {
3783
+ const groupTaskLocator = this.phaseLocator.filter({
3784
+ hasText: "Dev.Phase"
3785
+ }).locator("li").filter({
3786
+ hasText: currentGroupType
3787
+ }).locator("a.add-task.link");
3788
+ await groupTaskLocator.click();
3789
+ await this.page.locator("#task-selector").hover();
3790
+ await this.page.locator('button[aria-label="Clear"]').click();
3791
+ await this.page.locator("#task-selector").fill(taskGroup);
3792
+ await this.page.getByTestId(taskType).click();
3793
+ await this.page.locator(".icon-close").click();
3794
+ await this.page.locator("#task-title").fill(taskTitle);
3795
+ await this.page.getByTestId("save-select-task-btn").click();
3796
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.filter({
3797
+ hasText: currentGroupType
3798
+ }).getByText(taskTitle)).toBeVisible();
3799
+ }
3800
+ async openContextMenuForTaskInGroup(taskTitle, groupName) {
3801
+ const taskLocator = this.phaseLocator.filter({
3802
+ hasText: groupName
3803
+ }).locator(".task").filter({
3804
+ hasText: taskTitle
3805
+ });
3806
+ await taskLocator.locator(".task-inner-active > .task-container > .task-box > .task > .context-menu-button").click();
3807
+ }
3808
+ async duplicatePhase() {
3809
+ await this.phaseLocator.locator(".duplicate-phase").click();
3810
+ }
3811
+ async expectActionsDisabled() {
3812
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".duplicate-phase")).toHaveCount(0);
3813
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".delete-phase")).toHaveCount(0);
3814
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task .duplicate-task")).toHaveCount(0);
3815
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task .delete-task")).toHaveCount(0);
3816
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task-generator .add-task")).toHaveCount(0);
3817
+ await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".display")).toHaveCount(0);
3818
+ }
3677
3819
  }
3678
3820
  class $9b9a8c3da392d020$var$RestartPhaseModel extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
3679
3821
  constructor(page){
@@ -4932,6 +5074,14 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
4932
5074
  await this.modal.setConfirmPassword(password);
4933
5075
  await this.modal.save();
4934
5076
  }
5077
+ async filterUser(username) {
5078
+ await this.page.getByPlaceholder("Filter...").fill(username);
5079
+ }
5080
+ async expectToHaveFilteredUser(username) {
5081
+ return await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("row", {
5082
+ name: "" + username + ""
5083
+ })).toBeVisible();
5084
+ }
4935
5085
  async expectToHaveLoginPermission(username) {
4936
5086
  return await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("row", {
4937
5087
  name: "" + username + ""
@@ -6955,9 +7105,233 @@ class $dbc8f157e7b24b12$export$2edf430132ca35d0 extends (0, $f8721861c660dd88$ex
6955
7105
 
6956
7106
 
6957
7107
 
7108
+
7109
+
7110
+ class $3ec0e9cf832fdde8$export$9823ddf5e80770e7 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
7111
+ constructor(page){
7112
+ super(page);
7113
+ }
7114
+ async addNewInstance(typeName) {
7115
+ await this.page.locator(`.configuration-type`).filter({
7116
+ hasText: typeName
7117
+ }).locator(`.new-instance .button`).click({
7118
+ force: true
7119
+ });
7120
+ return new $3ec0e9cf832fdde8$var$ConfigurationInstancePage(this.page);
7121
+ }
7122
+ async expectInstanceDisplayed(instanceName) {
7123
+ await this.page.locator("#configuration").waitFor({
7124
+ state: "visible",
7125
+ timeout: 200000
7126
+ });
7127
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`.configuration-instance`).filter({
7128
+ hasText: instanceName
7129
+ }).isVisible()).toBe(true);
7130
+ return this;
7131
+ }
7132
+ async expectInstanceNotDisplayed(instanceName) {
7133
+ await this.page.locator("#configuration").waitFor({
7134
+ state: "visible"
7135
+ });
7136
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`.configuration-instance`).filter({
7137
+ hasText: instanceName
7138
+ }).isVisible()).toBe(false);
7139
+ return this;
7140
+ }
7141
+ async openInstance(instanceName) {
7142
+ await this.page.locator(`.configuration-instance`).filter({
7143
+ hasText: instanceName
7144
+ }).locator(`.edit-instance`).click({
7145
+ force: true
7146
+ });
7147
+ return new $3ec0e9cf832fdde8$var$ConfigurationInstancePage(this.page);
7148
+ }
7149
+ async deleteInstance(instanceName) {
7150
+ await this.page.locator(`.configuration-instance`).filter({
7151
+ hasText: instanceName
7152
+ }).locator(`.delete-instance`).click({
7153
+ force: true
7154
+ });
7155
+ return this;
7156
+ }
7157
+ async expectSuccessMsgToBeDisplayed(text) {
7158
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".success")).toBeVisible();
7159
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".success").textContent()).toContain(text);
7160
+ return this;
7161
+ }
7162
+ async clearFilter() {
7163
+ await this.page.locator(".search-input-filter input").clear({
7164
+ force: true
7165
+ });
7166
+ return this;
7167
+ }
7168
+ async searchInstances(instanceName) {
7169
+ await this.page.getByPlaceholder("Search...").click();
7170
+ await this.page.getByPlaceholder("Search...").fill(instanceName);
7171
+ return this;
7172
+ }
7173
+ async expectErrorDisplayed() {
7174
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".modal-header h4")).toContainText("Error");
7175
+ await this.page.locator(".modal-header .xl-icon.close-icon").click();
7176
+ }
7177
+ }
7178
+ class $3ec0e9cf832fdde8$var$ConfigurationInstancePage extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
7179
+ constructor(page){
7180
+ super(page);
7181
+ }
7182
+ async setTextField(fieldName, fieldValue) {
7183
+ await this.page.locator(`input[name=${fieldName}]`).clear({
7184
+ force: true
7185
+ });
7186
+ await this.page.locator(`input[name=${fieldName}]`).fill(fieldValue, {
7187
+ force: true
7188
+ });
7189
+ return this;
7190
+ }
7191
+ async setNumberField(fieldName, fieldValue) {
7192
+ await this.page.locator(`#${fieldName}`).clear({
7193
+ force: true
7194
+ });
7195
+ await this.page.locator(`#${fieldName}`).fill(fieldValue.toString(), {
7196
+ force: true
7197
+ });
7198
+ return this;
7199
+ }
7200
+ async selectFromDropdown(fieldName, element) {
7201
+ await this.page.getByLabel(fieldName).click();
7202
+ await this.page.getByRole("option", {
7203
+ name: element
7204
+ }).click();
7205
+ return this;
7206
+ }
7207
+ async save() {
7208
+ await this.page.getByRole("button", {
7209
+ name: "Save"
7210
+ }).click();
7211
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("success")).toBeVisible();
7212
+ return this;
7213
+ }
7214
+ async test() {
7215
+ await this.page.getByRole("button", {
7216
+ name: "Test"
7217
+ }).click();
7218
+ return this;
7219
+ }
7220
+ async cancel() {
7221
+ await this.page.getByRole("button", {
7222
+ name: "Cancel"
7223
+ }).click();
7224
+ return this;
7225
+ }
7226
+ async expectResultBanner(message) {
7227
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".configuration-result-banner")).toBeVisible();
7228
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".configuration-result-banner")).toContainText(message);
7229
+ return this;
7230
+ }
7231
+ async expectDropdownToBe(fieldName, fieldValue) {
7232
+ const value = await this.page.locator(`#${fieldName}`).getAttribute("value");
7233
+ (0, $kKeXs$playwrighttest.expect)(value).toBe(fieldValue);
7234
+ return this;
7235
+ }
7236
+ async clearDropdown(fieldName) {
7237
+ await this.page.locator(`input[id=${fieldName}]`).click({
7238
+ force: true
7239
+ });
7240
+ await this.page.getByRole(`button`, {
7241
+ name: "Clear"
7242
+ }).click();
7243
+ return this;
7244
+ }
7245
+ async clickField(fieldName) {
7246
+ await this.page.getByLabel(fieldName).click();
7247
+ return this;
7248
+ }
7249
+ async expectTextFieldToBe(fieldName, fieldValue) {
7250
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`input[name=${fieldName}]`).getAttribute("value")).toContain(fieldValue);
7251
+ return this;
7252
+ }
7253
+ async setStringList(value) {
7254
+ await this.page.locator(".input-list input#stringList").click();
7255
+ if (value instanceof Array) for (const val of value){
7256
+ await this.page.locator(".input-list input#stringList").fill(val);
7257
+ await this.page.locator('[data-test-id="stringList"]').getByLabel("add icon button").click();
7258
+ }
7259
+ else await this.page.locator(".input-list input#stringList").fill(value);
7260
+ return this;
7261
+ }
7262
+ async expectStringListCountToBe(count) {
7263
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`[data-test-id="stringList"] .list`).count()).toBe(count);
7264
+ return this;
7265
+ }
7266
+ async removeString(value) {
7267
+ await this.page.locator("li").filter({
7268
+ hasText: value
7269
+ }).getByLabel("close icon button").click();
7270
+ return this;
7271
+ }
7272
+ async setStringSet(value) {
7273
+ await this.page.locator(".input-list input#stringSet").click();
7274
+ if (value instanceof Array) for (const val of value){
7275
+ await this.page.locator(".input-list input#stringSet").fill(val);
7276
+ await this.page.locator('[data-test-id="stringSet"]').getByLabel("add icon button").click();
7277
+ }
7278
+ else await this.page.locator(".input-list input#stringSet").fill(value);
7279
+ return this;
7280
+ }
7281
+ async expectStringSetCountToBe(count) {
7282
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`[data-test-id="stringSet"] .list`).count()).toBe(count);
7283
+ return this;
7284
+ }
7285
+ async setStringMap(pairs) {
7286
+ await this.page.locator('[data-test-id="stringMap"]').getByTestId("icon-button-tooltip").getByLabel("Add key-value pair").click();
7287
+ await this.page.locator("#new-row-key-input").fill(pairs.key);
7288
+ await this.page.locator("#new-row-value-input").fill(pairs.value);
7289
+ await this.page.getByRole("button", {
7290
+ name: "check-line icon"
7291
+ }).click();
7292
+ }
7293
+ async expectStringMapCountToBe(count) {
7294
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`[data-test-id="stringMap"] .map-data-row`).count()).toBe(count);
7295
+ return this;
7296
+ }
7297
+ async expectTestButtonToBeDisabled() {
7298
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("action-toolbar button").filter({
7299
+ hasText: "Test"
7300
+ })).toBeDisabled();
7301
+ return this;
7302
+ }
7303
+ async togglePasswordFieldVariable(fieldName) {
7304
+ await this.page.locator(`.input-with-variables[data-test-id="${fieldName}"] button`).click({
7305
+ force: true
7306
+ });
7307
+ return this;
7308
+ }
7309
+ async setPasswordFieldVariable(fieldName, fieldValue) {
7310
+ await this.page.locator(`.input-with-variables[data-test-id="${fieldName}"] input`).click({
7311
+ force: true
7312
+ });
7313
+ await this.page.locator(`.input-with-variables[data-test-id="${fieldName}"] li`).filter({
7314
+ hasText: fieldValue
7315
+ }).click();
7316
+ return this;
7317
+ }
7318
+ async expectFieldsToNotBeVisible(fieldNames) {
7319
+ if (typeof fieldNames !== "string") for (const fName of fieldNames)await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`#${fName}`)).not.toBeVisible();
7320
+ else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`#${fieldNames}`)).not.toBeVisible();
7321
+ return this;
7322
+ }
7323
+ async expectFieldsToBeVisible(fieldNames) {
7324
+ if (typeof fieldNames !== "string") for (const fName of fieldNames)await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`input[name=${fName}]`)).toBeVisible();
7325
+ else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`input[name=${fieldNames}]`)).toBeVisible();
7326
+ return this;
7327
+ }
7328
+ }
7329
+
7330
+
6958
7331
  class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
6959
7332
  constructor(page){
6960
7333
  this.page = page;
7334
+ this.connections = new (0, $3ec0e9cf832fdde8$export$9823ddf5e80770e7)(page);
6961
7335
  this.dataRandomGenerator = new (0, $ce55a4fc3c0aa96a$export$e40b5d3c74b04c89)();
6962
7336
  this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
6963
7337
  this.folderPage = new (0, $9058d40a81bdb1f5$export$b453f08936c58edb)(page);
@@ -7094,6 +7468,7 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
7094
7468
  await this.page.locator("ul.side-nav li").getByLabel("Connections", {
7095
7469
  exact: true
7096
7470
  }).click();
7471
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Connections")).toBeVisible();
7097
7472
  }
7098
7473
  async openReleaseOrTemplate(id, release) {
7099
7474
  const url = release ? "releases" : "templates";
@@ -7112,6 +7487,10 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
7112
7487
  async openRisksProfile() {
7113
7488
  await this.page.goto("./#/risks");
7114
7489
  }
7490
+ async openConnection() {
7491
+ await this.page.goto("./#/configuration");
7492
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Connections")).toBeVisible();
7493
+ }
7115
7494
  }
7116
7495
 
7117
7496
 
@@ -8265,6 +8644,25 @@ class $6998c6a53a9eb4fa$var$Fixtures {
8265
8644
  this.userProfiles.push(profile.canonicalId);
8266
8645
  await this.doPost("fixtures/userProfile", profile);
8267
8646
  }
8647
+ async resetUserProfile(username, fullName) {
8648
+ this.usernames.push(username);
8649
+ return this.updateProfile({
8650
+ username: username,
8651
+ external: false,
8652
+ profileId: username,
8653
+ email: "",
8654
+ fullName: fullName ? fullName : username,
8655
+ loginAllowed: true,
8656
+ // dateFormat: "dd/MM/yy",
8657
+ dateFormat: "M/d/yy",
8658
+ // timeFormat: "HH:mm",
8659
+ timeFormat: "h:mm a",
8660
+ firstDayOfWeek: 0
8661
+ });
8662
+ }
8663
+ async updateProfile(profile) {
8664
+ return this.doPut("profile", profile);
8665
+ }
8268
8666
  async expectJiraTaskStatus(taskId, expectedStatus) {
8269
8667
  const headers = {
8270
8668
  Authorization: `Basic ${btoa("xlr-jira-testuser@xebialabs.com:zgsXK6c3oLVkJxrWVJQy9DB7")}`,