@digital-ai/devops-page-object-release 0.0.33 → 0.0.35

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/module.js CHANGED
@@ -396,6 +396,14 @@ class $dfc4ce40cbd0eb71$export$f8e64fcf447db2bf extends (0, $9626bc9256ce31f7$ex
396
396
  await this.page.locator(".variable-label input").fill(labelname);
397
397
  if (description) await this.page.locator(".variable-description input").fill(description);
398
398
  }
399
+ async addNewVariableInFolder(variableName, labelname, description) {
400
+ await this.page.locator("button", {
401
+ hasText: "New folder variable"
402
+ }).click();
403
+ await this.page.fill(`[name="fieldKey"]`, variableName);
404
+ await this.page.locator(".variable-label input").fill(labelname);
405
+ if (description) await this.page.locator(".variable-description input").fill(description);
406
+ }
399
407
  async selectVariableTextType(valueName, multiline) {
400
408
  await this.page.getByRole("combobox").selectOption("StringVariable");
401
409
  if (multiline) {
@@ -474,6 +482,9 @@ class $dfc4ce40cbd0eb71$export$f8e64fcf447db2bf extends (0, $9626bc9256ce31f7$ex
474
482
  await (0, $hOLA6$expect)(createButton).not.toBeVisible();
475
483
  }
476
484
  async expectVariableWithNameValueAndType(name, value, type) {
485
+ await this.page.locator(".variables-list .row-table").waitFor({
486
+ timeout: 10000
487
+ });
477
488
  const rowLocator = await this.page.locator(".variable .data-row").allTextContents();
478
489
  (0, $hOLA6$expect)(rowLocator.toString()).toContain(name);
479
490
  (0, $hOLA6$expect)(rowLocator.toString()).toContain(value);
@@ -733,11 +744,29 @@ class $dfc4ce40cbd0eb71$var$DeleteVariableModel extends (0, $9626bc9256ce31f7$ex
733
744
 
734
745
  class $69e86f559cdf2bd0$export$15d3f9b095bb5188 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
735
746
  async expectCommentToContain(comment) {
736
- (0, $hOLA6$expect)(await this.page.locator(".markdown-wrapper").textContent()).toContain(comment);
747
+ await (0, $hOLA6$expect)(this.page.locator(".markdown-wrapper").getByText(comment)).toBeVisible();
737
748
  }
738
749
  async expectTaskIsCommentable(isCommentable) {
739
750
  return (0, $hOLA6$expect)(await this.page.locator("#task-comment").count()).toBe(isCommentable ? 1 : 0);
740
751
  }
752
+ async addComment(comment) {
753
+ await this.page.locator("#task-comment").fill(comment);
754
+ await this.page.locator(".icon-send-airplane").click();
755
+ return this;
756
+ }
757
+ async expectAuthorCommentsToBe(author) {
758
+ await (0, $hOLA6$expect)(this.page.locator(".task-comment-user h6")).toHaveText(author);
759
+ return this;
760
+ }
761
+ async expectCommentsDateTimeToBe(comment, date) {
762
+ const commentLocator = this.page.locator(".task-comment-body").filter({
763
+ has: this.page.locator(".markdown-switcher").getByText(comment)
764
+ }).locator(".task-comment-user span").getByRole("tooltip", {
765
+ name: "Edited"
766
+ });
767
+ await (0, $hOLA6$expect)(commentLocator).toHaveAttribute("aria-label", date);
768
+ return this;
769
+ }
741
770
  }
742
771
 
743
772
 
@@ -954,7 +983,7 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
954
983
  return new $90bb70a7e909e500$export$62811a109bb4377d(propertyName, this.page);
955
984
  }
956
985
  async setValueFromString(propertyName, value) {
957
- await this.railLocator.locator(`input[name=${propertyName}]`).focus();
986
+ await this.railLocator.locator(`input[id="${propertyName}"]`).focus();
958
987
  await this.railLocator.locator(`input[id="${propertyName}"]`).fill(value);
959
988
  }
960
989
  async setValueFromLargeString(propertyName, value) {
@@ -972,6 +1001,9 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
972
1001
  }).click();
973
1002
  }
974
1003
  async createNewVariableForField(objectID, variable) {
1004
+ await this.page.locator(`div[data-testid="${objectID}"] .icon-variable`).waitFor({
1005
+ timeout: 10000
1006
+ });
975
1007
  await this.page.locator(`div[data-testid="${objectID}"] .icon-variable`).click();
976
1008
  await this.page.locator(`#${objectID}`).fill(variable);
977
1009
  await this.railLocator.locator(`.dot-popper button`, {
@@ -1509,6 +1541,7 @@ class $90bb70a7e909e500$export$62811a109bb4377d extends (0, $9626bc9256ce31f7$ex
1509
1541
  await this.page.locator(`.map-data-row`).filter({
1510
1542
  has: this.page.locator(`.map-key`).getByText(key)
1511
1543
  }).locator(`.icon-delete`).click();
1544
+ await (0, $hOLA6$expect)(this.page.locator(`.map-data-row .map-key`).getByText(key)).not.toBeVisible();
1512
1545
  return this;
1513
1546
  }
1514
1547
  async expectStringMapCount(count) {
@@ -1712,12 +1745,20 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
1712
1745
  async expectCompleteButtonEnabled() {
1713
1746
  await (0, $hOLA6$expect)(this.completeButton).toBeEnabled();
1714
1747
  }
1748
+ async expectCompleteButtonNotEnabled() {
1749
+ await (0, $hOLA6$expect)(this.completeButton).not.toBeEnabled();
1750
+ }
1715
1751
  async setTitle(title) {
1716
1752
  await this.page.getByTestId("task-title-input-view-mode-typography").click();
1717
1753
  await this.page.getByTestId("task-title-input-input").clear();
1718
1754
  await this.page.getByTestId("task-title-input-input").fill(title);
1719
1755
  await this.page.getByTestId("task-title-input-input").press("Enter");
1720
1756
  }
1757
+ async expectTaskTitleEditable() {
1758
+ await this.page.getByTestId("task-title-input-view-mode-typography").click();
1759
+ await (0, $hOLA6$expect)(this.page.getByTestId("task-title-input-input")).toBeEditable();
1760
+ return this;
1761
+ }
1721
1762
  async expectTypeToContain(taskType) {
1722
1763
  await (0, $hOLA6$expect)(this.page.locator(".task-drawer .task-type")).toContainText(taskType);
1723
1764
  }
@@ -1769,10 +1810,34 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
1769
1810
  }).click();
1770
1811
  }
1771
1812
  async assignToMe(userName, existingUsername) {
1813
+ await this.page.locator(".user-task-assigned-wrapper .editable").getByText(existingUsername).click();
1814
+ await this.page.getByTestId(`render-option-${userName}`).click();
1815
+ }
1816
+ async removeAssignToUser(userName) {
1772
1817
  await this.page.getByRole("button", {
1773
- name: existingUsername
1818
+ name: userName
1774
1819
  }).click();
1775
- await this.page.getByTestId(`render-option-${userName}`).click();
1820
+ await this.page.getByRole("button", {
1821
+ name: "Clear"
1822
+ }).click();
1823
+ return this;
1824
+ }
1825
+ async assignToTeam(existingTeamName, teamName) {
1826
+ await this.page.locator(".team-task-assigned-wrapper .editable").getByText(existingTeamName).click();
1827
+ await this.page.getByTestId(`render-option-${teamName}`).click();
1828
+ return this;
1829
+ }
1830
+ async expectAssignedToTeam(teamName) {
1831
+ await (0, $hOLA6$expect)(this.page.getByRole("button", {
1832
+ name: teamName
1833
+ })).toBeVisible();
1834
+ }
1835
+ async removeAssignedTeam(teamName) {
1836
+ await this.page.locator(".team-task-assigned-wrapper .editable").getByText(teamName).click();
1837
+ await this.page.getByRole("button", {
1838
+ name: "Clear"
1839
+ }).click();
1840
+ return this;
1776
1841
  }
1777
1842
  async setFlag(flagName, flagComment) {
1778
1843
  await this.page.getByTestId("flag-btn").click();
@@ -2242,6 +2307,15 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
2242
2307
  async expectRiskProfileTitleToBe(riskProfile) {
2243
2308
  await (0, $hOLA6$expect)(this.page.locator('[data-test="release-risk-profile"]')).toContainText(riskProfile);
2244
2309
  }
2310
+ async expectStartFromReleaseToBe(parentRelease) {
2311
+ await (0, $hOLA6$expect)(this.page.locator(".started-from-release")).toHaveText(parentRelease);
2312
+ }
2313
+ async expectTemplateURLToBe(templateURL) {
2314
+ (0, $hOLA6$expect)(await this.page.locator('[data-test="created-from-template"]').getAttribute("href")).toContain(templateURL);
2315
+ }
2316
+ async expectStartFromReleaseURLToBe(parentReleaseURL) {
2317
+ (0, $hOLA6$expect)(await this.page.locator(".started-from-release").getAttribute("href")).toContain(parentReleaseURL);
2318
+ }
2245
2319
  }
2246
2320
 
2247
2321
 
@@ -2920,9 +2994,9 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
2920
2994
  })).not.toBeVisible();
2921
2995
  }
2922
2996
  async toggleTaskFilter(filterOption) {
2923
- this.clickFilterOptions();
2997
+ await this.clickFilterOptions();
2924
2998
  await this.page.locator(`#filter-container #${filterOption}`).click();
2925
- this.clickFilterOptions();
2999
+ await this.clickFilterOptions();
2926
3000
  }
2927
3001
  async clickFilterOptions() {
2928
3002
  await this.page.locator("#release-header .dropdown-button").click();
@@ -3186,10 +3260,13 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
3186
3260
  async clickViewAllCompletedPhase() {
3187
3261
  await this.page.getByText("View all completed phases").click();
3188
3262
  }
3189
- async expectTaskToBePresent(taskName) {
3190
- await (0, $hOLA6$expect)(this.phaseLocator.locator(".task").filter({
3263
+ async expectTaskToBePresent(taskName, visible = true) {
3264
+ if (visible) await (0, $hOLA6$expect)(this.phaseLocator.locator(".task").filter({
3191
3265
  hasText: taskName
3192
3266
  })).toBeVisible();
3267
+ else await (0, $hOLA6$expect)(this.phaseLocator.locator(".task").filter({
3268
+ hasText: taskName
3269
+ })).not.toBeVisible();
3193
3270
  }
3194
3271
  async expectContainingTask(taskName, exist = true) {
3195
3272
  const taskHeaderLocator = this.phaseLocator.locator(".task-header").filter({
@@ -3217,13 +3294,27 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
3217
3294
  hasText: currentGroupType
3218
3295
  }).getByText(taskTitle)).toBeVisible();
3219
3296
  }
3220
- async openContextMenuForTaskInGroup(taskTitle, groupName) {
3297
+ async openContextMenuForTaskInGroup(groupName, taskTitle) {
3221
3298
  const taskLocator = this.phaseLocator.filter({
3222
3299
  hasText: groupName
3223
3300
  }).locator(".task").filter({
3224
3301
  hasText: taskTitle
3225
3302
  });
3226
3303
  await taskLocator.locator(".task-inner-active > .task-container > .task-box > .task > .context-menu-button").click();
3304
+ await taskLocator.locator(".task .context-menu-button").click();
3305
+ }
3306
+ async duplicateFromContextualMenuInGroup(groupName, taskTitle) {
3307
+ await this.openContextMenuForTaskInGroup(groupName, taskTitle);
3308
+ await this.page.locator(".dropdown-menu li").getByText("Duplicate").click();
3309
+ return this;
3310
+ }
3311
+ async deleteFromContextualMenuInGroup(groupName, taskTitle) {
3312
+ await this.openContextMenuForTaskInGroup(groupName, taskTitle);
3313
+ await this.page.locator(".dropdown-menu li").getByText("Delete").click();
3314
+ await this.page.getByRole("button", {
3315
+ name: "Delete"
3316
+ }).click();
3317
+ return this;
3227
3318
  }
3228
3319
  async duplicatePhase() {
3229
3320
  await this.phaseLocator.locator(".duplicate-phase").click();
@@ -4905,9 +4996,6 @@ class $3a340a3f4fd8f04d$export$43682cddead1dd78 extends (0, $9626bc9256ce31f7$ex
4905
4996
  }).click();
4906
4997
  await this.page.locator(".tl-event-title").getByText(release_title).scrollIntoViewIfNeeded();
4907
4998
  await this.page.locator(".tl-event-title").getByText(release_title).click();
4908
- await this.page.locator(".release-modal-container").waitFor({
4909
- state: "visible"
4910
- });
4911
4999
  const modalWindow = await this.page.locator(".release-modal-container").isVisible();
4912
5000
  if (!modalWindow) {
4913
5001
  await this.page.locator(".tl-event-title").getByText(release_title).scrollIntoViewIfNeeded();