@digital-ai/devops-page-object-release 0.0.0-snapshot-20251204135514 → 0.0.0-snapshot-20251205180746

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,10 +1,16 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
- ## 0.0.0-snapshot-20251204135514
3
+ ## 0.0.0-snapshot-20251205180746
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - 294fb2f: S-126029: Added new column details for testing account lock
7
+ - ec1a601: S-126029: Added new column details for testing account lock
8
+
9
+ ## 0.0.94
10
+
11
+ ### Patch Changes
12
+
13
+ - 46cad37: S-126454 - added new methods for unlocking users and verifying warning messages
8
14
 
9
15
  ## 0.0.93
10
16
 
package/dist/main.js CHANGED
@@ -6809,6 +6809,7 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
6809
6809
  }).getByRole("checkbox")).toBeChecked();
6810
6810
  }
6811
6811
  async deleteUser(username) {
6812
+ await this.page.getByTestId(`user-actions-btn-${username}`).click();
6812
6813
  await this.page.getByTestId(`delete-btn-${username}`).click();
6813
6814
  await this.modal.delete();
6814
6815
  }
@@ -6828,7 +6829,6 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
6828
6829
  for (const user of users){
6829
6830
  await this.filterUser(user.name);
6830
6831
  const type = user.external ? "External" : "Internal";
6831
- const accountLockedType = user.accountLocked ? "Locked" : "";
6832
6832
  (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`tr`).filter({
6833
6833
  hasText: user.name
6834
6834
  }).count()).toBeGreaterThan(0);
@@ -6837,11 +6837,6 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
6837
6837
  }).locator(`td`).filter({
6838
6838
  hasText: type
6839
6839
  }).count()).toBeGreaterThan(0);
6840
- if (user.accountLocked) (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`tr`).filter({
6841
- hasText: user.name
6842
- }).locator(`td`).filter({
6843
- hasText: accountLockedType
6844
- }).count()).toBeGreaterThan(0);
6845
6840
  if (user.email) (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`tr`).filter({
6846
6841
  hasText: user.name
6847
6842
  }).locator(`td`).filter({
@@ -6857,9 +6852,7 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
6857
6852
  }).locator(`td`).filter({
6858
6853
  hasText: user.externalId
6859
6854
  }).count()).toBeGreaterThan(0);
6860
- (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`tr`).filter({
6861
- hasText: user.name
6862
- }).locator(`td .icon-delete`).count()).toBeGreaterThan(0);
6855
+ (0, $kKeXs$playwrighttest.expect)(await this.page.getByTestId(`user-actions-btn-${user.name}`).count()).toBeGreaterThan(0);
6863
6856
  }
6864
6857
  }
6865
6858
  async expectNoUser(username) {
@@ -6868,9 +6861,8 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
6868
6861
  }
6869
6862
  async updateUser(username) {
6870
6863
  await this.filterUser(username);
6871
- await this.page.getByRole("row", {
6872
- name: "" + username + ""
6873
- }).locator(".icon-edit").click();
6864
+ await this.page.getByTestId(`user-actions-btn-${username}`).click();
6865
+ await this.page.locator(".icon-edit").click();
6874
6866
  return this.modal;
6875
6867
  }
6876
6868
  async sortByColumn(columnName, columnIndex) {
@@ -6905,6 +6897,24 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
6905
6897
  })).toHaveCount(0);
6906
6898
  return this;
6907
6899
  }
6900
+ async expectUserUnlockedToaster(user) {
6901
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(`User ${user} unlocked successfully`)).toBeVisible({
6902
+ timeout: 10000
6903
+ });
6904
+ }
6905
+ async unlockUser(user) {
6906
+ await this.page.getByTestId(`unlock-btn-${user}`).click();
6907
+ }
6908
+ async expectWarningVisibility(warningRegex, shouldBeVisible) {
6909
+ const locator = this.page.getByText(warningRegex);
6910
+ if (shouldBeVisible) await (0, $kKeXs$playwrighttest.expect)(locator).toHaveCount(1);
6911
+ else await (0, $kKeXs$playwrighttest.expect)(locator).toHaveCount(0);
6912
+ }
6913
+ async editUserClickCancelButton() {
6914
+ await this.page.getByRole("button", {
6915
+ name: "Cancel"
6916
+ }).click();
6917
+ }
6908
6918
  }
6909
6919
 
6910
6920