@digital-ai/devops-page-object-release 0.0.0-snapshot-20251205091732 → 0.0.0-snapshot-20251205190028

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
  }
@@ -5918,9 +5919,7 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
5918
5919
  }).locator(`td`).filter({
5919
5920
  hasText: user.externalId
5920
5921
  }).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);
5922
+ (0, $hOLA6$expect)(await this.page.getByTestId(`user-actions-btn-${user.name}`).count()).toBeGreaterThan(0);
5924
5923
  }
5925
5924
  }
5926
5925
  async expectNoUser(username) {
@@ -5929,9 +5928,8 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
5929
5928
  }
5930
5929
  async updateUser(username) {
5931
5930
  await this.filterUser(username);
5932
- await this.page.getByRole("row", {
5933
- name: "" + username + ""
5934
- }).locator(".icon-edit").click();
5931
+ await this.page.getByTestId(`user-actions-btn-${username}`).click();
5932
+ await this.page.locator(".icon-edit").click();
5935
5933
  return this.modal;
5936
5934
  }
5937
5935
  async sortByColumn(columnName, columnIndex) {
@@ -5966,6 +5964,24 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
5966
5964
  })).toHaveCount(0);
5967
5965
  return this;
5968
5966
  }
5967
+ async expectUserUnlockedToaster(user) {
5968
+ await (0, $hOLA6$expect)(this.page.getByText(`User ${user} unlocked successfully`)).toBeVisible({
5969
+ timeout: 10000
5970
+ });
5971
+ }
5972
+ async unlockUser(user) {
5973
+ await this.page.getByTestId(`unlock-btn-${user}`).click();
5974
+ }
5975
+ async expectWarningVisibility(warningRegex, shouldBeVisible) {
5976
+ const locator = this.page.getByText(warningRegex);
5977
+ if (shouldBeVisible) await (0, $hOLA6$expect)(locator).toHaveCount(1);
5978
+ else await (0, $hOLA6$expect)(locator).toHaveCount(0);
5979
+ }
5980
+ async editUserClickCancelButton() {
5981
+ await this.page.getByRole("button", {
5982
+ name: "Cancel"
5983
+ }).click();
5984
+ }
5969
5985
  }
5970
5986
 
5971
5987