@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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
+ ## 0.0.42
4
+
5
+ ### Patch Changes
6
+
7
+ - dcc0e67: Fix precondition queries
8
+
9
+ ## 0.0.41
10
+
11
+ ### Patch Changes
12
+
13
+ - e080216: Replace isVisible with expectation
14
+
3
15
  ## 0.0.40
4
16
 
5
17
  ### Patch Changes
package/dist/main.js CHANGED
@@ -1736,7 +1736,6 @@ class $6c924a95a765a086$export$15d3f9b095bb5188 extends (0, $f8721861c660dd88$ex
1736
1736
  class $f9016705c1a1eb20$export$aa59788fdecae2f2 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
1737
1737
  async expectWithAttachment(filename) {
1738
1738
  const test = this.page.locator(".task-attachments-grid .file-item-text");
1739
- await test.isVisible();
1740
1739
  await (0, $kKeXs$playwrighttest.expect)(test).toContainText(filename);
1741
1740
  }
1742
1741
  async getAttachmentsListCount() {
@@ -1833,11 +1832,9 @@ class $9c0b0c2caed50730$export$d4865631ba74f3e2 extends (0, $f8721861c660dd88$ex
1833
1832
  await this.saveButton.dblclick();
1834
1833
  await this.page.waitForTimeout(1000);
1835
1834
  }
1836
- async expectPreconditionEditable() {
1837
- await this.textEditor.isVisible();
1838
- }
1839
- async expectPreconditionNotEditable() {
1840
- await this.textEditor.isHidden();
1835
+ async expectPreconditionEditable(editable) {
1836
+ if (editable) await (0, $kKeXs$playwrighttest.expect)(this.textEditor).toBeEditable();
1837
+ else await (0, $kKeXs$playwrighttest.expect)(this.textEditor).not.toBeEditable();
1841
1838
  }
1842
1839
  async enableFailureHandler() {
1843
1840
  await this.page.getByLabel("Enable failure handler").check();
@@ -2153,7 +2150,6 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
2153
2150
  })
2154
2151
  }).locator(".icon-options");
2155
2152
  if (canDelete) {
2156
- await depOptionsIcon.isVisible();
2157
2153
  await depOptionsIcon.click();
2158
2154
  await (0, $kKeXs$playwrighttest.expect)(this.railLocator.getByRole("menuitem", {
2159
2155
  name: "Remove"
@@ -2181,7 +2177,6 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
2181
2177
  exact: true
2182
2178
  })
2183
2179
  }).locator(".icon-options");
2184
- await depOptionsIcon.isVisible();
2185
2180
  await depOptionsIcon.click();
2186
2181
  await this.railLocator.getByRole("menuitem", {
2187
2182
  name: "Remove"
@@ -2212,7 +2207,6 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
2212
2207
  const depOptionsIcon = this.page.locator(".dependency").filter({
2213
2208
  has: this.page.getByLabel(dependencies)
2214
2209
  }).first().locator(".actions");
2215
- await depOptionsIcon.isVisible();
2216
2210
  await depOptionsIcon.click();
2217
2211
  const frame = this.page.getByTestId("undefined-menu");
2218
2212
  if (await frame.isVisible()) await this.railLocator.getByRole("menuitem", {
@@ -2274,9 +2268,11 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
2274
2268
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).toContainText(errorMessage);
2275
2269
  }
2276
2270
  async isButtonVisible(buttonName, visible = true) {
2277
- (0, $kKeXs$playwrighttest.expect)(await this.page.getByRole("button", {
2271
+ const locator = this.page.getByRole("button", {
2278
2272
  name: buttonName
2279
- }).isVisible()).toBe(visible);
2273
+ });
2274
+ if (visible) await (0, $kKeXs$playwrighttest.expect)(locator).toBeVisible();
2275
+ else await (0, $kKeXs$playwrighttest.expect)(locator).not.toBeVisible();
2280
2276
  }
2281
2277
  async cancelDialogWindow() {
2282
2278
  await this.page.getByRole("button", {
@@ -2325,9 +2321,11 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
2325
2321
  await this.page.locator(`input[name='${fieldID}']`).fill(value);
2326
2322
  }
2327
2323
  async abortButtonVisibility(visible = true) {
2328
- (0, $kKeXs$playwrighttest.expect)(await this.page.getByRole("button", {
2324
+ const locator = this.page.getByRole("button", {
2329
2325
  name: "Abort"
2330
- }).isVisible()).toBe(visible);
2326
+ });
2327
+ if (visible) await (0, $kKeXs$playwrighttest.expect)(locator).toBeVisible();
2328
+ else await (0, $kKeXs$playwrighttest.expect)(locator).not.toBeVisible();
2331
2329
  }
2332
2330
  async setPattern(patternName) {
2333
2331
  await this.page.locator("#patternId").click();
@@ -2493,15 +2491,12 @@ class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$ex
2493
2491
  this.task = this.dependencyLocator.locator("#task-dependency");
2494
2492
  }
2495
2493
  async getRelease() {
2496
- await this.release.isVisible();
2497
2494
  return await this.release.getAttribute("value");
2498
2495
  }
2499
2496
  async getPhase() {
2500
- await this.phase.isVisible();
2501
2497
  return await this.phase.getAttribute("value");
2502
2498
  }
2503
2499
  async getTask() {
2504
- await this.task.isVisible();
2505
2500
  return await this.task.getAttribute("value");
2506
2501
  }
2507
2502
  async setRelease(releaseTitle) {
@@ -2684,14 +2679,14 @@ class $1fbdec5dc9cde599$export$e3515314c13bc477 extends (0, $f8721861c660dd88$ex
2684
2679
  this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
2685
2680
  }
2686
2681
  async expectStartDateToBeDisplayed() {
2687
- (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".flex-section.column").filter({
2682
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".flex-section.column").filter({
2688
2683
  hasText: "Start Date"
2689
- }).locator(".task-date-view-content").isVisible()).toBe(true);
2684
+ }).locator(".task-date-view-content")).toBeVisible();
2690
2685
  }
2691
2686
  async expectEndDateToBeDisplayed() {
2692
- (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".flex-section.column").filter({
2687
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".flex-section.column").filter({
2693
2688
  hasText: "End Date"
2694
- }).locator(".task-date-view-content").isVisible()).toBe(true);
2689
+ }).locator(".task-date-view-content")).toBeVisible();
2695
2690
  }
2696
2691
  async switchWaitForScheduledDate() {
2697
2692
  await this.page.locator(".wait-for-start input").click();
@@ -4606,7 +4601,7 @@ class $9b9a8c3da392d020$var$RestartPhaseModel extends (0, $f8721861c660dd88$expo
4606
4601
  await this.page.locator('.modal select[data-test="fromTask"]').selectOption(task);
4607
4602
  }
4608
4603
  async expectNoTaskSelectorVisible() {
4609
- (0, $kKeXs$playwrighttest.expect)(await this.page.locator('.modal select[data-test="fromTask"]').isVisible()).toHaveLength(0);
4604
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.modal select[data-test="fromTask"]')).not.toBeVisible();
4610
4605
  }
4611
4606
  async continue() {
4612
4607
  await this.page.locator(".modal .continue").click();
@@ -5121,7 +5116,6 @@ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$ex
5121
5116
  async backToAllFolders() {
5122
5117
  await this.page.locator(".icon-back.dot-i").click();
5123
5118
  await (0, $kKeXs$playwrighttest.expect)(this.page).toHaveTitle("Folders - Digital.ai Release");
5124
- await this.page.locator("button.btn-add-folder").isVisible();
5125
5119
  return this;
5126
5120
  }
5127
5121
  async createFolder(folderName) {
@@ -5399,7 +5393,6 @@ class $506d511737b3ea46$export$74ca1eaaa9a0054 extends (0, $f8721861c660dd88$exp
5399
5393
  await this.page.getByRole("button", {
5400
5394
  name: "Delete"
5401
5395
  }).click();
5402
- await this.page.locator("alert.notice.ng-scope").isVisible();
5403
5396
  }
5404
5397
  async editVariable(variableName, editedvariabletext) {
5405
5398
  await this.page.locator("[id='variables-filter']").fill(variableName);
@@ -7039,7 +7032,6 @@ class $ed2d4739e27d43c1$var$GridView extends (0, $f8721861c660dd88$export$2b65d1
7039
7032
  hasText: action
7040
7033
  }).click();
7041
7034
  if (action === "Complete") {
7042
- await this.page.locator("#modal textarea[mentio]").isVisible();
7043
7035
  await this.page.locator("#modal textarea[mentio]").fill("complete");
7044
7036
  await this.page.locator("#modal button.primary").filter({
7045
7037
  hasText: "Complete"
@@ -7773,10 +7765,14 @@ class $ea5452748687c9a2$export$539d82a5d70c4909 extends (0, $f8721861c660dd88$ex
7773
7765
  (0, $kKeXs$playwrighttest.expect)(await this.getValue(identifier)).toEqual(value.toString());
7774
7766
  }
7775
7767
  async shouldHaveEditButton(present = true) {
7776
- (0, $kKeXs$playwrighttest.expect)(await this.page.locator("#editRisk").isVisible()).toBe(present);
7768
+ const locator = this.page.locator("#editRisk");
7769
+ if (present) await (0, $kKeXs$playwrighttest.expect)(locator).toBeVisible();
7770
+ else await (0, $kKeXs$playwrighttest.expect)(locator).not.toBeVisible();
7777
7771
  }
7778
7772
  async shouldHaveSaveButton(present = true) {
7779
- (0, $kKeXs$playwrighttest.expect)(await this.page.getByTestId("save-btn").isVisible()).toBe(present);
7773
+ const locator = this.page.getByTestId("save-btn");
7774
+ if (present) await (0, $kKeXs$playwrighttest.expect)(locator).toBeVisible();
7775
+ else await (0, $kKeXs$playwrighttest.expect)(locator).not.toBeVisible();
7780
7776
  }
7781
7777
  async startEditGlobalRiskThreshold() {
7782
7778
  await this.page.locator("#editRisk").click();
@@ -7798,9 +7794,11 @@ class $ea5452748687c9a2$export$539d82a5d70c4909 extends (0, $f8721861c660dd88$ex
7798
7794
  await this.page.locator("#risk-profile-table").waitFor({
7799
7795
  state: "visible"
7800
7796
  });
7801
- (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".risk-profile .data-row").filter({
7797
+ const locator = this.page.locator(".risk-profile .data-row").filter({
7802
7798
  hasText: title
7803
- }).isVisible()).toBe(present);
7799
+ });
7800
+ if (present) await (0, $kKeXs$playwrighttest.expect)(locator).toBeVisible();
7801
+ else await (0, $kKeXs$playwrighttest.expect)(locator).not.toBeVisible();
7804
7802
  }
7805
7803
  async expectDefaultRiskProfileToBeFirst() {
7806
7804
  await this.page.locator("#risk-profile-table").waitFor({
@@ -7823,9 +7821,11 @@ class $ea5452748687c9a2$export$539d82a5d70c4909 extends (0, $f8721861c660dd88$ex
7823
7821
  }).waitFor({
7824
7822
  state: "visible"
7825
7823
  });
7826
- (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".risk-profile .data-row").filter({
7824
+ const locator = this.page.locator(".risk-profile .data-row").filter({
7827
7825
  hasText: title
7828
- }).locator(".copy-action").isVisible()).toBe(enabled);
7826
+ }).locator(".copy-action");
7827
+ if (enabled) await (0, $kKeXs$playwrighttest.expect)(locator).toBeVisible();
7828
+ else await (0, $kKeXs$playwrighttest.expect)(locator).not.toBeVisible();
7829
7829
  }
7830
7830
  async shouldHaveDeleteButtonEnabledForRiskProfile(title, enabled = true) {
7831
7831
  await this.page.locator(".risk-profile .data-row").filter({
@@ -7833,9 +7833,11 @@ class $ea5452748687c9a2$export$539d82a5d70c4909 extends (0, $f8721861c660dd88$ex
7833
7833
  }).waitFor({
7834
7834
  state: "visible"
7835
7835
  });
7836
- (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`.risk-profile .data-row`).filter({
7836
+ const locator = this.page.locator(`.risk-profile .data-row`).filter({
7837
7837
  hasText: title
7838
- }).locator(`.remove-action`).isVisible()).toBe(enabled);
7838
+ }).locator(`.remove-action`);
7839
+ if (enabled) await (0, $kKeXs$playwrighttest.expect)(locator).toBeVisible();
7840
+ else await (0, $kKeXs$playwrighttest.expect)(locator).not.toBeVisible();
7839
7841
  }
7840
7842
  async clickNewRiskProfile() {
7841
7843
  await this.page.getByTestId("new-risk-btn").waitFor({
@@ -7891,7 +7893,9 @@ class $ea5452748687c9a2$export$539d82a5d70c4909 extends (0, $f8721861c660dd88$ex
7891
7893
  (0, $kKeXs$playwrighttest.expect)(await this.page.locator("#risk-profile-table .data-row").count()).toEqual(numberOfVisibleRiskProfiles);
7892
7894
  }
7893
7895
  async shouldHaveNewRiskProfileButton(present = true) {
7894
- (0, $kKeXs$playwrighttest.expect)(await this.page.getByTestId("new-risk-btn").isVisible()).toBe(present);
7896
+ const locator = this.page.getByTestId("new-risk-btn");
7897
+ if (present) await (0, $kKeXs$playwrighttest.expect)(locator).toBeVisible();
7898
+ else await (0, $kKeXs$playwrighttest.expect)(locator).not.toBeVisible();
7895
7899
  }
7896
7900
  }
7897
7901
  class $ea5452748687c9a2$var$RisksProfilePage extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
@@ -7987,18 +7991,18 @@ class $3ec0e9cf832fdde8$export$9823ddf5e80770e7 extends (0, $f8721861c660dd88$ex
7987
7991
  state: "visible",
7988
7992
  timeout: 200000
7989
7993
  });
7990
- (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`.configuration-instance`).filter({
7994
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.configuration-instance`).filter({
7991
7995
  hasText: instanceName
7992
- }).isVisible()).toBe(true);
7996
+ })).toBeVisible();
7993
7997
  return this;
7994
7998
  }
7995
7999
  async expectInstanceNotDisplayed(instanceName) {
7996
8000
  await this.page.locator("#configuration").waitFor({
7997
8001
  state: "visible"
7998
8002
  });
7999
- (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`.configuration-instance`).filter({
8003
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.configuration-instance`).filter({
8000
8004
  hasText: instanceName
8001
- }).isVisible()).toBe(false);
8005
+ })).not.toBeVisible();
8002
8006
  return this;
8003
8007
  }
8004
8008
  async openInstance(instanceName) {
@@ -8219,7 +8223,6 @@ class $267ea1f27d28a032$export$8da2fa93430be6ca extends (0, $f8721861c660dd88$ex
8219
8223
  exact: true
8220
8224
  })
8221
8225
  }).getByRole("checkbox").click();
8222
- await this.page.getByTestId("save-btn").isVisible();
8223
8226
  await this.page.getByTestId("save-btn").click();
8224
8227
  await this.page.locator(".saved-text").waitFor();
8225
8228
  } else if (!isChecked && enable) {
@@ -8233,7 +8236,6 @@ class $267ea1f27d28a032$export$8da2fa93430be6ca extends (0, $f8721861c660dd88$ex
8233
8236
  exact: true
8234
8237
  })
8235
8238
  }).getByRole("checkbox").click();
8236
- await this.page.getByTestId("save-btn").isVisible();
8237
8239
  await this.page.getByTestId("save-btn").click();
8238
8240
  await this.page.locator(".saved-text").waitFor();
8239
8241
  }