@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/dist/module.js CHANGED
@@ -5873,6 +5873,7 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
5873
5873
  }).getByRole("checkbox")).toBeChecked();
5874
5874
  }
5875
5875
  async deleteUser(username) {
5876
+ await this.page.getByTestId(`user-actions-btn-${username}`).click();
5876
5877
  await this.page.getByTestId(`delete-btn-${username}`).click();
5877
5878
  await this.modal.delete();
5878
5879
  }
@@ -5892,7 +5893,6 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
5892
5893
  for (const user of users){
5893
5894
  await this.filterUser(user.name);
5894
5895
  const type = user.external ? "External" : "Internal";
5895
- const accountLockedType = user.accountLocked ? "Locked" : "";
5896
5896
  (0, $hOLA6$expect)(await this.page.locator(`tr`).filter({
5897
5897
  hasText: user.name
5898
5898
  }).count()).toBeGreaterThan(0);
@@ -5901,11 +5901,6 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
5901
5901
  }).locator(`td`).filter({
5902
5902
  hasText: type
5903
5903
  }).count()).toBeGreaterThan(0);
5904
- if (user.accountLocked) (0, $hOLA6$expect)(await this.page.locator(`tr`).filter({
5905
- hasText: user.name
5906
- }).locator(`td`).filter({
5907
- hasText: accountLockedType
5908
- }).count()).toBeGreaterThan(0);
5909
5904
  if (user.email) (0, $hOLA6$expect)(await this.page.locator(`tr`).filter({
5910
5905
  hasText: user.name
5911
5906
  }).locator(`td`).filter({
@@ -5921,9 +5916,7 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
5921
5916
  }).locator(`td`).filter({
5922
5917
  hasText: user.externalId
5923
5918
  }).count()).toBeGreaterThan(0);
5924
- (0, $hOLA6$expect)(await this.page.locator(`tr`).filter({
5925
- hasText: user.name
5926
- }).locator(`td .icon-delete`).count()).toBeGreaterThan(0);
5919
+ (0, $hOLA6$expect)(await this.page.getByTestId(`user-actions-btn-${user.name}`).count()).toBeGreaterThan(0);
5927
5920
  }
5928
5921
  }
5929
5922
  async expectNoUser(username) {
@@ -5932,9 +5925,8 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
5932
5925
  }
5933
5926
  async updateUser(username) {
5934
5927
  await this.filterUser(username);
5935
- await this.page.getByRole("row", {
5936
- name: "" + username + ""
5937
- }).locator(".icon-edit").click();
5928
+ await this.page.getByTestId(`user-actions-btn-${username}`).click();
5929
+ await this.page.locator(".icon-edit").click();
5938
5930
  return this.modal;
5939
5931
  }
5940
5932
  async sortByColumn(columnName, columnIndex) {
@@ -5969,6 +5961,24 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
5969
5961
  })).toHaveCount(0);
5970
5962
  return this;
5971
5963
  }
5964
+ async expectUserUnlockedToaster(user) {
5965
+ await (0, $hOLA6$expect)(this.page.getByText(`User ${user} unlocked successfully`)).toBeVisible({
5966
+ timeout: 10000
5967
+ });
5968
+ }
5969
+ async unlockUser(user) {
5970
+ await this.page.getByTestId(`unlock-btn-${user}`).click();
5971
+ }
5972
+ async expectWarningVisibility(warningRegex, shouldBeVisible) {
5973
+ const locator = this.page.getByText(warningRegex);
5974
+ if (shouldBeVisible) await (0, $hOLA6$expect)(locator).toHaveCount(1);
5975
+ else await (0, $hOLA6$expect)(locator).toHaveCount(0);
5976
+ }
5977
+ async editUserClickCancelButton() {
5978
+ await this.page.getByRole("button", {
5979
+ name: "Cancel"
5980
+ }).click();
5981
+ }
5972
5982
  }
5973
5983
 
5974
5984