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

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,11 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
+ ## 0.0.87
4
+
5
+ ### Patch Changes
6
+
7
+ - 704b68b: S-125644: Add conditional clicking for creating templates buttons
8
+
3
9
  ## 0.0.86
4
10
 
5
11
  ### Patch Changes
package/dist/main.js CHANGED
@@ -8569,12 +8569,22 @@ class $8b6ce149dd48e48b$export$7e1d435fa474ee21 extends (0, $f8721861c660dd88$ex
8569
8569
  })).not.toBeVisible();
8570
8570
  }
8571
8571
  async clickCreateNewTemplate() {
8572
- await this.page.locator(".action-toolbar-actions").getByRole("button", {
8572
+ const newTemplateFromActionBarLocator = this.page.locator(".action-toolbar-actions").getByRole("button", {
8573
8573
  name: "New template"
8574
- }).click();
8575
- await this.page.locator(".action-toolbar-actions").getByRole("menuitem", {
8576
- name: "Create new template"
8577
- }).click();
8574
+ });
8575
+ await (0, $kKeXs$playwrighttest.expect)(async ()=>{
8576
+ if (await newTemplateFromActionBarLocator.isVisible({
8577
+ timeout: 1000
8578
+ })) {
8579
+ await newTemplateFromActionBarLocator.click();
8580
+ await this.page.locator(".action-toolbar-actions").getByRole("menuitem", {
8581
+ name: "Create new template"
8582
+ }).click();
8583
+ } else // click on empty state
8584
+ await this.page.getByRole("button", {
8585
+ name: "New template"
8586
+ }).click();
8587
+ }).toPass();
8578
8588
  }
8579
8589
  async openTemplateByName(templateName) {
8580
8590
  await this.filterByTitle(templateName);