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

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,11 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
+ ## 0.0.34
4
+
5
+ ### Patch Changes
6
+
7
+ - 7566c36: S 118564: Migrated tasks-details-scenario into playwright
8
+
3
9
  ## 0.0.33
4
10
 
5
11
  ### 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) {
@@ -1669,11 +1677,29 @@ class $59543fc69900e8db$var$DeleteVariableModel extends (0, $f8721861c660dd88$ex
1669
1677
 
1670
1678
  class $6c924a95a765a086$export$15d3f9b095bb5188 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
1671
1679
  async expectCommentToContain(comment) {
1672
- (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".markdown-wrapper").textContent()).toContain(comment);
1680
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".markdown-wrapper").getByText(comment)).toBeVisible();
1673
1681
  }
1674
1682
  async expectTaskIsCommentable(isCommentable) {
1675
1683
  return (0, $kKeXs$playwrighttest.expect)(await this.page.locator("#task-comment").count()).toBe(isCommentable ? 1 : 0);
1676
1684
  }
1685
+ async addComment(comment) {
1686
+ await this.page.locator("#task-comment").fill(comment);
1687
+ await this.page.locator(".icon-send-airplane").click();
1688
+ return this;
1689
+ }
1690
+ async expectAuthorCommentsToBe(author) {
1691
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-comment-user h6")).toHaveText(author);
1692
+ return this;
1693
+ }
1694
+ async expectCommentsDateTimeToBe(comment, date) {
1695
+ const commentLocator = this.page.locator(".task-comment-body").filter({
1696
+ has: this.page.locator(".markdown-switcher").getByText(comment)
1697
+ }).locator(".task-comment-user span").getByRole("tooltip", {
1698
+ name: "Edited"
1699
+ });
1700
+ await (0, $kKeXs$playwrighttest.expect)(commentLocator).toHaveAttribute("aria-label", date);
1701
+ return this;
1702
+ }
1677
1703
  }
1678
1704
 
1679
1705
 
@@ -1890,7 +1916,7 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1890
1916
  return new $eb81c1b930e440ff$export$62811a109bb4377d(propertyName, this.page);
1891
1917
  }
1892
1918
  async setValueFromString(propertyName, value) {
1893
- await this.railLocator.locator(`input[name=${propertyName}]`).focus();
1919
+ await this.railLocator.locator(`input[id="${propertyName}"]`).focus();
1894
1920
  await this.railLocator.locator(`input[id="${propertyName}"]`).fill(value);
1895
1921
  }
1896
1922
  async setValueFromLargeString(propertyName, value) {
@@ -2648,12 +2674,20 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
2648
2674
  async expectCompleteButtonEnabled() {
2649
2675
  await (0, $kKeXs$playwrighttest.expect)(this.completeButton).toBeEnabled();
2650
2676
  }
2677
+ async expectCompleteButtonNotEnabled() {
2678
+ await (0, $kKeXs$playwrighttest.expect)(this.completeButton).not.toBeEnabled();
2679
+ }
2651
2680
  async setTitle(title) {
2652
2681
  await this.page.getByTestId("task-title-input-view-mode-typography").click();
2653
2682
  await this.page.getByTestId("task-title-input-input").clear();
2654
2683
  await this.page.getByTestId("task-title-input-input").fill(title);
2655
2684
  await this.page.getByTestId("task-title-input-input").press("Enter");
2656
2685
  }
2686
+ async expectTaskTitleEditable() {
2687
+ await this.page.getByTestId("task-title-input-view-mode-typography").click();
2688
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("task-title-input-input")).toBeEditable();
2689
+ return this;
2690
+ }
2657
2691
  async expectTypeToContain(taskType) {
2658
2692
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-drawer .task-type")).toContainText(taskType);
2659
2693
  }
@@ -2705,10 +2739,34 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
2705
2739
  }).click();
2706
2740
  }
2707
2741
  async assignToMe(userName, existingUsername) {
2742
+ await this.page.locator(".user-task-assigned-wrapper .editable").getByText(existingUsername).click();
2743
+ await this.page.getByTestId(`render-option-${userName}`).click();
2744
+ }
2745
+ async removeAssignToUser(userName) {
2708
2746
  await this.page.getByRole("button", {
2709
- name: existingUsername
2747
+ name: userName
2710
2748
  }).click();
2711
- await this.page.getByTestId(`render-option-${userName}`).click();
2749
+ await this.page.getByRole("button", {
2750
+ name: "Clear"
2751
+ }).click();
2752
+ return this;
2753
+ }
2754
+ async assignToTeam(existingTeamName, teamName) {
2755
+ await this.page.locator(".team-task-assigned-wrapper .editable").getByText(existingTeamName).click();
2756
+ await this.page.getByTestId(`render-option-${teamName}`).click();
2757
+ return this;
2758
+ }
2759
+ async expectAssignedToTeam(teamName) {
2760
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("button", {
2761
+ name: teamName
2762
+ })).toBeVisible();
2763
+ }
2764
+ async removeAssignedTeam(teamName) {
2765
+ await this.page.locator(".team-task-assigned-wrapper .editable").getByText(teamName).click();
2766
+ await this.page.getByRole("button", {
2767
+ name: "Clear"
2768
+ }).click();
2769
+ return this;
2712
2770
  }
2713
2771
  async setFlag(flagName, flagComment) {
2714
2772
  await this.page.getByTestId("flag-btn").click();