@digital-ai/devops-page-object-release 0.0.53 → 0.0.55

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
@@ -2040,6 +2040,15 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
2040
2040
  }).click();
2041
2041
  await (0, $hOLA6$expect)(this.startButton).not.toBeVisible();
2042
2042
  }
2043
+ async startNowWithBlackout(comment) {
2044
+ await this.startButton.click();
2045
+ await this.commentBox.fill(comment);
2046
+ await (0, $hOLA6$expect)(this.page.getByText("Are you sure you want to run this task during the blackout period?")).toBeVisible();
2047
+ await this.page.locator("button", {
2048
+ hasText: "Start now"
2049
+ }).click();
2050
+ await (0, $hOLA6$expect)(this.startButton).not.toBeVisible();
2051
+ }
2043
2052
  async expectTaskTitle(taskTitle) {
2044
2053
  await (0, $hOLA6$expect)(this.page.locator(".task-drawer .task-title-input .dot-view-mode-typography")).toContainText(taskTitle);
2045
2054
  }
@@ -3495,39 +3504,62 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
3495
3504
  }
3496
3505
  async isMenuItemEnabled(menuName, taskTitle, group = false) {
3497
3506
  await this.openContextMenuForTask(taskTitle, group);
3498
- await (0, $hOLA6$expect)(this.contextMenuButton.filter({
3499
- hasText: menuName
3500
- })).not.toHaveClass(/disabled/);
3501
- await (0, $hOLA6$expect)(this.contextMenuButton.filter({
3502
- hasText: menuName
3503
- }).locator("a")).not.toBeDisabled();
3507
+ const menuItem = this.contextMenuButton.filter({
3508
+ has: this.page.locator("a").getByText(menuName, {
3509
+ exact: true
3510
+ })
3511
+ });
3512
+ await (0, $hOLA6$expect)(menuItem).not.toHaveClass(/disabled/);
3504
3513
  await this.closeContextMenu();
3505
3514
  }
3506
3515
  async isMenuItemDisabled(menuName, taskTitle, group = false) {
3507
3516
  await this.openContextMenuForTask(taskTitle, group);
3508
3517
  const menuItem = this.contextMenuButton.filter({
3509
- hasText: menuName
3518
+ has: this.page.locator("a").getByText(menuName, {
3519
+ exact: true
3520
+ })
3510
3521
  });
3511
3522
  await (0, $hOLA6$expect)(menuItem).toHaveClass(/disabled/);
3512
- const anchorTag = menuItem.locator("a");
3513
- const disabledAttribute = await anchorTag.getAttribute("disabled");
3514
- (0, $hOLA6$expect)(disabledAttribute).not.toBeNull();
3515
3523
  await this.closeContextMenu();
3516
3524
  }
3517
3525
  async expectMenuItemIsNotVisible(menuName, taskTitle) {
3518
3526
  await this.openContextMenuForTask(taskTitle);
3519
- await (0, $hOLA6$expect)(this.page.locator("#context-menu-container li").filter({
3520
- hasText: menuName
3527
+ await (0, $hOLA6$expect)(this.contextMenuButton.getByText(menuName, {
3528
+ exact: true
3521
3529
  })).not.toBeVisible();
3522
3530
  await this.closeContextMenu();
3523
3531
  }
3524
3532
  async expectMenuItemIsVisible(menuName, taskTitle) {
3525
3533
  await this.openContextMenuForTask(taskTitle);
3526
- await (0, $hOLA6$expect)(this.page.locator("#context-menu-container li").filter({
3527
- hasText: menuName
3534
+ await (0, $hOLA6$expect)(this.contextMenuButton.getByText(menuName, {
3535
+ exact: true
3536
+ })).toBeVisible();
3537
+ await this.closeContextMenu();
3538
+ }
3539
+ async expectSubmenuItemIsVisible(parentMenuItem, menuName, taskTitle) {
3540
+ await this.openContextMenuForTask(taskTitle);
3541
+ await this.contextMenuButton.getByText(parentMenuItem, {
3542
+ exact: true
3543
+ }).hover();
3544
+ await (0, $hOLA6$expect)(this.page.locator(`#context-menu-container ul[data-id="${parentMenuItem}"] li`).getByText(menuName, {
3545
+ exact: true
3528
3546
  })).toBeVisible();
3529
3547
  await this.closeContextMenu();
3530
3548
  }
3549
+ async clickSubmenuItemForTask(parentMenuItem, menuName, taskTitle) {
3550
+ await this.openContextMenuForTask(taskTitle);
3551
+ await this.contextMenuButton.getByText(parentMenuItem, {
3552
+ exact: true
3553
+ }).hover();
3554
+ await this.page.locator(`#context-menu-container ul[data-id="${parentMenuItem}"] li a`).getByText(menuName, {
3555
+ exact: true
3556
+ }).click();
3557
+ }
3558
+ async expectSnackbarSuccessMessage(message) {
3559
+ const snackbar = this.page.locator('.dot-snackbar[severity="success"]');
3560
+ await (0, $hOLA6$expect)(snackbar.locator("p")).toHaveText(message);
3561
+ await snackbar.getByRole("button").click();
3562
+ }
3531
3563
  async closeContextMenu() {
3532
3564
  await this.page.locator("#release-header").click();
3533
3565
  }