@digital-ai/devops-page-object-release 0.0.80 → 0.0.81

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.81
4
+
5
+ ### Patch Changes
6
+
7
+ - f1da164: S-124769: Update delivery patterns
8
+
3
9
  ## 0.0.80
4
10
 
5
11
  ### Patch Changes
package/dist/main.js CHANGED
@@ -5514,7 +5514,7 @@ class $ceb2e9e08e1837c2$export$9b9454a7f137e99b extends (0, $f8721861c660dd88$ex
5514
5514
  async disableAutoComplete() {
5515
5515
  await this.page.getByRole("checkbox").uncheck();
5516
5516
  }
5517
- async setDuration(month, days, hours) {
5517
+ async setDuration({ month: month , days: days , hours: hours }) {
5518
5518
  await this.page.getByRole("group", {
5519
5519
  name: "Pattern details"
5520
5520
  }).getByRole("textbox").click();
@@ -5525,10 +5525,11 @@ class $ceb2e9e08e1837c2$export$9b9454a7f137e99b extends (0, $f8721861c660dd88$ex
5525
5525
  await this.page.locator('input[name="hours"]').click();
5526
5526
  await this.page.locator('input[name="hours"]').fill(hours.toString());
5527
5527
  }
5528
- async createNewPattern(patternName, patternDescription) {
5528
+ async createNewPattern(patternName, patternDescription, duration) {
5529
5529
  await this.clickNewDeliveryPattern();
5530
5530
  await this.setPatternName(patternName);
5531
5531
  await this.setPatternDescription(patternDescription);
5532
+ await this.setDuration(duration);
5532
5533
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".action-toolbar-actions button").filter({
5533
5534
  hasText: "Create"
5534
5535
  })).toBeEnabled();
@@ -5556,25 +5557,59 @@ class $ceb2e9e08e1837c2$export$9b9454a7f137e99b extends (0, $f8721861c660dd88$ex
5556
5557
  await this.page.getByPlaceholder("Filter by name...").clear();
5557
5558
  await this.page.getByPlaceholder("Filter by name...").fill(patternName);
5558
5559
  await this.page.getByPlaceholder("Filter by name...").press("Enter");
5559
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".delivery-pattern-row").filter({
5560
- hasText: patternName
5561
- })).toBeVisible();
5562
5560
  }
5563
5561
  async openProperties() {
5564
5562
  await this.util.openSideNavMenu("Properties");
5565
5563
  return new $ceb2e9e08e1837c2$var$Properties(this.page);
5566
5564
  }
5565
+ async openTrackedItems() {
5566
+ await this.util.openSideNavMenu("Tracked items");
5567
+ return new $ceb2e9e08e1837c2$var$Properties(this.page);
5568
+ }
5569
+ async addTrackedItem(trackedItemName) {
5570
+ await this.page.getByRole("button", {
5571
+ name: "Add tracked item"
5572
+ }).click();
5573
+ await this.page.getByPlaceholder("Add...").fill(trackedItemName);
5574
+ await this.page.getByRole("button", {
5575
+ name: "Create"
5576
+ }).click();
5577
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(trackedItemName)).toBeVisible();
5578
+ return new $ceb2e9e08e1837c2$var$Properties(this.page);
5579
+ }
5580
+ async editTrackedItemName(oldName, newName) {
5581
+ // Open the edit modal for the given tracked item
5582
+ await this.page.locator(".track-panel", {
5583
+ hasText: oldName
5584
+ }).locator(".action-label", {
5585
+ hasText: "Edit"
5586
+ }).click();
5587
+ // Wait for modal to be visible
5588
+ const modal = this.page.locator(".xl-react-modal .xl-react-modal-content");
5589
+ await (0, $kKeXs$playwrighttest.expect)(modal).toBeVisible();
5590
+ // Clear the input and type new name
5591
+ const nameInput = modal.locator('input[type="text"]');
5592
+ await nameInput.clear();
5593
+ await nameInput.fill(newName);
5594
+ // Click Save
5595
+ await modal.locator("button.xl-react-button.button.primary", {
5596
+ hasText: "Save"
5597
+ }).click();
5598
+ // Verify the updated name appears in the tracked items list
5599
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".track-panel")).toContainText(newName);
5600
+ }
5567
5601
  async back() {
5568
5602
  await this.page.getByTestId("back-button").click();
5569
5603
  }
5570
- async copyPattern(existingPatternName, NewPatternName) {
5604
+ async copyPattern(existingPatternName) {
5571
5605
  await this.clickCopyPatternIcon(existingPatternName);
5572
- await this.page.locator(".xl-icon.close-icon").first().click();
5573
- await this.addName.fill(NewPatternName);
5574
5606
  await this.page.getByRole("button", {
5575
5607
  name: "Continue"
5576
5608
  }).click();
5577
5609
  await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Delivery flow")).toBeVisible();
5610
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
5611
+ name: `${existingPatternName} (1)`
5612
+ })).toBeVisible();
5578
5613
  }
5579
5614
  async clickDeletePattern(patternName) {
5580
5615
  await this.page.locator(".delivery-pattern-row").filter({
@@ -5590,6 +5625,19 @@ class $ceb2e9e08e1837c2$export$9b9454a7f137e99b extends (0, $f8721861c660dd88$ex
5590
5625
  hasText: patternName
5591
5626
  })).not.toBeVisible();
5592
5627
  }
5628
+ async expectPatternIsVisible(patternName) {
5629
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".delivery-pattern-row").filter({
5630
+ hasText: patternName
5631
+ })).toBeVisible();
5632
+ }
5633
+ async expectPatternIsNotVisible(patternName) {
5634
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".delivery-pattern-row").filter({
5635
+ hasText: patternName
5636
+ })).toBeHidden();
5637
+ }
5638
+ noPatternsMessageIsVisible() {
5639
+ return (0, $kKeXs$playwrighttest.expect)(this.page.getByText("No delivery patterns found")).toBeVisible();
5640
+ }
5593
5641
  async createNewDelivery(deliveryName, deliveryDes, setAutoComplete) {
5594
5642
  await this.page.getByRole("button", {
5595
5643
  name: "New delivery"