@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/dist/module.js CHANGED
@@ -2906,6 +2906,22 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
2906
2906
  async expectStartFromReleaseURLToBe(parentReleaseURL) {
2907
2907
  (0, $hOLA6$expect)(await this.page.locator(".started-from-release").getAttribute("href")).toContain(parentReleaseURL);
2908
2908
  }
2909
+ async expectFlaggedWith(flagName, flagComment) {
2910
+ const flagButton = this.page.locator(".flags .dropdown-button");
2911
+ await (0, $hOLA6$expect)(flagButton).toHaveClass(new RegExp(`\\b${flagName}\\b`));
2912
+ const input = this.page.locator(".flags input");
2913
+ await (0, $hOLA6$expect)(input).toBeVisible();
2914
+ await (0, $hOLA6$expect)(input).toHaveValue(flagComment);
2915
+ }
2916
+ async flag(flagName, flagComment) {
2917
+ const flagDropdown = this.page.locator("#release-properties .flags .dropdown-button");
2918
+ await flagDropdown.click();
2919
+ const flagPopover = this.page.locator(".flags .flag-picker-popover");
2920
+ const flagOption = flagPopover.locator(`div.${flagName}`);
2921
+ await flagOption.click();
2922
+ await this.page.getByPlaceholder("Set status text...").click();
2923
+ await this.page.getByPlaceholder("Set status text...").fill(flagComment);
2924
+ }
2909
2925
  }
2910
2926
 
2911
2927
 
@@ -4912,6 +4928,66 @@ class $7e73332bf754777c$export$32284f8bcf0bc407 extends (0, $9626bc9256ce31f7$ex
4912
4928
 
4913
4929
 
4914
4930
 
4931
+ class $112122b844be02a3$export$e2613a7eee3a1b1b extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
4932
+ constructor(page){
4933
+ super(page);
4934
+ }
4935
+ async expectPermissionToExist(permission, team) {
4936
+ const row = this.page.locator("table tr", {
4937
+ hasText: permission
4938
+ });
4939
+ const tag = row.locator(".tag", {
4940
+ hasText: team
4941
+ });
4942
+ await (0, $hOLA6$expect)(tag).toBeVisible();
4943
+ }
4944
+ async removePermission(permission, team) {
4945
+ const row = this.page.locator("table tr", {
4946
+ hasText: permission
4947
+ });
4948
+ const tag = row.locator(".tag", {
4949
+ hasText: team
4950
+ });
4951
+ await tag.locator(".close-icon").click();
4952
+ }
4953
+ async expectPermissionNotToExist(permission, team) {
4954
+ const row = this.page.locator("table tr", {
4955
+ hasText: permission
4956
+ });
4957
+ const tag = row.locator(".tag", {
4958
+ hasText: team
4959
+ });
4960
+ await (0, $hOLA6$expect)(tag).toHaveCount(0);
4961
+ }
4962
+ async removeTeam(teamName) {
4963
+ const row = this.page.locator("#teams-permissions-table table tr", {
4964
+ hasText: teamName
4965
+ });
4966
+ await row.locator(".action-label").click();
4967
+ await this.page.getByRole("button", {
4968
+ name: "Delete"
4969
+ }).click();
4970
+ }
4971
+ async expectInheritMessagePresent(folder) {
4972
+ await (0, $hOLA6$expect)(this.page.locator("p.inherit-checkbox", {
4973
+ hasText: "Inherit teams and permissions from parent folder"
4974
+ })).toBeVisible();
4975
+ await (0, $hOLA6$expect)(this.page.locator("p.inherit-checkbox a", {
4976
+ hasText: folder
4977
+ })).toBeVisible();
4978
+ return this;
4979
+ }
4980
+ async reset() {
4981
+ await this.page.getByRole("button", {
4982
+ name: "Reset"
4983
+ }).click();
4984
+ return this;
4985
+ }
4986
+ }
4987
+
4988
+
4989
+
4990
+
4915
4991
 
4916
4992
  class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
4917
4993
  constructor(page){
@@ -4925,6 +5001,7 @@ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$ex
4925
5001
  this.patternPage = new (0, $d13e78163af94d50$export$9b9454a7f137e99b)(page);
4926
5002
  this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
4927
5003
  this.variables = new (0, $dfc4ce40cbd0eb71$export$f8e64fcf447db2bf)(page);
5004
+ this.teamsPermissions = new (0, $112122b844be02a3$export$e2613a7eee3a1b1b)(page);
4928
5005
  }
4929
5006
  getFolderSearchInputLocator() {
4930
5007
  return this.page.locator(".folder-list .folder-list-search input");
@@ -4982,6 +5059,10 @@ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$ex
4982
5059
  await this.page.locator("//span[normalize-space()='Status']").click();
4983
5060
  return this;
4984
5061
  }
5062
+ async openTeamsPermissions() {
5063
+ await this.util.openSideNavMenu("Teams & permissions");
5064
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Teams & permissions")).toBeVisible();
5065
+ }
4985
5066
  async expectReleaseGroupisDisplayed(title) {
4986
5067
  //await this.page.locator(`.fc-list-item-title-wrapper .fc-list-item-title strong:text-is('${title}`).isVisible()
4987
5068
  await this.page.waitForSelector(`.fc-list-item-title-wrapper .fc-list-item-title strong:text-is('${title}')`);
@@ -7301,6 +7382,23 @@ class $527f56b2e41ad18d$var$TemplateVariableModal extends (0, $9626bc9256ce31f7$
7301
7382
 
7302
7383
 
7303
7384
 
7385
+
7386
+
7387
+ class $d7a13717805f21e8$export$f9d0ad09366026c7 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
7388
+ constructor(page){
7389
+ super(page);
7390
+ }
7391
+ async expectInheritMessagePresent(folder) {
7392
+ await (0, $hOLA6$expect)(this.page.locator(".content-under-header p", {
7393
+ hasText: "Permissions and Teams are inherited from the folder"
7394
+ })).toBeVisible();
7395
+ await (0, $hOLA6$expect)(this.page.locator(".content-under-header p span a", {
7396
+ hasText: folder
7397
+ })).toBeVisible();
7398
+ }
7399
+ }
7400
+
7401
+
7304
7402
  class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
7305
7403
  constructor(page){
7306
7404
  super(page);
@@ -7312,6 +7410,7 @@ class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$ex
7312
7410
  this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
7313
7411
  this.variables = new (0, $527f56b2e41ad18d$export$e0f84914460c3382)(page);
7314
7412
  this.plannerView = new (0, $a546aadb4e6fa16a$export$5a82be0a2a261cc6)(page);
7413
+ this.teamsPermissions = new (0, $d7a13717805f21e8$export$f9d0ad09366026c7)(page);
7315
7414
  }
7316
7415
  async openTemplateMenu(menuItem) {
7317
7416
  await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
@@ -9509,11 +9608,11 @@ class $80c3ae34677b4324$var$Fixtures {
9509
9608
  // If teams are provided, send a request to add teams to the folder
9510
9609
  if (teams) {
9511
9610
  teams = this.addSystemTeams(teams);
9512
- return await this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
9611
+ await this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
9513
9612
  }
9514
9613
  if (children && children.length > 0) {
9515
9614
  await this.folderVariable(folderVariables);
9516
- return await this.folder(children[0]);
9615
+ for (const childFolder of children)await this.folder(childFolder);
9517
9616
  }
9518
9617
  if (folderVariables && folderVariables.length > 0) return await this.folderVariable(folderVariables);
9519
9618
  return response;