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

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