@digital-ai/devops-page-object-release 0.0.0-snapshot-20251014105644 → 0.0.0-snapshot-20251023115157

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,11 +1,17 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
- ## 0.0.0-snapshot-20251014105644
3
+ ## 0.0.0-snapshot-20251023115157
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - 1538d7d: S-125018: Added folder-permissions-scenario page objects
8
8
 
9
+ ## 0.0.87
10
+
11
+ ### Patch Changes
12
+
13
+ - 704b68b: S-125644: Add conditional clicking for creating templates buttons
14
+
9
15
  ## 0.0.86
10
16
 
11
17
  ### Patch Changes
package/dist/main.js CHANGED
@@ -8652,12 +8652,22 @@ class $8b6ce149dd48e48b$export$7e1d435fa474ee21 extends (0, $f8721861c660dd88$ex
8652
8652
  })).not.toBeVisible();
8653
8653
  }
8654
8654
  async clickCreateNewTemplate() {
8655
- await this.page.locator(".action-toolbar-actions").getByRole("button", {
8655
+ const newTemplateFromActionBarLocator = this.page.locator(".action-toolbar-actions").getByRole("button", {
8656
8656
  name: "New template"
8657
- }).click();
8658
- await this.page.locator(".action-toolbar-actions").getByRole("menuitem", {
8659
- name: "Create new template"
8660
- }).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();
8661
8671
  }
8662
8672
  async openTemplateByName(templateName) {
8663
8673
  await this.filterByTitle(templateName);
@@ -11192,11 +11202,11 @@ class $6998c6a53a9eb4fa$var$Fixtures {
11192
11202
  // If teams are provided, send a request to add teams to the folder
11193
11203
  if (teams) {
11194
11204
  teams = this.addSystemTeams(teams);
11195
- return await this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
11205
+ await this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
11196
11206
  }
11197
11207
  if (children && children.length > 0) {
11198
11208
  await this.folderVariable(folderVariables);
11199
- return await this.folder(children[0]);
11209
+ for (const childFolder of children)await this.folder(childFolder);
11200
11210
  }
11201
11211
  if (folderVariables && folderVariables.length > 0) return await this.folderVariable(folderVariables);
11202
11212
  return response;