@digital-ai/devops-page-object-release 0.0.86 → 0.0.88

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
@@ -4912,6 +4912,66 @@ class $7e73332bf754777c$export$32284f8bcf0bc407 extends (0, $9626bc9256ce31f7$ex
4912
4912
 
4913
4913
 
4914
4914
 
4915
+ class $112122b844be02a3$export$e2613a7eee3a1b1b extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
4916
+ constructor(page){
4917
+ super(page);
4918
+ }
4919
+ async expectPermissionToExist(permission, team) {
4920
+ const row = this.page.locator("table tr", {
4921
+ hasText: permission
4922
+ });
4923
+ const tag = row.locator(".tag", {
4924
+ hasText: team
4925
+ });
4926
+ await (0, $hOLA6$expect)(tag).toBeVisible();
4927
+ }
4928
+ async removePermission(permission, team) {
4929
+ const row = this.page.locator("table tr", {
4930
+ hasText: permission
4931
+ });
4932
+ const tag = row.locator(".tag", {
4933
+ hasText: team
4934
+ });
4935
+ await tag.locator(".close-icon").click();
4936
+ }
4937
+ async expectPermissionNotToExist(permission, team) {
4938
+ const row = this.page.locator("table tr", {
4939
+ hasText: permission
4940
+ });
4941
+ const tag = row.locator(".tag", {
4942
+ hasText: team
4943
+ });
4944
+ await (0, $hOLA6$expect)(tag).toHaveCount(0);
4945
+ }
4946
+ async removeTeam(teamName) {
4947
+ const row = this.page.locator("#teams-permissions-table table tr", {
4948
+ hasText: teamName
4949
+ });
4950
+ await row.locator(".action-label").click();
4951
+ await this.page.getByRole("button", {
4952
+ name: "Delete"
4953
+ }).click();
4954
+ }
4955
+ async expectInheritMessagePresent(folder) {
4956
+ await (0, $hOLA6$expect)(this.page.locator("p.inherit-checkbox", {
4957
+ hasText: "Inherit teams and permissions from parent folder"
4958
+ })).toBeVisible();
4959
+ await (0, $hOLA6$expect)(this.page.locator("p.inherit-checkbox a", {
4960
+ hasText: folder
4961
+ })).toBeVisible();
4962
+ return this;
4963
+ }
4964
+ async reset() {
4965
+ await this.page.getByRole("button", {
4966
+ name: "Reset"
4967
+ }).click();
4968
+ return this;
4969
+ }
4970
+ }
4971
+
4972
+
4973
+
4974
+
4915
4975
 
4916
4976
  class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
4917
4977
  constructor(page){
@@ -4925,6 +4985,7 @@ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$ex
4925
4985
  this.patternPage = new (0, $d13e78163af94d50$export$9b9454a7f137e99b)(page);
4926
4986
  this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
4927
4987
  this.variables = new (0, $dfc4ce40cbd0eb71$export$f8e64fcf447db2bf)(page);
4988
+ this.teamsPermissions = new (0, $112122b844be02a3$export$e2613a7eee3a1b1b)(page);
4928
4989
  }
4929
4990
  getFolderSearchInputLocator() {
4930
4991
  return this.page.locator(".folder-list .folder-list-search input");
@@ -4982,6 +5043,10 @@ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$ex
4982
5043
  await this.page.locator("//span[normalize-space()='Status']").click();
4983
5044
  return this;
4984
5045
  }
5046
+ async openTeamsPermissions() {
5047
+ await this.util.openSideNavMenu("Teams & permissions");
5048
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Teams & permissions")).toBeVisible();
5049
+ }
4985
5050
  async expectReleaseGroupisDisplayed(title) {
4986
5051
  //await this.page.locator(`.fc-list-item-title-wrapper .fc-list-item-title strong:text-is('${title}`).isVisible()
4987
5052
  await this.page.waitForSelector(`.fc-list-item-title-wrapper .fc-list-item-title strong:text-is('${title}')`);
@@ -7301,6 +7366,23 @@ class $527f56b2e41ad18d$var$TemplateVariableModal extends (0, $9626bc9256ce31f7$
7301
7366
 
7302
7367
 
7303
7368
 
7369
+
7370
+
7371
+ class $d7a13717805f21e8$export$f9d0ad09366026c7 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
7372
+ constructor(page){
7373
+ super(page);
7374
+ }
7375
+ async expectInheritMessagePresent(folder) {
7376
+ await (0, $hOLA6$expect)(this.page.locator(".content-under-header p", {
7377
+ hasText: "Permissions and Teams are inherited from the folder"
7378
+ })).toBeVisible();
7379
+ await (0, $hOLA6$expect)(this.page.locator(".content-under-header p span a", {
7380
+ hasText: folder
7381
+ })).toBeVisible();
7382
+ }
7383
+ }
7384
+
7385
+
7304
7386
  class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
7305
7387
  constructor(page){
7306
7388
  super(page);
@@ -7312,6 +7394,7 @@ class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$ex
7312
7394
  this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
7313
7395
  this.variables = new (0, $527f56b2e41ad18d$export$e0f84914460c3382)(page);
7314
7396
  this.plannerView = new (0, $a546aadb4e6fa16a$export$5a82be0a2a261cc6)(page);
7397
+ this.teamsPermissions = new (0, $d7a13717805f21e8$export$f9d0ad09366026c7)(page);
7315
7398
  }
7316
7399
  async openTemplateMenu(menuItem) {
7317
7400
  await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
@@ -7633,12 +7716,22 @@ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$ex
7633
7716
  })).not.toBeVisible();
7634
7717
  }
7635
7718
  async clickCreateNewTemplate() {
7636
- await this.page.locator(".action-toolbar-actions").getByRole("button", {
7719
+ const newTemplateFromActionBarLocator = this.page.locator(".action-toolbar-actions").getByRole("button", {
7637
7720
  name: "New template"
7638
- }).click();
7639
- await this.page.locator(".action-toolbar-actions").getByRole("menuitem", {
7640
- name: "Create new template"
7641
- }).click();
7721
+ });
7722
+ await (0, $hOLA6$expect)(async ()=>{
7723
+ if (await newTemplateFromActionBarLocator.isVisible({
7724
+ timeout: 1000
7725
+ })) {
7726
+ await newTemplateFromActionBarLocator.click();
7727
+ await this.page.locator(".action-toolbar-actions").getByRole("menuitem", {
7728
+ name: "Create new template"
7729
+ }).click();
7730
+ } else // click on empty state
7731
+ await this.page.getByRole("button", {
7732
+ name: "New template"
7733
+ }).click();
7734
+ }).toPass();
7642
7735
  }
7643
7736
  async openTemplateByName(templateName) {
7644
7737
  await this.filterByTitle(templateName);
@@ -9499,11 +9592,11 @@ class $80c3ae34677b4324$var$Fixtures {
9499
9592
  // If teams are provided, send a request to add teams to the folder
9500
9593
  if (teams) {
9501
9594
  teams = this.addSystemTeams(teams);
9502
- return await this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
9595
+ await this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
9503
9596
  }
9504
9597
  if (children && children.length > 0) {
9505
9598
  await this.folderVariable(folderVariables);
9506
- return await this.folder(children[0]);
9599
+ for (const childFolder of children)await this.folder(childFolder);
9507
9600
  }
9508
9601
  if (folderVariables && folderVariables.length > 0) return await this.folderVariable(folderVariables);
9509
9602
  return response;