@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/CHANGELOG.md CHANGED
@@ -1,10 +1,16 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
- ## 0.0.0-snapshot-20251205091732
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
  }
@@ -6836,9 +6837,6 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
6836
6837
  }).locator(`td`).filter({
6837
6838
  hasText: type
6838
6839
  }).count()).toBeGreaterThan(0);
6839
- if (user.accountLocked) (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`tr`).filter({
6840
- hasText: user.name
6841
- }).locator('[data-testid="user-account-lock"]').isVisible()).toBeTruthy();
6842
6840
  if (user.email) (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`tr`).filter({
6843
6841
  hasText: user.name
6844
6842
  }).locator(`td`).filter({
@@ -6854,9 +6852,7 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
6854
6852
  }).locator(`td`).filter({
6855
6853
  hasText: user.externalId
6856
6854
  }).count()).toBeGreaterThan(0);
6857
- (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`tr`).filter({
6858
- hasText: user.name
6859
- }).locator(`td .icon-delete`).count()).toBeGreaterThan(0);
6855
+ (0, $kKeXs$playwrighttest.expect)(await this.page.getByTestId(`user-actions-btn-${user.name}`).count()).toBeGreaterThan(0);
6860
6856
  }
6861
6857
  }
6862
6858
  async expectNoUser(username) {
@@ -6865,9 +6861,8 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
6865
6861
  }
6866
6862
  async updateUser(username) {
6867
6863
  await this.filterUser(username);
6868
- await this.page.getByRole("row", {
6869
- name: "" + username + ""
6870
- }).locator(".icon-edit").click();
6864
+ await this.page.getByTestId(`user-actions-btn-${username}`).click();
6865
+ await this.page.locator(".icon-edit").click();
6871
6866
  return this.modal;
6872
6867
  }
6873
6868
  async sortByColumn(columnName, columnIndex) {
@@ -6902,6 +6897,24 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
6902
6897
  })).toHaveCount(0);
6903
6898
  return this;
6904
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
+ }
6905
6918
  }
6906
6919
 
6907
6920