@digital-ai/devops-page-object-release 0.0.0-snapshot-20251216064142 → 0.0.0-snapshot-20251216091120

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,10 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
- ## 0.0.0-snapshot-20251216064142
3
+ ## 0.0.0-snapshot-20251216091120
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - ec1a601: S-127036: Update for Action button with options. Updated the action button implementation to use a dropdown menu pattern instead of direct action buttons.
7
+ - 43cf4ad: S-126526: Added page object for edit-teams-and-permissions-scenario
8
8
 
9
9
  ## 0.0.97
10
10
 
package/dist/main.js CHANGED
@@ -5971,6 +5971,52 @@ class $e5c8dec182aa2e84$export$e2613a7eee3a1b1b extends (0, $f8721861c660dd88$ex
5971
5971
  });
5972
5972
  await tag.locator(".close-icon").click();
5973
5973
  }
5974
+ async expectPermissionReadOnly(permission, team, readOnly) {
5975
+ const rowLocator = this.page.locator(`table tr:has-text("${permission}")`);
5976
+ const tagLocator = rowLocator.locator(`.tag-label:has-text("${team}")`);
5977
+ if (readOnly) await (0, $kKeXs$playwrighttest.expect)(tagLocator).toBeVisible();
5978
+ else {
5979
+ const closeIconLocator = tagLocator.locator(".. >> .tag-close");
5980
+ await (0, $kKeXs$playwrighttest.expect)(closeIconLocator).toBeVisible();
5981
+ }
5982
+ }
5983
+ async expectTeamsNotToExist(teams, readOnly) {
5984
+ for (const team of teams){
5985
+ const teamRow = this.page.locator(`tr:has-text("${team}")`);
5986
+ if (readOnly) await (0, $kKeXs$playwrighttest.expect)(teamRow.getByTitle("Delete")).toHaveCount(0);
5987
+ else await (0, $kKeXs$playwrighttest.expect)(teamRow.getByTitle("Delete")).toBeVisible();
5988
+ }
5989
+ }
5990
+ async expectInheritTeamsDisabled() {
5991
+ const inheritCheckbox = this.page.locator(".inherit-checkbox input");
5992
+ await (0, $kKeXs$playwrighttest.expect)(inheritCheckbox).toBeVisible();
5993
+ await (0, $kKeXs$playwrighttest.expect)(inheritCheckbox).toBeDisabled();
5994
+ }
5995
+ async expectNewTeamButtonDisabled() {
5996
+ const addTeamButton = this.page.locator(".button-add-team");
5997
+ await (0, $kKeXs$playwrighttest.expect)(addTeamButton).toBeDisabled();
5998
+ }
5999
+ async expectRemoveTeamButtonNotToExist() {
6000
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#teams-permissions-table table tr .action-label")).toHaveCount(0);
6001
+ return this;
6002
+ }
6003
+ async expectSaveButtonDisabled() {
6004
+ const saveButton = this.page.getByRole("button", {
6005
+ name: "Save"
6006
+ });
6007
+ await (0, $kKeXs$playwrighttest.expect)(saveButton).toBeVisible();
6008
+ await (0, $kKeXs$playwrighttest.expect)(saveButton).toBeDisabled();
6009
+ return this;
6010
+ }
6011
+ async expectTeamsReadOnly(teams, readOnly) {
6012
+ for (const team of teams){
6013
+ const teamRow = this.page.locator("table").first().locator("tr", {
6014
+ hasText: team
6015
+ });
6016
+ await (0, $kKeXs$playwrighttest.expect)(teamRow.locator(".tag-label + .tag-close")).toHaveCount(readOnly ? 0 : 1);
6017
+ }
6018
+ return this;
6019
+ }
5974
6020
  async expectPermissionNotToExist(permission, team) {
5975
6021
  const row = this.page.locator("table tr", {
5976
6022
  hasText: permission
@@ -6865,9 +6911,7 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
6865
6911
  }).getByRole("checkbox")).toBeChecked();
6866
6912
  }
6867
6913
  async deleteUser(username) {
6868
- await this.page.getByTestId(`user-actions-btn-${username}`).click();
6869
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".icon-delete")).toBeVisible();
6870
- await this.page.locator(".icon-delete").click();
6914
+ await this.page.getByTestId(`delete-btn-${username}`).click();
6871
6915
  await this.modal.delete();
6872
6916
  }
6873
6917
  async openRoles() {
@@ -6912,7 +6956,9 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
6912
6956
  }).locator(`td`).filter({
6913
6957
  hasText: user.externalId
6914
6958
  }).count()).toBeGreaterThan(0);
6915
- (0, $kKeXs$playwrighttest.expect)(await this.page.getByTestId(`user-actions-btn-${user.name}`).count()).toBeGreaterThan(0);
6959
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`tr`).filter({
6960
+ hasText: user.name
6961
+ }).locator(`td .icon-delete`).count()).toBeGreaterThan(0);
6916
6962
  }
6917
6963
  }
6918
6964
  async expectNoUser(username) {
@@ -6921,10 +6967,9 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
6921
6967
  }
6922
6968
  async updateUser(username) {
6923
6969
  await this.filterUser(username);
6924
- await this.page.getByTestId(`user-actions-btn-${username}`).click();
6925
- const editIcon = this.page.locator(".icon-edit");
6926
- await (0, $kKeXs$playwrighttest.expect)(editIcon).toBeVisible();
6927
- await editIcon.click();
6970
+ await this.page.getByRole("row", {
6971
+ name: "" + username + ""
6972
+ }).locator(".icon-edit").click();
6928
6973
  return this.modal;
6929
6974
  }
6930
6975
  async sortByColumn(columnName, columnIndex) {
@@ -10164,6 +10209,17 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
10164
10209
  await this.page.waitForSelector("#releases-content");
10165
10210
  return new (0, $9058d40a81bdb1f5$export$b453f08936c58edb)(this.page);
10166
10211
  }
10212
+ async openFolderByName(folderName) {
10213
+ const folder = this.page.getByTitle(folderName);
10214
+ await (0, $kKeXs$playwrighttest.expect)(folder).toBeVisible({
10215
+ timeout: 5000
10216
+ });
10217
+ await folder.click();
10218
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".MuiBreadcrumbs-li").getByRole("link", {
10219
+ name: folderName
10220
+ })).toBeVisible();
10221
+ return this;
10222
+ }
10167
10223
  async openProfilePage() {
10168
10224
  await this.page.goto(`./#/profile`);
10169
10225
  return new (0, $010122e1d9b28b80$export$3cf9c90f870f31bd)(this.page);