@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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
+ ## 0.0.88
4
+
5
+ ### Patch Changes
6
+
7
+ - e96c33d: S-125018: Added folder-permissions-scenario page objects
8
+
9
+ ## 0.0.87
10
+
11
+ ### Patch Changes
12
+
13
+ - 704b68b: S-125644: Add conditional clicking for creating templates buttons
14
+
3
15
  ## 0.0.86
4
16
 
5
17
  ### Patch Changes
package/dist/main.js CHANGED
@@ -5848,6 +5848,66 @@ class $04ff53be95b7a0a4$export$32284f8bcf0bc407 extends (0, $f8721861c660dd88$ex
5848
5848
 
5849
5849
 
5850
5850
 
5851
+ class $e5c8dec182aa2e84$export$e2613a7eee3a1b1b extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
5852
+ constructor(page){
5853
+ super(page);
5854
+ }
5855
+ async expectPermissionToExist(permission, team) {
5856
+ const row = this.page.locator("table tr", {
5857
+ hasText: permission
5858
+ });
5859
+ const tag = row.locator(".tag", {
5860
+ hasText: team
5861
+ });
5862
+ await (0, $kKeXs$playwrighttest.expect)(tag).toBeVisible();
5863
+ }
5864
+ async removePermission(permission, team) {
5865
+ const row = this.page.locator("table tr", {
5866
+ hasText: permission
5867
+ });
5868
+ const tag = row.locator(".tag", {
5869
+ hasText: team
5870
+ });
5871
+ await tag.locator(".close-icon").click();
5872
+ }
5873
+ async expectPermissionNotToExist(permission, team) {
5874
+ const row = this.page.locator("table tr", {
5875
+ hasText: permission
5876
+ });
5877
+ const tag = row.locator(".tag", {
5878
+ hasText: team
5879
+ });
5880
+ await (0, $kKeXs$playwrighttest.expect)(tag).toHaveCount(0);
5881
+ }
5882
+ async removeTeam(teamName) {
5883
+ const row = this.page.locator("#teams-permissions-table table tr", {
5884
+ hasText: teamName
5885
+ });
5886
+ await row.locator(".action-label").click();
5887
+ await this.page.getByRole("button", {
5888
+ name: "Delete"
5889
+ }).click();
5890
+ }
5891
+ async expectInheritMessagePresent(folder) {
5892
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("p.inherit-checkbox", {
5893
+ hasText: "Inherit teams and permissions from parent folder"
5894
+ })).toBeVisible();
5895
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("p.inherit-checkbox a", {
5896
+ hasText: folder
5897
+ })).toBeVisible();
5898
+ return this;
5899
+ }
5900
+ async reset() {
5901
+ await this.page.getByRole("button", {
5902
+ name: "Reset"
5903
+ }).click();
5904
+ return this;
5905
+ }
5906
+ }
5907
+
5908
+
5909
+
5910
+
5851
5911
 
5852
5912
  class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
5853
5913
  constructor(page){
@@ -5861,6 +5921,7 @@ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$ex
5861
5921
  this.patternPage = new (0, $ceb2e9e08e1837c2$export$9b9454a7f137e99b)(page);
5862
5922
  this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
5863
5923
  this.variables = new (0, $59543fc69900e8db$export$f8e64fcf447db2bf)(page);
5924
+ this.teamsPermissions = new (0, $e5c8dec182aa2e84$export$e2613a7eee3a1b1b)(page);
5864
5925
  }
5865
5926
  getFolderSearchInputLocator() {
5866
5927
  return this.page.locator(".folder-list .folder-list-search input");
@@ -5918,6 +5979,10 @@ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$ex
5918
5979
  await this.page.locator("//span[normalize-space()='Status']").click();
5919
5980
  return this;
5920
5981
  }
5982
+ async openTeamsPermissions() {
5983
+ await this.util.openSideNavMenu("Teams & permissions");
5984
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Teams & permissions")).toBeVisible();
5985
+ }
5921
5986
  async expectReleaseGroupisDisplayed(title) {
5922
5987
  //await this.page.locator(`.fc-list-item-title-wrapper .fc-list-item-title strong:text-is('${title}`).isVisible()
5923
5988
  await this.page.waitForSelector(`.fc-list-item-title-wrapper .fc-list-item-title strong:text-is('${title}')`);
@@ -8237,6 +8302,23 @@ class $170d32617f3aa58e$var$TemplateVariableModal extends (0, $f8721861c660dd88$
8237
8302
 
8238
8303
 
8239
8304
 
8305
+
8306
+
8307
+ class $a0fa381eac732e63$export$f9d0ad09366026c7 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
8308
+ constructor(page){
8309
+ super(page);
8310
+ }
8311
+ async expectInheritMessagePresent(folder) {
8312
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".content-under-header p", {
8313
+ hasText: "Permissions and Teams are inherited from the folder"
8314
+ })).toBeVisible();
8315
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".content-under-header p span a", {
8316
+ hasText: folder
8317
+ })).toBeVisible();
8318
+ }
8319
+ }
8320
+
8321
+
8240
8322
  class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
8241
8323
  constructor(page){
8242
8324
  super(page);
@@ -8248,6 +8330,7 @@ class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$ex
8248
8330
  this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
8249
8331
  this.variables = new (0, $170d32617f3aa58e$export$e0f84914460c3382)(page);
8250
8332
  this.plannerView = new (0, $e8395395d01b66bb$export$5a82be0a2a261cc6)(page);
8333
+ this.teamsPermissions = new (0, $a0fa381eac732e63$export$f9d0ad09366026c7)(page);
8251
8334
  }
8252
8335
  async openTemplateMenu(menuItem) {
8253
8336
  await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
@@ -8569,12 +8652,22 @@ class $8b6ce149dd48e48b$export$7e1d435fa474ee21 extends (0, $f8721861c660dd88$ex
8569
8652
  })).not.toBeVisible();
8570
8653
  }
8571
8654
  async clickCreateNewTemplate() {
8572
- await this.page.locator(".action-toolbar-actions").getByRole("button", {
8655
+ const newTemplateFromActionBarLocator = this.page.locator(".action-toolbar-actions").getByRole("button", {
8573
8656
  name: "New template"
8574
- }).click();
8575
- await this.page.locator(".action-toolbar-actions").getByRole("menuitem", {
8576
- name: "Create new template"
8577
- }).click();
8657
+ });
8658
+ await (0, $kKeXs$playwrighttest.expect)(async ()=>{
8659
+ if (await newTemplateFromActionBarLocator.isVisible({
8660
+ timeout: 1000
8661
+ })) {
8662
+ await newTemplateFromActionBarLocator.click();
8663
+ await this.page.locator(".action-toolbar-actions").getByRole("menuitem", {
8664
+ name: "Create new template"
8665
+ }).click();
8666
+ } else // click on empty state
8667
+ await this.page.getByRole("button", {
8668
+ name: "New template"
8669
+ }).click();
8670
+ }).toPass();
8578
8671
  }
8579
8672
  async openTemplateByName(templateName) {
8580
8673
  await this.filterByTitle(templateName);
@@ -11109,11 +11202,11 @@ class $6998c6a53a9eb4fa$var$Fixtures {
11109
11202
  // If teams are provided, send a request to add teams to the folder
11110
11203
  if (teams) {
11111
11204
  teams = this.addSystemTeams(teams);
11112
- return await this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
11205
+ await this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
11113
11206
  }
11114
11207
  if (children && children.length > 0) {
11115
11208
  await this.folderVariable(folderVariables);
11116
- return await this.folder(children[0]);
11209
+ for (const childFolder of children)await this.folder(childFolder);
11117
11210
  }
11118
11211
  if (folderVariables && folderVariables.length > 0) return await this.folderVariable(folderVariables);
11119
11212
  return response;