@digital-ai/devops-page-object-release 0.0.54 → 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
@@ -3504,39 +3504,62 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
3504
3504
  }
3505
3505
  async isMenuItemEnabled(menuName, taskTitle, group = false) {
3506
3506
  await this.openContextMenuForTask(taskTitle, group);
3507
- await (0, $hOLA6$expect)(this.contextMenuButton.filter({
3508
- hasText: menuName
3509
- })).not.toHaveClass(/disabled/);
3510
- await (0, $hOLA6$expect)(this.contextMenuButton.filter({
3511
- hasText: menuName
3512
- }).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/);
3513
3513
  await this.closeContextMenu();
3514
3514
  }
3515
3515
  async isMenuItemDisabled(menuName, taskTitle, group = false) {
3516
3516
  await this.openContextMenuForTask(taskTitle, group);
3517
3517
  const menuItem = this.contextMenuButton.filter({
3518
- hasText: menuName
3518
+ has: this.page.locator("a").getByText(menuName, {
3519
+ exact: true
3520
+ })
3519
3521
  });
3520
3522
  await (0, $hOLA6$expect)(menuItem).toHaveClass(/disabled/);
3521
- const anchorTag = menuItem.locator("a");
3522
- const disabledAttribute = await anchorTag.getAttribute("disabled");
3523
- (0, $hOLA6$expect)(disabledAttribute).not.toBeNull();
3524
3523
  await this.closeContextMenu();
3525
3524
  }
3526
3525
  async expectMenuItemIsNotVisible(menuName, taskTitle) {
3527
3526
  await this.openContextMenuForTask(taskTitle);
3528
- await (0, $hOLA6$expect)(this.page.locator("#context-menu-container li").filter({
3529
- hasText: menuName
3527
+ await (0, $hOLA6$expect)(this.contextMenuButton.getByText(menuName, {
3528
+ exact: true
3530
3529
  })).not.toBeVisible();
3531
3530
  await this.closeContextMenu();
3532
3531
  }
3533
3532
  async expectMenuItemIsVisible(menuName, taskTitle) {
3534
3533
  await this.openContextMenuForTask(taskTitle);
3535
- await (0, $hOLA6$expect)(this.page.locator("#context-menu-container li").filter({
3536
- hasText: menuName
3534
+ await (0, $hOLA6$expect)(this.contextMenuButton.getByText(menuName, {
3535
+ exact: true
3537
3536
  })).toBeVisible();
3538
3537
  await this.closeContextMenu();
3539
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
3546
+ })).toBeVisible();
3547
+ await this.closeContextMenu();
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
+ }
3540
3563
  async closeContextMenu() {
3541
3564
  await this.page.locator("#release-header").click();
3542
3565
  }