@digital-ai/devops-page-object-release 0.0.0-snapshot-20251205091732 → 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
  }
@@ -5900,9 +5901,6 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
5900
5901
  }).locator(`td`).filter({
5901
5902
  hasText: type
5902
5903
  }).count()).toBeGreaterThan(0);
5903
- if (user.accountLocked) (0, $hOLA6$expect)(await this.page.locator(`tr`).filter({
5904
- hasText: user.name
5905
- }).locator('[data-testid="user-account-lock"]').isVisible()).toBeTruthy();
5906
5904
  if (user.email) (0, $hOLA6$expect)(await this.page.locator(`tr`).filter({
5907
5905
  hasText: user.name
5908
5906
  }).locator(`td`).filter({
@@ -5918,9 +5916,7 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
5918
5916
  }).locator(`td`).filter({
5919
5917
  hasText: user.externalId
5920
5918
  }).count()).toBeGreaterThan(0);
5921
- (0, $hOLA6$expect)(await this.page.locator(`tr`).filter({
5922
- hasText: user.name
5923
- }).locator(`td .icon-delete`).count()).toBeGreaterThan(0);
5919
+ (0, $hOLA6$expect)(await this.page.getByTestId(`user-actions-btn-${user.name}`).count()).toBeGreaterThan(0);
5924
5920
  }
5925
5921
  }
5926
5922
  async expectNoUser(username) {
@@ -5929,9 +5925,8 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
5929
5925
  }
5930
5926
  async updateUser(username) {
5931
5927
  await this.filterUser(username);
5932
- await this.page.getByRole("row", {
5933
- name: "" + username + ""
5934
- }).locator(".icon-edit").click();
5928
+ await this.page.getByTestId(`user-actions-btn-${username}`).click();
5929
+ await this.page.locator(".icon-edit").click();
5935
5930
  return this.modal;
5936
5931
  }
5937
5932
  async sortByColumn(columnName, columnIndex) {
@@ -5966,6 +5961,24 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
5966
5961
  })).toHaveCount(0);
5967
5962
  return this;
5968
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
+ }
5969
5982
  }
5970
5983
 
5971
5984