@digital-ai/devops-page-object-release 0.0.0-snapshot-20251212130202 → 0.0.0-snapshot-20251215122615

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
@@ -5035,6 +5035,52 @@ class $112122b844be02a3$export$e2613a7eee3a1b1b extends (0, $9626bc9256ce31f7$ex
5035
5035
  });
5036
5036
  await tag.locator(".close-icon").click();
5037
5037
  }
5038
+ async expectPermissionReadOnly(permission, team, readOnly) {
5039
+ const rowLocator = this.page.locator(`table tr:has-text("${permission}")`);
5040
+ const tagLocator = rowLocator.locator(`.tag-label:has-text("${team}")`);
5041
+ if (readOnly) await (0, $hOLA6$expect)(tagLocator).toBeVisible();
5042
+ else {
5043
+ const closeIconLocator = tagLocator.locator(".. >> .tag-close");
5044
+ await (0, $hOLA6$expect)(closeIconLocator).toBeVisible();
5045
+ }
5046
+ }
5047
+ async expectTeamsNotToExist(teams, readOnly) {
5048
+ for (const team of teams){
5049
+ const teamRow = this.page.locator(`tr:has-text("${team}")`);
5050
+ if (readOnly) await (0, $hOLA6$expect)(teamRow.getByTitle("Delete")).toHaveCount(0);
5051
+ else await (0, $hOLA6$expect)(teamRow.getByTitle("Delete")).toHaveCount(1);
5052
+ }
5053
+ }
5054
+ async expectInheritTeamsDisabled() {
5055
+ const inheritCheckbox = this.page.locator(".inherit-checkbox input");
5056
+ await (0, $hOLA6$expect)(inheritCheckbox).toBeVisible();
5057
+ await (0, $hOLA6$expect)(inheritCheckbox).toBeDisabled();
5058
+ }
5059
+ async expectNewTeamButtonDisabled() {
5060
+ const addTeamButton = this.page.locator(".button-add-team");
5061
+ await (0, $hOLA6$expect)(addTeamButton).toBeDisabled();
5062
+ }
5063
+ async expectRemoveTeamButtonNotToExist() {
5064
+ await (0, $hOLA6$expect)(this.page.locator("#teams-permissions-table table tr .action-label")).toHaveCount(0);
5065
+ return this;
5066
+ }
5067
+ async expectSaveButtonDisabled() {
5068
+ const saveButton = this.page.getByRole("button", {
5069
+ name: "Save"
5070
+ });
5071
+ await (0, $hOLA6$expect)(saveButton).toBeVisible();
5072
+ await (0, $hOLA6$expect)(saveButton).toBeDisabled();
5073
+ return this;
5074
+ }
5075
+ async expectTeamsReadOnly(teams, readOnly) {
5076
+ for (const team of teams){
5077
+ const teamRow = this.page.locator("table").first().locator("tr", {
5078
+ hasText: team
5079
+ });
5080
+ await (0, $hOLA6$expect)(teamRow.locator(".tag-label + .tag-close")).toHaveCount(readOnly ? 0 : 1);
5081
+ }
5082
+ return this;
5083
+ }
5038
5084
  async expectPermissionNotToExist(permission, team) {
5039
5085
  const row = this.page.locator("table tr", {
5040
5086
  hasText: permission
@@ -5929,8 +5975,7 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
5929
5975
  }).getByRole("checkbox")).toBeChecked();
5930
5976
  }
5931
5977
  async deleteUser(username) {
5932
- await this.page.getByTestId(`user-actions-btn-${username}`).click();
5933
- await this.page.locator(".icon-delete").click();
5978
+ await this.page.getByTestId(`delete-btn-${username}`).click();
5934
5979
  await this.modal.delete();
5935
5980
  }
5936
5981
  async openRoles() {
@@ -5975,7 +6020,9 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
5975
6020
  }).locator(`td`).filter({
5976
6021
  hasText: user.externalId
5977
6022
  }).count()).toBeGreaterThan(0);
5978
- (0, $hOLA6$expect)(await this.page.getByTestId(`user-actions-btn-${user.name}`).count()).toBeGreaterThan(0);
6023
+ (0, $hOLA6$expect)(await this.page.locator(`tr`).filter({
6024
+ hasText: user.name
6025
+ }).locator(`td .icon-delete`).count()).toBeGreaterThan(0);
5979
6026
  }
5980
6027
  }
5981
6028
  async expectNoUser(username) {
@@ -5984,8 +6031,9 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
5984
6031
  }
5985
6032
  async updateUser(username) {
5986
6033
  await this.filterUser(username);
5987
- await this.page.getByTestId(`user-actions-btn-${username}`).click();
5988
- await this.page.locator(".icon-edit").click();
6034
+ await this.page.getByRole("row", {
6035
+ name: "" + username + ""
6036
+ }).locator(".icon-edit").click();
5989
6037
  return this.modal;
5990
6038
  }
5991
6039
  async sortByColumn(columnName, columnIndex) {
@@ -9225,6 +9273,17 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
9225
9273
  await this.page.waitForSelector("#releases-content");
9226
9274
  return new (0, $50c91328c9110668$export$b453f08936c58edb)(this.page);
9227
9275
  }
9276
+ async openFolderByName(folderName) {
9277
+ const folder = this.page.getByTitle(folderName);
9278
+ await (0, $hOLA6$expect)(folder).toBeVisible({
9279
+ timeout: 5000
9280
+ });
9281
+ await folder.click();
9282
+ await (0, $hOLA6$expect)(this.page.locator(".MuiBreadcrumbs-li").getByRole("link", {
9283
+ name: folderName
9284
+ })).toBeVisible();
9285
+ return this;
9286
+ }
9228
9287
  async openProfilePage() {
9229
9288
  await this.page.goto(`./#/profile`);
9230
9289
  return new (0, $a5932af323ac015a$export$3cf9c90f870f31bd)(this.page);