@digital-ai/devops-page-object-release 0.0.0-snapshot-20251215064123 → 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/CHANGELOG.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
- ## 0.0.0-snapshot-20251215064123
3
+ ## 0.0.0-snapshot-20251215122615
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - c220e7e: S-127475 : Added SPEL related page objects
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
@@ -2065,9 +2065,6 @@ class $9c0b0c2caed50730$export$d4865631ba74f3e2 extends (0, $f8721861c660dd88$ex
2065
2065
  this.preconditionToggle = page.getByLabel("Enable precondition");
2066
2066
  this.textEditor = page.locator("textarea");
2067
2067
  this.saveButton = page.getByTestId("save-btn");
2068
- this.selectEL = page.getByRole("textbox", {
2069
- name: "Precondition type"
2070
- }).getByLabel("Precondition type");
2071
2068
  }
2072
2069
  async enablePrecondition() {
2073
2070
  (0, $kKeXs$playwrighttest.expect)(await this.preconditionToggle.isChecked()).toBe(false);
@@ -2083,15 +2080,6 @@ class $9c0b0c2caed50730$export$d4865631ba74f3e2 extends (0, $f8721861c660dd88$ex
2083
2080
  await this.saveButton.dblclick();
2084
2081
  await this.page.waitForTimeout(1000);
2085
2082
  }
2086
- async setPreconditionToEL(script) {
2087
- await this.enablePrecondition();
2088
- await this.selectEL.click();
2089
- await this.selectEL.selectOption("EL");
2090
- await this.page.locator(".ace_content").click();
2091
- await this.textEditor.fill(script);
2092
- await this.saveButton.dblclick();
2093
- await this.page.waitForTimeout(1000);
2094
- }
2095
2083
  async expectPreconditionEditable(editable) {
2096
2084
  if (editable) await (0, $kKeXs$playwrighttest.expect)(this.textEditor).toBeEditable();
2097
2085
  else await (0, $kKeXs$playwrighttest.expect)(this.textEditor).not.toBeEditable();
@@ -5983,6 +5971,52 @@ class $e5c8dec182aa2e84$export$e2613a7eee3a1b1b extends (0, $f8721861c660dd88$ex
5983
5971
  });
5984
5972
  await tag.locator(".close-icon").click();
5985
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")).toHaveCount(1);
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
+ }
5986
6020
  async expectPermissionNotToExist(permission, team) {
5987
6021
  const row = this.page.locator("table tr", {
5988
6022
  hasText: permission
@@ -10175,6 +10209,17 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
10175
10209
  await this.page.waitForSelector("#releases-content");
10176
10210
  return new (0, $9058d40a81bdb1f5$export$b453f08936c58edb)(this.page);
10177
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
+ }
10178
10223
  async openProfilePage() {
10179
10224
  await this.page.goto(`./#/profile`);
10180
10225
  return new (0, $010122e1d9b28b80$export$3cf9c90f870f31bd)(this.page);