@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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
+ ## 0.0.35
4
+
5
+ ### Patch Changes
6
+
7
+ - 90124a3: S-118788: Fixed pages as per review comments and flakiness of custom script
8
+
9
+ ## 0.0.34
10
+
11
+ ### Patch Changes
12
+
13
+ - 7566c36: S 118564: Migrated tasks-details-scenario into playwright
14
+
3
15
  ## 0.0.33
4
16
 
5
17
  ### Patch Changes
package/dist/main.js CHANGED
@@ -1332,6 +1332,14 @@ class $59543fc69900e8db$export$f8e64fcf447db2bf extends (0, $f8721861c660dd88$ex
1332
1332
  await this.page.locator(".variable-label input").fill(labelname);
1333
1333
  if (description) await this.page.locator(".variable-description input").fill(description);
1334
1334
  }
1335
+ async addNewVariableInFolder(variableName, labelname, description) {
1336
+ await this.page.locator("button", {
1337
+ hasText: "New folder variable"
1338
+ }).click();
1339
+ await this.page.fill(`[name="fieldKey"]`, variableName);
1340
+ await this.page.locator(".variable-label input").fill(labelname);
1341
+ if (description) await this.page.locator(".variable-description input").fill(description);
1342
+ }
1335
1343
  async selectVariableTextType(valueName, multiline) {
1336
1344
  await this.page.getByRole("combobox").selectOption("StringVariable");
1337
1345
  if (multiline) {
@@ -1410,6 +1418,9 @@ class $59543fc69900e8db$export$f8e64fcf447db2bf extends (0, $f8721861c660dd88$ex
1410
1418
  await (0, $kKeXs$playwrighttest.expect)(createButton).not.toBeVisible();
1411
1419
  }
1412
1420
  async expectVariableWithNameValueAndType(name, value, type) {
1421
+ await this.page.locator(".variables-list .row-table").waitFor({
1422
+ timeout: 10000
1423
+ });
1413
1424
  const rowLocator = await this.page.locator(".variable .data-row").allTextContents();
1414
1425
  (0, $kKeXs$playwrighttest.expect)(rowLocator.toString()).toContain(name);
1415
1426
  (0, $kKeXs$playwrighttest.expect)(rowLocator.toString()).toContain(value);
@@ -1669,11 +1680,29 @@ class $59543fc69900e8db$var$DeleteVariableModel extends (0, $f8721861c660dd88$ex
1669
1680
 
1670
1681
  class $6c924a95a765a086$export$15d3f9b095bb5188 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
1671
1682
  async expectCommentToContain(comment) {
1672
- (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".markdown-wrapper").textContent()).toContain(comment);
1683
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".markdown-wrapper").getByText(comment)).toBeVisible();
1673
1684
  }
1674
1685
  async expectTaskIsCommentable(isCommentable) {
1675
1686
  return (0, $kKeXs$playwrighttest.expect)(await this.page.locator("#task-comment").count()).toBe(isCommentable ? 1 : 0);
1676
1687
  }
1688
+ async addComment(comment) {
1689
+ await this.page.locator("#task-comment").fill(comment);
1690
+ await this.page.locator(".icon-send-airplane").click();
1691
+ return this;
1692
+ }
1693
+ async expectAuthorCommentsToBe(author) {
1694
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-comment-user h6")).toHaveText(author);
1695
+ return this;
1696
+ }
1697
+ async expectCommentsDateTimeToBe(comment, date) {
1698
+ const commentLocator = this.page.locator(".task-comment-body").filter({
1699
+ has: this.page.locator(".markdown-switcher").getByText(comment)
1700
+ }).locator(".task-comment-user span").getByRole("tooltip", {
1701
+ name: "Edited"
1702
+ });
1703
+ await (0, $kKeXs$playwrighttest.expect)(commentLocator).toHaveAttribute("aria-label", date);
1704
+ return this;
1705
+ }
1677
1706
  }
1678
1707
 
1679
1708
 
@@ -1890,7 +1919,7 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1890
1919
  return new $eb81c1b930e440ff$export$62811a109bb4377d(propertyName, this.page);
1891
1920
  }
1892
1921
  async setValueFromString(propertyName, value) {
1893
- await this.railLocator.locator(`input[name=${propertyName}]`).focus();
1922
+ await this.railLocator.locator(`input[id="${propertyName}"]`).focus();
1894
1923
  await this.railLocator.locator(`input[id="${propertyName}"]`).fill(value);
1895
1924
  }
1896
1925
  async setValueFromLargeString(propertyName, value) {
@@ -1908,6 +1937,9 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1908
1937
  }).click();
1909
1938
  }
1910
1939
  async createNewVariableForField(objectID, variable) {
1940
+ await this.page.locator(`div[data-testid="${objectID}"] .icon-variable`).waitFor({
1941
+ timeout: 10000
1942
+ });
1911
1943
  await this.page.locator(`div[data-testid="${objectID}"] .icon-variable`).click();
1912
1944
  await this.page.locator(`#${objectID}`).fill(variable);
1913
1945
  await this.railLocator.locator(`.dot-popper button`, {
@@ -2445,6 +2477,7 @@ class $eb81c1b930e440ff$export$62811a109bb4377d extends (0, $f8721861c660dd88$ex
2445
2477
  await this.page.locator(`.map-data-row`).filter({
2446
2478
  has: this.page.locator(`.map-key`).getByText(key)
2447
2479
  }).locator(`.icon-delete`).click();
2480
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.map-data-row .map-key`).getByText(key)).not.toBeVisible();
2448
2481
  return this;
2449
2482
  }
2450
2483
  async expectStringMapCount(count) {
@@ -2648,12 +2681,20 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
2648
2681
  async expectCompleteButtonEnabled() {
2649
2682
  await (0, $kKeXs$playwrighttest.expect)(this.completeButton).toBeEnabled();
2650
2683
  }
2684
+ async expectCompleteButtonNotEnabled() {
2685
+ await (0, $kKeXs$playwrighttest.expect)(this.completeButton).not.toBeEnabled();
2686
+ }
2651
2687
  async setTitle(title) {
2652
2688
  await this.page.getByTestId("task-title-input-view-mode-typography").click();
2653
2689
  await this.page.getByTestId("task-title-input-input").clear();
2654
2690
  await this.page.getByTestId("task-title-input-input").fill(title);
2655
2691
  await this.page.getByTestId("task-title-input-input").press("Enter");
2656
2692
  }
2693
+ async expectTaskTitleEditable() {
2694
+ await this.page.getByTestId("task-title-input-view-mode-typography").click();
2695
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("task-title-input-input")).toBeEditable();
2696
+ return this;
2697
+ }
2657
2698
  async expectTypeToContain(taskType) {
2658
2699
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-drawer .task-type")).toContainText(taskType);
2659
2700
  }
@@ -2705,10 +2746,34 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
2705
2746
  }).click();
2706
2747
  }
2707
2748
  async assignToMe(userName, existingUsername) {
2749
+ await this.page.locator(".user-task-assigned-wrapper .editable").getByText(existingUsername).click();
2750
+ await this.page.getByTestId(`render-option-${userName}`).click();
2751
+ }
2752
+ async removeAssignToUser(userName) {
2708
2753
  await this.page.getByRole("button", {
2709
- name: existingUsername
2754
+ name: userName
2710
2755
  }).click();
2711
- await this.page.getByTestId(`render-option-${userName}`).click();
2756
+ await this.page.getByRole("button", {
2757
+ name: "Clear"
2758
+ }).click();
2759
+ return this;
2760
+ }
2761
+ async assignToTeam(existingTeamName, teamName) {
2762
+ await this.page.locator(".team-task-assigned-wrapper .editable").getByText(existingTeamName).click();
2763
+ await this.page.getByTestId(`render-option-${teamName}`).click();
2764
+ return this;
2765
+ }
2766
+ async expectAssignedToTeam(teamName) {
2767
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("button", {
2768
+ name: teamName
2769
+ })).toBeVisible();
2770
+ }
2771
+ async removeAssignedTeam(teamName) {
2772
+ await this.page.locator(".team-task-assigned-wrapper .editable").getByText(teamName).click();
2773
+ await this.page.getByRole("button", {
2774
+ name: "Clear"
2775
+ }).click();
2776
+ return this;
2712
2777
  }
2713
2778
  async setFlag(flagName, flagComment) {
2714
2779
  await this.page.getByTestId("flag-btn").click();
@@ -3178,6 +3243,15 @@ class $8681d8a3f46f87b7$export$d1077068a9cc9f17 extends (0, $f8721861c660dd88$ex
3178
3243
  async expectRiskProfileTitleToBe(riskProfile) {
3179
3244
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator('[data-test="release-risk-profile"]')).toContainText(riskProfile);
3180
3245
  }
3246
+ async expectStartFromReleaseToBe(parentRelease) {
3247
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".started-from-release")).toHaveText(parentRelease);
3248
+ }
3249
+ async expectTemplateURLToBe(templateURL) {
3250
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator('[data-test="created-from-template"]').getAttribute("href")).toContain(templateURL);
3251
+ }
3252
+ async expectStartFromReleaseURLToBe(parentReleaseURL) {
3253
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".started-from-release").getAttribute("href")).toContain(parentReleaseURL);
3254
+ }
3181
3255
  }
3182
3256
 
3183
3257
 
@@ -3856,9 +3930,9 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
3856
3930
  })).not.toBeVisible();
3857
3931
  }
3858
3932
  async toggleTaskFilter(filterOption) {
3859
- this.clickFilterOptions();
3933
+ await this.clickFilterOptions();
3860
3934
  await this.page.locator(`#filter-container #${filterOption}`).click();
3861
- this.clickFilterOptions();
3935
+ await this.clickFilterOptions();
3862
3936
  }
3863
3937
  async clickFilterOptions() {
3864
3938
  await this.page.locator("#release-header .dropdown-button").click();
@@ -4122,10 +4196,13 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
4122
4196
  async clickViewAllCompletedPhase() {
4123
4197
  await this.page.getByText("View all completed phases").click();
4124
4198
  }
4125
- async expectTaskToBePresent(taskName) {
4126
- await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task").filter({
4199
+ async expectTaskToBePresent(taskName, visible = true) {
4200
+ if (visible) await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task").filter({
4127
4201
  hasText: taskName
4128
4202
  })).toBeVisible();
4203
+ else await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task").filter({
4204
+ hasText: taskName
4205
+ })).not.toBeVisible();
4129
4206
  }
4130
4207
  async expectContainingTask(taskName, exist = true) {
4131
4208
  const taskHeaderLocator = this.phaseLocator.locator(".task-header").filter({
@@ -4153,13 +4230,27 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
4153
4230
  hasText: currentGroupType
4154
4231
  }).getByText(taskTitle)).toBeVisible();
4155
4232
  }
4156
- async openContextMenuForTaskInGroup(taskTitle, groupName) {
4233
+ async openContextMenuForTaskInGroup(groupName, taskTitle) {
4157
4234
  const taskLocator = this.phaseLocator.filter({
4158
4235
  hasText: groupName
4159
4236
  }).locator(".task").filter({
4160
4237
  hasText: taskTitle
4161
4238
  });
4162
4239
  await taskLocator.locator(".task-inner-active > .task-container > .task-box > .task > .context-menu-button").click();
4240
+ await taskLocator.locator(".task .context-menu-button").click();
4241
+ }
4242
+ async duplicateFromContextualMenuInGroup(groupName, taskTitle) {
4243
+ await this.openContextMenuForTaskInGroup(groupName, taskTitle);
4244
+ await this.page.locator(".dropdown-menu li").getByText("Duplicate").click();
4245
+ return this;
4246
+ }
4247
+ async deleteFromContextualMenuInGroup(groupName, taskTitle) {
4248
+ await this.openContextMenuForTaskInGroup(groupName, taskTitle);
4249
+ await this.page.locator(".dropdown-menu li").getByText("Delete").click();
4250
+ await this.page.getByRole("button", {
4251
+ name: "Delete"
4252
+ }).click();
4253
+ return this;
4163
4254
  }
4164
4255
  async duplicatePhase() {
4165
4256
  await this.phaseLocator.locator(".duplicate-phase").click();
@@ -5841,9 +5932,6 @@ class $a8855257f8bb2b12$export$43682cddead1dd78 extends (0, $f8721861c660dd88$ex
5841
5932
  }).click();
5842
5933
  await this.page.locator(".tl-event-title").getByText(release_title).scrollIntoViewIfNeeded();
5843
5934
  await this.page.locator(".tl-event-title").getByText(release_title).click();
5844
- await this.page.locator(".release-modal-container").waitFor({
5845
- state: "visible"
5846
- });
5847
5935
  const modalWindow = await this.page.locator(".release-modal-container").isVisible();
5848
5936
  if (!modalWindow) {
5849
5937
  await this.page.locator(".tl-event-title").getByText(release_title).scrollIntoViewIfNeeded();