@digital-ai/devops-page-object-release 0.0.87 → 0.0.89

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,5 +1,17 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
+ ## 0.0.89
4
+
5
+ ### Patch Changes
6
+
7
+ - ed632e1: S-125939: Migrated Release flag scenario from cypress to playwright
8
+
9
+ ## 0.0.88
10
+
11
+ ### Patch Changes
12
+
13
+ - e96c33d: S-125018: Added folder-permissions-scenario page objects
14
+
3
15
  ## 0.0.87
4
16
 
5
17
  ### Patch Changes
package/dist/main.js CHANGED
@@ -3842,6 +3842,22 @@ class $8681d8a3f46f87b7$export$d1077068a9cc9f17 extends (0, $f8721861c660dd88$ex
3842
3842
  async expectStartFromReleaseURLToBe(parentReleaseURL) {
3843
3843
  (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".started-from-release").getAttribute("href")).toContain(parentReleaseURL);
3844
3844
  }
3845
+ async expectFlaggedWith(flagName, flagComment) {
3846
+ const flagButton = this.page.locator(".flags .dropdown-button");
3847
+ await (0, $kKeXs$playwrighttest.expect)(flagButton).toHaveClass(new RegExp(`\\b${flagName}\\b`));
3848
+ const input = this.page.locator(".flags input");
3849
+ await (0, $kKeXs$playwrighttest.expect)(input).toBeVisible();
3850
+ await (0, $kKeXs$playwrighttest.expect)(input).toHaveValue(flagComment);
3851
+ }
3852
+ async flag(flagName, flagComment) {
3853
+ const flagDropdown = this.page.locator("#release-properties .flags .dropdown-button");
3854
+ await flagDropdown.click();
3855
+ const flagPopover = this.page.locator(".flags .flag-picker-popover");
3856
+ const flagOption = flagPopover.locator(`div.${flagName}`);
3857
+ await flagOption.click();
3858
+ await this.page.getByPlaceholder("Set status text...").click();
3859
+ await this.page.getByPlaceholder("Set status text...").fill(flagComment);
3860
+ }
3845
3861
  }
3846
3862
 
3847
3863
 
@@ -5848,6 +5864,66 @@ class $04ff53be95b7a0a4$export$32284f8bcf0bc407 extends (0, $f8721861c660dd88$ex
5848
5864
 
5849
5865
 
5850
5866
 
5867
+ class $e5c8dec182aa2e84$export$e2613a7eee3a1b1b extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
5868
+ constructor(page){
5869
+ super(page);
5870
+ }
5871
+ async expectPermissionToExist(permission, team) {
5872
+ const row = this.page.locator("table tr", {
5873
+ hasText: permission
5874
+ });
5875
+ const tag = row.locator(".tag", {
5876
+ hasText: team
5877
+ });
5878
+ await (0, $kKeXs$playwrighttest.expect)(tag).toBeVisible();
5879
+ }
5880
+ async removePermission(permission, team) {
5881
+ const row = this.page.locator("table tr", {
5882
+ hasText: permission
5883
+ });
5884
+ const tag = row.locator(".tag", {
5885
+ hasText: team
5886
+ });
5887
+ await tag.locator(".close-icon").click();
5888
+ }
5889
+ async expectPermissionNotToExist(permission, team) {
5890
+ const row = this.page.locator("table tr", {
5891
+ hasText: permission
5892
+ });
5893
+ const tag = row.locator(".tag", {
5894
+ hasText: team
5895
+ });
5896
+ await (0, $kKeXs$playwrighttest.expect)(tag).toHaveCount(0);
5897
+ }
5898
+ async removeTeam(teamName) {
5899
+ const row = this.page.locator("#teams-permissions-table table tr", {
5900
+ hasText: teamName
5901
+ });
5902
+ await row.locator(".action-label").click();
5903
+ await this.page.getByRole("button", {
5904
+ name: "Delete"
5905
+ }).click();
5906
+ }
5907
+ async expectInheritMessagePresent(folder) {
5908
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("p.inherit-checkbox", {
5909
+ hasText: "Inherit teams and permissions from parent folder"
5910
+ })).toBeVisible();
5911
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("p.inherit-checkbox a", {
5912
+ hasText: folder
5913
+ })).toBeVisible();
5914
+ return this;
5915
+ }
5916
+ async reset() {
5917
+ await this.page.getByRole("button", {
5918
+ name: "Reset"
5919
+ }).click();
5920
+ return this;
5921
+ }
5922
+ }
5923
+
5924
+
5925
+
5926
+
5851
5927
 
5852
5928
  class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
5853
5929
  constructor(page){
@@ -5861,6 +5937,7 @@ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$ex
5861
5937
  this.patternPage = new (0, $ceb2e9e08e1837c2$export$9b9454a7f137e99b)(page);
5862
5938
  this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
5863
5939
  this.variables = new (0, $59543fc69900e8db$export$f8e64fcf447db2bf)(page);
5940
+ this.teamsPermissions = new (0, $e5c8dec182aa2e84$export$e2613a7eee3a1b1b)(page);
5864
5941
  }
5865
5942
  getFolderSearchInputLocator() {
5866
5943
  return this.page.locator(".folder-list .folder-list-search input");
@@ -5918,6 +5995,10 @@ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$ex
5918
5995
  await this.page.locator("//span[normalize-space()='Status']").click();
5919
5996
  return this;
5920
5997
  }
5998
+ async openTeamsPermissions() {
5999
+ await this.util.openSideNavMenu("Teams & permissions");
6000
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Teams & permissions")).toBeVisible();
6001
+ }
5921
6002
  async expectReleaseGroupisDisplayed(title) {
5922
6003
  //await this.page.locator(`.fc-list-item-title-wrapper .fc-list-item-title strong:text-is('${title}`).isVisible()
5923
6004
  await this.page.waitForSelector(`.fc-list-item-title-wrapper .fc-list-item-title strong:text-is('${title}')`);
@@ -8237,6 +8318,23 @@ class $170d32617f3aa58e$var$TemplateVariableModal extends (0, $f8721861c660dd88$
8237
8318
 
8238
8319
 
8239
8320
 
8321
+
8322
+
8323
+ class $a0fa381eac732e63$export$f9d0ad09366026c7 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
8324
+ constructor(page){
8325
+ super(page);
8326
+ }
8327
+ async expectInheritMessagePresent(folder) {
8328
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".content-under-header p", {
8329
+ hasText: "Permissions and Teams are inherited from the folder"
8330
+ })).toBeVisible();
8331
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".content-under-header p span a", {
8332
+ hasText: folder
8333
+ })).toBeVisible();
8334
+ }
8335
+ }
8336
+
8337
+
8240
8338
  class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
8241
8339
  constructor(page){
8242
8340
  super(page);
@@ -8248,6 +8346,7 @@ class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$ex
8248
8346
  this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
8249
8347
  this.variables = new (0, $170d32617f3aa58e$export$e0f84914460c3382)(page);
8250
8348
  this.plannerView = new (0, $e8395395d01b66bb$export$5a82be0a2a261cc6)(page);
8349
+ this.teamsPermissions = new (0, $a0fa381eac732e63$export$f9d0ad09366026c7)(page);
8251
8350
  }
8252
8351
  async openTemplateMenu(menuItem) {
8253
8352
  await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
@@ -11119,11 +11218,11 @@ class $6998c6a53a9eb4fa$var$Fixtures {
11119
11218
  // If teams are provided, send a request to add teams to the folder
11120
11219
  if (teams) {
11121
11220
  teams = this.addSystemTeams(teams);
11122
- return await this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
11221
+ await this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
11123
11222
  }
11124
11223
  if (children && children.length > 0) {
11125
11224
  await this.folderVariable(folderVariables);
11126
- return await this.folder(children[0]);
11225
+ for (const childFolder of children)await this.folder(childFolder);
11127
11226
  }
11128
11227
  if (folderVariables && folderVariables.length > 0) return await this.folderVariable(folderVariables);
11129
11228
  return response;