@digital-ai/devops-page-object-release 0.0.40 → 0.0.41

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
@@ -800,7 +800,6 @@ class $69e86f559cdf2bd0$export$15d3f9b095bb5188 extends (0, $9626bc9256ce31f7$ex
800
800
  class $9c357602b6f466e7$export$aa59788fdecae2f2 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
801
801
  async expectWithAttachment(filename) {
802
802
  const test = this.page.locator(".task-attachments-grid .file-item-text");
803
- await test.isVisible();
804
803
  await (0, $hOLA6$expect)(test).toContainText(filename);
805
804
  }
806
805
  async getAttachmentsListCount() {
@@ -898,10 +897,10 @@ class $3fa741329d8067d5$export$d4865631ba74f3e2 extends (0, $9626bc9256ce31f7$ex
898
897
  await this.page.waitForTimeout(1000);
899
898
  }
900
899
  async expectPreconditionEditable() {
901
- await this.textEditor.isVisible();
900
+ await (0, $hOLA6$expect)(this.textEditor).toBeVisible();
902
901
  }
903
902
  async expectPreconditionNotEditable() {
904
- await this.textEditor.isHidden();
903
+ await (0, $hOLA6$expect)(this.textEditor).not.toBeEditable();
905
904
  }
906
905
  async enableFailureHandler() {
907
906
  await this.page.getByLabel("Enable failure handler").check();
@@ -1217,7 +1216,6 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
1217
1216
  })
1218
1217
  }).locator(".icon-options");
1219
1218
  if (canDelete) {
1220
- await depOptionsIcon.isVisible();
1221
1219
  await depOptionsIcon.click();
1222
1220
  await (0, $hOLA6$expect)(this.railLocator.getByRole("menuitem", {
1223
1221
  name: "Remove"
@@ -1245,7 +1243,6 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
1245
1243
  exact: true
1246
1244
  })
1247
1245
  }).locator(".icon-options");
1248
- await depOptionsIcon.isVisible();
1249
1246
  await depOptionsIcon.click();
1250
1247
  await this.railLocator.getByRole("menuitem", {
1251
1248
  name: "Remove"
@@ -1276,7 +1273,6 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
1276
1273
  const depOptionsIcon = this.page.locator(".dependency").filter({
1277
1274
  has: this.page.getByLabel(dependencies)
1278
1275
  }).first().locator(".actions");
1279
- await depOptionsIcon.isVisible();
1280
1276
  await depOptionsIcon.click();
1281
1277
  const frame = this.page.getByTestId("undefined-menu");
1282
1278
  if (await frame.isVisible()) await this.railLocator.getByRole("menuitem", {
@@ -1338,9 +1334,11 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
1338
1334
  await (0, $hOLA6$expect)(this.page.locator("#dialogTitle")).toContainText(errorMessage);
1339
1335
  }
1340
1336
  async isButtonVisible(buttonName, visible = true) {
1341
- (0, $hOLA6$expect)(await this.page.getByRole("button", {
1337
+ const locator = this.page.getByRole("button", {
1342
1338
  name: buttonName
1343
- }).isVisible()).toBe(visible);
1339
+ });
1340
+ if (visible) await (0, $hOLA6$expect)(locator).toBeVisible();
1341
+ else await (0, $hOLA6$expect)(locator).not.toBeVisible();
1344
1342
  }
1345
1343
  async cancelDialogWindow() {
1346
1344
  await this.page.getByRole("button", {
@@ -1389,9 +1387,11 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
1389
1387
  await this.page.locator(`input[name='${fieldID}']`).fill(value);
1390
1388
  }
1391
1389
  async abortButtonVisibility(visible = true) {
1392
- (0, $hOLA6$expect)(await this.page.getByRole("button", {
1390
+ const locator = this.page.getByRole("button", {
1393
1391
  name: "Abort"
1394
- }).isVisible()).toBe(visible);
1392
+ });
1393
+ if (visible) await (0, $hOLA6$expect)(locator).toBeVisible();
1394
+ else await (0, $hOLA6$expect)(locator).not.toBeVisible();
1395
1395
  }
1396
1396
  async setPattern(patternName) {
1397
1397
  await this.page.locator("#patternId").click();
@@ -1557,15 +1557,12 @@ class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$ex
1557
1557
  this.task = this.dependencyLocator.locator("#task-dependency");
1558
1558
  }
1559
1559
  async getRelease() {
1560
- await this.release.isVisible();
1561
1560
  return await this.release.getAttribute("value");
1562
1561
  }
1563
1562
  async getPhase() {
1564
- await this.phase.isVisible();
1565
1563
  return await this.phase.getAttribute("value");
1566
1564
  }
1567
1565
  async getTask() {
1568
- await this.task.isVisible();
1569
1566
  return await this.task.getAttribute("value");
1570
1567
  }
1571
1568
  async setRelease(releaseTitle) {
@@ -1748,14 +1745,14 @@ class $499d3d8c8706756b$export$e3515314c13bc477 extends (0, $9626bc9256ce31f7$ex
1748
1745
  this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
1749
1746
  }
1750
1747
  async expectStartDateToBeDisplayed() {
1751
- (0, $hOLA6$expect)(await this.page.locator(".flex-section.column").filter({
1748
+ await (0, $hOLA6$expect)(this.page.locator(".flex-section.column").filter({
1752
1749
  hasText: "Start Date"
1753
- }).locator(".task-date-view-content").isVisible()).toBe(true);
1750
+ }).locator(".task-date-view-content")).toBeVisible();
1754
1751
  }
1755
1752
  async expectEndDateToBeDisplayed() {
1756
- (0, $hOLA6$expect)(await this.page.locator(".flex-section.column").filter({
1753
+ await (0, $hOLA6$expect)(this.page.locator(".flex-section.column").filter({
1757
1754
  hasText: "End Date"
1758
- }).locator(".task-date-view-content").isVisible()).toBe(true);
1755
+ }).locator(".task-date-view-content")).toBeVisible();
1759
1756
  }
1760
1757
  async switchWaitForScheduledDate() {
1761
1758
  await this.page.locator(".wait-for-start input").click();
@@ -3670,7 +3667,7 @@ class $43cbcdfccb6c2a76$var$RestartPhaseModel extends (0, $9626bc9256ce31f7$expo
3670
3667
  await this.page.locator('.modal select[data-test="fromTask"]').selectOption(task);
3671
3668
  }
3672
3669
  async expectNoTaskSelectorVisible() {
3673
- (0, $hOLA6$expect)(await this.page.locator('.modal select[data-test="fromTask"]').isVisible()).toHaveLength(0);
3670
+ await (0, $hOLA6$expect)(this.page.locator('.modal select[data-test="fromTask"]')).not.toBeVisible();
3674
3671
  }
3675
3672
  async continue() {
3676
3673
  await this.page.locator(".modal .continue").click();
@@ -4185,7 +4182,6 @@ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$ex
4185
4182
  async backToAllFolders() {
4186
4183
  await this.page.locator(".icon-back.dot-i").click();
4187
4184
  await (0, $hOLA6$expect)(this.page).toHaveTitle("Folders - Digital.ai Release");
4188
- await this.page.locator("button.btn-add-folder").isVisible();
4189
4185
  return this;
4190
4186
  }
4191
4187
  async createFolder(folderName) {
@@ -4463,7 +4459,6 @@ class $3df1257265fba073$export$74ca1eaaa9a0054 extends (0, $9626bc9256ce31f7$exp
4463
4459
  await this.page.getByRole("button", {
4464
4460
  name: "Delete"
4465
4461
  }).click();
4466
- await this.page.locator("alert.notice.ng-scope").isVisible();
4467
4462
  }
4468
4463
  async editVariable(variableName, editedvariabletext) {
4469
4464
  await this.page.locator("[id='variables-filter']").fill(variableName);
@@ -6103,7 +6098,6 @@ class $c37c93912f458e81$var$GridView extends (0, $9626bc9256ce31f7$export$2b65d1
6103
6098
  hasText: action
6104
6099
  }).click();
6105
6100
  if (action === "Complete") {
6106
- await this.page.locator("#modal textarea[mentio]").isVisible();
6107
6101
  await this.page.locator("#modal textarea[mentio]").fill("complete");
6108
6102
  await this.page.locator("#modal button.primary").filter({
6109
6103
  hasText: "Complete"
@@ -6837,10 +6831,14 @@ class $a4ba753fcd18eb4a$export$539d82a5d70c4909 extends (0, $9626bc9256ce31f7$ex
6837
6831
  (0, $hOLA6$expect)(await this.getValue(identifier)).toEqual(value.toString());
6838
6832
  }
6839
6833
  async shouldHaveEditButton(present = true) {
6840
- (0, $hOLA6$expect)(await this.page.locator("#editRisk").isVisible()).toBe(present);
6834
+ const locator = this.page.locator("#editRisk");
6835
+ if (present) await (0, $hOLA6$expect)(locator).toBeVisible();
6836
+ else await (0, $hOLA6$expect)(locator).not.toBeVisible();
6841
6837
  }
6842
6838
  async shouldHaveSaveButton(present = true) {
6843
- (0, $hOLA6$expect)(await this.page.getByTestId("save-btn").isVisible()).toBe(present);
6839
+ const locator = this.page.getByTestId("save-btn");
6840
+ if (present) await (0, $hOLA6$expect)(locator).toBeVisible();
6841
+ else await (0, $hOLA6$expect)(locator).not.toBeVisible();
6844
6842
  }
6845
6843
  async startEditGlobalRiskThreshold() {
6846
6844
  await this.page.locator("#editRisk").click();
@@ -6862,9 +6860,11 @@ class $a4ba753fcd18eb4a$export$539d82a5d70c4909 extends (0, $9626bc9256ce31f7$ex
6862
6860
  await this.page.locator("#risk-profile-table").waitFor({
6863
6861
  state: "visible"
6864
6862
  });
6865
- (0, $hOLA6$expect)(await this.page.locator(".risk-profile .data-row").filter({
6863
+ const locator = this.page.locator(".risk-profile .data-row").filter({
6866
6864
  hasText: title
6867
- }).isVisible()).toBe(present);
6865
+ });
6866
+ if (present) await (0, $hOLA6$expect)(locator).toBeVisible();
6867
+ else await (0, $hOLA6$expect)(locator).not.toBeVisible();
6868
6868
  }
6869
6869
  async expectDefaultRiskProfileToBeFirst() {
6870
6870
  await this.page.locator("#risk-profile-table").waitFor({
@@ -6887,9 +6887,11 @@ class $a4ba753fcd18eb4a$export$539d82a5d70c4909 extends (0, $9626bc9256ce31f7$ex
6887
6887
  }).waitFor({
6888
6888
  state: "visible"
6889
6889
  });
6890
- (0, $hOLA6$expect)(await this.page.locator(".risk-profile .data-row").filter({
6890
+ const locator = this.page.locator(".risk-profile .data-row").filter({
6891
6891
  hasText: title
6892
- }).locator(".copy-action").isVisible()).toBe(enabled);
6892
+ }).locator(".copy-action");
6893
+ if (enabled) await (0, $hOLA6$expect)(locator).toBeVisible();
6894
+ else await (0, $hOLA6$expect)(locator).not.toBeVisible();
6893
6895
  }
6894
6896
  async shouldHaveDeleteButtonEnabledForRiskProfile(title, enabled = true) {
6895
6897
  await this.page.locator(".risk-profile .data-row").filter({
@@ -6897,9 +6899,11 @@ class $a4ba753fcd18eb4a$export$539d82a5d70c4909 extends (0, $9626bc9256ce31f7$ex
6897
6899
  }).waitFor({
6898
6900
  state: "visible"
6899
6901
  });
6900
- (0, $hOLA6$expect)(await this.page.locator(`.risk-profile .data-row`).filter({
6902
+ const locator = this.page.locator(`.risk-profile .data-row`).filter({
6901
6903
  hasText: title
6902
- }).locator(`.remove-action`).isVisible()).toBe(enabled);
6904
+ }).locator(`.remove-action`);
6905
+ if (enabled) await (0, $hOLA6$expect)(locator).toBeVisible();
6906
+ else await (0, $hOLA6$expect)(locator).not.toBeVisible();
6903
6907
  }
6904
6908
  async clickNewRiskProfile() {
6905
6909
  await this.page.getByTestId("new-risk-btn").waitFor({
@@ -6955,7 +6959,9 @@ class $a4ba753fcd18eb4a$export$539d82a5d70c4909 extends (0, $9626bc9256ce31f7$ex
6955
6959
  (0, $hOLA6$expect)(await this.page.locator("#risk-profile-table .data-row").count()).toEqual(numberOfVisibleRiskProfiles);
6956
6960
  }
6957
6961
  async shouldHaveNewRiskProfileButton(present = true) {
6958
- (0, $hOLA6$expect)(await this.page.getByTestId("new-risk-btn").isVisible()).toBe(present);
6962
+ const locator = this.page.getByTestId("new-risk-btn");
6963
+ if (present) await (0, $hOLA6$expect)(locator).toBeVisible();
6964
+ else await (0, $hOLA6$expect)(locator).not.toBeVisible();
6959
6965
  }
6960
6966
  }
6961
6967
  class $a4ba753fcd18eb4a$var$RisksProfilePage extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
@@ -7051,18 +7057,18 @@ class $6c0f5b52769b32c3$export$9823ddf5e80770e7 extends (0, $9626bc9256ce31f7$ex
7051
7057
  state: "visible",
7052
7058
  timeout: 200000
7053
7059
  });
7054
- (0, $hOLA6$expect)(await this.page.locator(`.configuration-instance`).filter({
7060
+ await (0, $hOLA6$expect)(this.page.locator(`.configuration-instance`).filter({
7055
7061
  hasText: instanceName
7056
- }).isVisible()).toBe(true);
7062
+ })).toBeVisible();
7057
7063
  return this;
7058
7064
  }
7059
7065
  async expectInstanceNotDisplayed(instanceName) {
7060
7066
  await this.page.locator("#configuration").waitFor({
7061
7067
  state: "visible"
7062
7068
  });
7063
- (0, $hOLA6$expect)(await this.page.locator(`.configuration-instance`).filter({
7069
+ await (0, $hOLA6$expect)(this.page.locator(`.configuration-instance`).filter({
7064
7070
  hasText: instanceName
7065
- }).isVisible()).toBe(false);
7071
+ })).not.toBeVisible();
7066
7072
  return this;
7067
7073
  }
7068
7074
  async openInstance(instanceName) {
@@ -7283,7 +7289,6 @@ class $2c3301798e261060$export$8da2fa93430be6ca extends (0, $9626bc9256ce31f7$ex
7283
7289
  exact: true
7284
7290
  })
7285
7291
  }).getByRole("checkbox").click();
7286
- await this.page.getByTestId("save-btn").isVisible();
7287
7292
  await this.page.getByTestId("save-btn").click();
7288
7293
  await this.page.locator(".saved-text").waitFor();
7289
7294
  } else if (!isChecked && enable) {
@@ -7297,7 +7302,6 @@ class $2c3301798e261060$export$8da2fa93430be6ca extends (0, $9626bc9256ce31f7$ex
7297
7302
  exact: true
7298
7303
  })
7299
7304
  }).getByRole("checkbox").click();
7300
- await this.page.getByTestId("save-btn").isVisible();
7301
7305
  await this.page.getByTestId("save-btn").click();
7302
7306
  await this.page.locator(".saved-text").waitFor();
7303
7307
  }