@digital-ai/devops-page-object-release 0.0.54 → 0.0.56

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
@@ -1841,7 +1841,20 @@ class $499d3d8c8706756b$export$e3515314c13bc477 extends (0, $9626bc9256ce31f7$ex
1841
1841
  async expectStartDateToBe(date) {
1842
1842
  (0, $hOLA6$expect)(await this.page.locator(".flex-section.column").filter({
1843
1843
  hasText: "Start Date"
1844
- }).locator(".task-date-view-content").getAttribute("aria-label")).toContain(date);
1844
+ }).locator(".task-date-view-content .dot-avatar").getAttribute("aria-label")).toContain(date);
1845
+ }
1846
+ async expectStartDateWarningBannerToNotBePresent() {
1847
+ const alertBanner = this.page.locator(".dot-alert-banner");
1848
+ await (0, $hOLA6$expect)(alertBanner).not.toBeVisible();
1849
+ }
1850
+ async expectStartDateWarningBanner(text, originalScheduledStartDate) {
1851
+ const alertBanner = this.page.locator(".dot-alert-banner");
1852
+ await (0, $hOLA6$expect)(alertBanner).toBeVisible();
1853
+ await (0, $hOLA6$expect)(alertBanner).toContainText(text);
1854
+ if (originalScheduledStartDate) {
1855
+ const originalScheduledStartDateText = await this.page.locator('.dot-alert-banner p[data-testid="original-scheduled-start-date"] span').textContent();
1856
+ if (originalScheduledStartDateText) (0, $hOLA6$expect)((0, $hOLA6$moment)(new Date(originalScheduledStartDateText)).format("YYYY-MM-DDTHH:mm")).toBe((0, $hOLA6$moment)(new Date(originalScheduledStartDate)).format("YYYY-MM-DDTHH:mm"));
1857
+ }
1845
1858
  }
1846
1859
  async expectEndDateToBeDisplayed() {
1847
1860
  await (0, $hOLA6$expect)(this.page.locator(".flex-section.column").filter({
@@ -3504,39 +3517,62 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
3504
3517
  }
3505
3518
  async isMenuItemEnabled(menuName, taskTitle, group = false) {
3506
3519
  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();
3520
+ const menuItem = this.contextMenuButton.filter({
3521
+ has: this.page.locator("a").getByText(menuName, {
3522
+ exact: true
3523
+ })
3524
+ });
3525
+ await (0, $hOLA6$expect)(menuItem).not.toHaveClass(/disabled/);
3513
3526
  await this.closeContextMenu();
3514
3527
  }
3515
3528
  async isMenuItemDisabled(menuName, taskTitle, group = false) {
3516
3529
  await this.openContextMenuForTask(taskTitle, group);
3517
3530
  const menuItem = this.contextMenuButton.filter({
3518
- hasText: menuName
3531
+ has: this.page.locator("a").getByText(menuName, {
3532
+ exact: true
3533
+ })
3519
3534
  });
3520
3535
  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
3536
  await this.closeContextMenu();
3525
3537
  }
3526
3538
  async expectMenuItemIsNotVisible(menuName, taskTitle) {
3527
3539
  await this.openContextMenuForTask(taskTitle);
3528
- await (0, $hOLA6$expect)(this.page.locator("#context-menu-container li").filter({
3529
- hasText: menuName
3540
+ await (0, $hOLA6$expect)(this.contextMenuButton.getByText(menuName, {
3541
+ exact: true
3530
3542
  })).not.toBeVisible();
3531
3543
  await this.closeContextMenu();
3532
3544
  }
3533
3545
  async expectMenuItemIsVisible(menuName, taskTitle) {
3534
3546
  await this.openContextMenuForTask(taskTitle);
3535
- await (0, $hOLA6$expect)(this.page.locator("#context-menu-container li").filter({
3536
- hasText: menuName
3547
+ await (0, $hOLA6$expect)(this.contextMenuButton.getByText(menuName, {
3548
+ exact: true
3549
+ })).toBeVisible();
3550
+ await this.closeContextMenu();
3551
+ }
3552
+ async expectSubmenuItemIsVisible(parentMenuItem, menuName, taskTitle) {
3553
+ await this.openContextMenuForTask(taskTitle);
3554
+ await this.contextMenuButton.getByText(parentMenuItem, {
3555
+ exact: true
3556
+ }).hover();
3557
+ await (0, $hOLA6$expect)(this.page.locator(`#context-menu-container ul[data-id="${parentMenuItem}"] li`).getByText(menuName, {
3558
+ exact: true
3537
3559
  })).toBeVisible();
3538
3560
  await this.closeContextMenu();
3539
3561
  }
3562
+ async clickSubmenuItemForTask(parentMenuItem, menuName, taskTitle) {
3563
+ await this.openContextMenuForTask(taskTitle);
3564
+ await this.contextMenuButton.getByText(parentMenuItem, {
3565
+ exact: true
3566
+ }).hover();
3567
+ await this.page.locator(`#context-menu-container ul[data-id="${parentMenuItem}"] li a`).getByText(menuName, {
3568
+ exact: true
3569
+ }).click();
3570
+ }
3571
+ async expectSnackbarSuccessMessage(message) {
3572
+ const snackbar = this.page.locator('.dot-snackbar[severity="success"]');
3573
+ await (0, $hOLA6$expect)(snackbar.locator("p")).toHaveText(message);
3574
+ await snackbar.getByRole("button").click();
3575
+ }
3540
3576
  async closeContextMenu() {
3541
3577
  await this.page.locator("#release-header").click();
3542
3578
  }
@@ -6612,6 +6648,7 @@ class $527f56b2e41ad18d$var$TemplateVariableModal extends (0, $9626bc9256ce31f7$
6612
6648
 
6613
6649
 
6614
6650
 
6651
+
6615
6652
  class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
6616
6653
  constructor(page){
6617
6654
  super(page);
@@ -6622,6 +6659,7 @@ class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$ex
6622
6659
  this.triggers = new (0, $8f36d138075416d2$export$899a7095bab1879d)(page);
6623
6660
  this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
6624
6661
  this.variables = new (0, $527f56b2e41ad18d$export$e0f84914460c3382)(page);
6662
+ this.plannerView = new (0, $a546aadb4e6fa16a$export$5a82be0a2a261cc6)(page);
6625
6663
  }
6626
6664
  async openTemplateMenu(menuItem) {
6627
6665
  await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
@@ -6705,6 +6743,7 @@ class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$ex
6705
6743
  async openPlannerView() {
6706
6744
  await this.util.openSideNavMenu("Planner");
6707
6745
  await (0, $hOLA6$expect)(this.page.locator(".gantt-container")).toBeVisible();
6746
+ return this.plannerView;
6708
6747
  }
6709
6748
  async openCodeView() {
6710
6749
  await this.util.openSideNavMenu("Code");