@digital-ai/devops-page-object-release 0.0.60 → 0.0.62

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,22 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
+ ## 0.0.62
4
+
5
+ ### Patch Changes
6
+
7
+ - c4bc6f9: S-121350 `Release - History/Activity rail` page objects
8
+
9
+ ## 0.0.61
10
+
11
+ ### Patch Changes
12
+
13
+ - 5cfb118: page objects added for migrated login-scenario
14
+
15
+ login-page updated
16
+ systemSettingsPage updated
17
+
18
+ - 786502f: S-121108: settingsMenu updated for system-message-configuration-scenario
19
+
3
20
  ## 0.0.60
4
21
 
5
22
  ### Patch Changes
package/dist/main.js CHANGED
@@ -1704,8 +1704,25 @@ class $59543fc69900e8db$var$DeleteVariableModel extends (0, $f8721861c660dd88$ex
1704
1704
 
1705
1705
 
1706
1706
  class $6c924a95a765a086$export$15d3f9b095bb5188 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
1707
- async expectCommentToContain(comment) {
1708
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".markdown-wrapper").getByText(comment)).toBeVisible();
1707
+ constructor(page){
1708
+ super(page);
1709
+ this.sortButton = this.page.locator(".dot-icon-btn[data-testid='task-comment-sort-btn']");
1710
+ this.viewAllListItem = this.page.locator(".dot-li[data-id='all']");
1711
+ this.systemListItem = this.page.locator(".dot-li[data-id='system']");
1712
+ this.userListItem = this.page.locator(".dot-li[data-id='user']");
1713
+ this.filterIconButton = this.page.locator(".dot-icon-btn[aria-label='filter icon button']");
1714
+ this.commentFilterInput = this.page.locator("input#task-comment-filter");
1715
+ this.markdownWrapper = this.page.locator(".markdown-wrapper");
1716
+ this.tooltipPopper = this.page.locator(".MuiTooltip-popper");
1717
+ }
1718
+ async expectCommentToContain(comment, shouldContain = true) {
1719
+ const commentLocator = this.markdownWrapper.getByText(comment);
1720
+ if (shouldContain) await (0, $kKeXs$playwrighttest.expect)(commentLocator).toBeVisible();
1721
+ else await (0, $kKeXs$playwrighttest.expect)(commentLocator).toHaveCount(0);
1722
+ }
1723
+ async expectCommentToContainAtPosition(comment, positionIndex) {
1724
+ await (0, $kKeXs$playwrighttest.expect)(this.markdownWrapper.nth(positionIndex).getByText(comment)).toBeVisible();
1725
+ return this;
1709
1726
  }
1710
1727
  async expectCommentToContainLink(hrefLink) {
1711
1728
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".markdown-wrapper a")).toHaveAttribute("href", hrefLink);
@@ -1718,10 +1735,40 @@ class $6c924a95a765a086$export$15d3f9b095bb5188 extends (0, $f8721861c660dd88$ex
1718
1735
  await this.page.locator(".icon-send-airplane").click();
1719
1736
  return this;
1720
1737
  }
1738
+ async searchComments(filter) {
1739
+ await this.commentFilterInput.fill(filter);
1740
+ await this.commentFilterInput.press("Enter");
1741
+ return this;
1742
+ }
1743
+ async clickOnFilterIconButton() {
1744
+ await this.filterIconButton.click();
1745
+ return this;
1746
+ }
1747
+ async clickOnUserListItemFilter() {
1748
+ await this.userListItem.click();
1749
+ return this;
1750
+ }
1751
+ async clickOnSystemListItemFilter() {
1752
+ await this.systemListItem.click();
1753
+ return this;
1754
+ }
1755
+ async clickOnViewAllListItemFilter() {
1756
+ await this.viewAllListItem.click();
1757
+ return this;
1758
+ }
1759
+ async clickOnSortIconButton() {
1760
+ await this.sortButton.click();
1761
+ return this;
1762
+ }
1721
1763
  async expectAuthorCommentsToBe(author) {
1722
1764
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-comment-user h6")).toHaveText(author);
1723
1765
  return this;
1724
1766
  }
1767
+ async expectSortIconButtonToHaveTooltipText(tooltipText) {
1768
+ await this.sortButton.hover();
1769
+ await (0, $kKeXs$playwrighttest.expect)(this.tooltipPopper.getByText(tooltipText)).toBeVisible();
1770
+ return this;
1771
+ }
1725
1772
  async expectCommentsDateTimeToBe(comment, date) {
1726
1773
  const commentLocator = this.page.locator(".task-comment-body").filter({
1727
1774
  has: this.page.locator(".markdown-switcher").getByText(comment)
@@ -2893,6 +2940,35 @@ class $1fbdec5dc9cde599$export$e3515314c13bc477 extends (0, $f8721861c660dd88$ex
2893
2940
 
2894
2941
 
2895
2942
 
2943
+
2944
+
2945
+ class $ce493860594d5685$export$60cb93c4adcee489 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2946
+ constructor(page){
2947
+ super(page);
2948
+ this.logsFilterInput = this.page.locator("input#drawer-history-filter");
2949
+ this.sortButton = this.page.locator(".dot-icon-btn[data-testid='drawer-history-sort-btn']");
2950
+ this.logContentWrapper = this.page.locator(".content-right-message");
2951
+ }
2952
+ async expectLogToContain(log, shouldContain = true) {
2953
+ const logLocator = this.logContentWrapper.getByText(log);
2954
+ if (shouldContain) await (0, $kKeXs$playwrighttest.expect)(logLocator).toBeVisible();
2955
+ else await (0, $kKeXs$playwrighttest.expect)(logLocator).toHaveCount(0);
2956
+ }
2957
+ async expectLogToContainAtPosition(log, positionIndex) {
2958
+ await (0, $kKeXs$playwrighttest.expect)(this.logContentWrapper.nth(positionIndex).getByText(log)).toBeVisible();
2959
+ return this;
2960
+ }
2961
+ async searchLogs(filter) {
2962
+ await this.logsFilterInput.fill(filter);
2963
+ return this;
2964
+ }
2965
+ async clickOnSortIconButton() {
2966
+ await this.sortButton.click();
2967
+ return this;
2968
+ }
2969
+ }
2970
+
2971
+
2896
2972
  class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2897
2973
  constructor(page){
2898
2974
  super(page);
@@ -2911,6 +2987,7 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
2911
2987
  this.failMenu = this.page.getByRole("menuitem", {
2912
2988
  name: "Fail"
2913
2989
  });
2990
+ this.history = new (0, $ce493860594d5685$export$60cb93c4adcee489)(page);
2914
2991
  this.openMenu = this.page.getByRole("button", {
2915
2992
  name: "arrow-down icon",
2916
2993
  exact: true
@@ -2952,6 +3029,9 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
2952
3029
  async openTagsRail() {
2953
3030
  await this.openRail("Tags");
2954
3031
  }
3032
+ async openHistoryRail() {
3033
+ await this.openRail("History");
3034
+ }
2955
3035
  async openRail(rail) {
2956
3036
  await this.taskDrawerLocator.locator(".task-navigation-rail").getByText(rail).click();
2957
3037
  }
@@ -6210,7 +6290,9 @@ class $7867194f18360347$export$1d7840d5cdc861d5 extends (0, $f8721861c660dd88$ex
6210
6290
  await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
6211
6291
  name: "System message"
6212
6292
  })).toBeVisible();
6213
- await this.closeIcon.click();
6293
+ }
6294
+ async closeConfigureSystemMessage() {
6295
+ await this.closeIcon.first().click();
6214
6296
  }
6215
6297
  async configureSystemMessage(message) {
6216
6298
  await this.settingsIcon.click();
@@ -8944,6 +9026,26 @@ class $dbc8f157e7b24b12$export$b8732a8d21d8bf63 extends $dbc8f157e7b24b12$export
8944
9026
  }).fill(value);
8945
9027
  return this;
8946
9028
  }
9029
+ async setLoginMessage(message) {
9030
+ await this.page.locator("div#loginMessage").click({
9031
+ force: true
9032
+ });
9033
+ const input = this.page.locator("input#loginMessage");
9034
+ const currentValue = await input.inputValue();
9035
+ if (currentValue.trim() !== "") await input.fill("");
9036
+ await input.fill(message);
9037
+ await input.press("Tab");
9038
+ return this;
9039
+ }
9040
+ async clearLoginMessage() {
9041
+ await this.page.locator("div#loginMessage").click({
9042
+ force: true
9043
+ });
9044
+ const input = this.page.locator("input#loginMessage");
9045
+ await input.fill("");
9046
+ await input.press("Tab");
9047
+ return this;
9048
+ }
8947
9049
  async setHeaderColor(colorName) {
8948
9050
  await this.page.locator(".color-picker button").click({
8949
9051
  force: true
@@ -9467,6 +9569,17 @@ class $258749e0671c845a$export$f14c0e3f98d164c0 extends (0, $f8721861c660dd88$ex
9467
9569
  await this.page.waitForTimeout(1000);
9468
9570
  await this.closePendoModalWindow();
9469
9571
  }
9572
+ async loginWithoutReload(userName, password) {
9573
+ let loadTriggered = false;
9574
+ this.page.on("load", ()=>{
9575
+ loadTriggered = true;
9576
+ });
9577
+ await this.page.evaluate(()=>{
9578
+ window.location.hash = "#tasks";
9579
+ });
9580
+ (0, $kKeXs$playwrighttest.expect)(loadTriggered).toBe(false);
9581
+ await this.login(userName, password);
9582
+ }
9470
9583
  /**
9471
9584
  * Logout as authenticated user
9472
9585
  */ async logout() {
@@ -9492,6 +9605,18 @@ class $258749e0671c845a$export$f14c0e3f98d164c0 extends (0, $f8721861c660dd88$ex
9492
9605
  await this.page.waitForTimeout(1000);
9493
9606
  if (await this.page.locator("._pendo-close-guide").count() > 0) await this.page.locator("._pendo-close-guide").click();
9494
9607
  }
9608
+ async expectUserNotVisible() {
9609
+ const tooltip = this.page.locator("top-toolbar .avatar-wrapper .dot-tooltip");
9610
+ await tooltip.waitFor({
9611
+ state: "hidden"
9612
+ });
9613
+ }
9614
+ async expectUserVisible() {
9615
+ const tooltip = this.page.locator("top-toolbar .avatar-wrapper .dot-tooltip");
9616
+ await tooltip.waitFor({
9617
+ state: "visible"
9618
+ });
9619
+ }
9495
9620
  }
9496
9621
 
9497
9622