@digital-ai/devops-page-object-release 0.0.36 → 0.0.38

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,21 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
+ ## 0.0.38
4
+
5
+ ### Patch Changes
6
+
7
+ - 1524cbe: S-118507: Update help link
8
+
9
+ ## 0.0.37
10
+
11
+ ### Patch Changes
12
+
13
+ - 6057d50: S-118705: Migrated userInput task script in playwright
14
+ - f346900: S-118950: Migrated gate-scenario script in playwright
15
+ - c4ce129: S-118971: Migrated parallel-group-details-scenario script into playwright
16
+ - 88f6587: S-118967: Migrated task-failure-handler-scenario in playwright
17
+ - eb23469: S-118740: Allow to set the export option
18
+
3
19
  ## 0.0.36
4
20
 
5
21
  ### Patch Changes
package/dist/main.js CHANGED
@@ -1814,6 +1814,51 @@ class $9c0b0c2caed50730$export$d4865631ba74f3e2 extends (0, $f8721861c660dd88$ex
1814
1814
  async expectPreconditionNotEditable() {
1815
1815
  await this.textEditor.isHidden();
1816
1816
  }
1817
+ async enableFailureHandler() {
1818
+ await this.page.getByLabel("Enable failure handler").check();
1819
+ }
1820
+ async expectEnabledFailureHandlerToggle() {
1821
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("Enable failure handler")).toBeEnabled();
1822
+ }
1823
+ async expectDisabledFailureHandlerToggle() {
1824
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("Enable failure handler")).toBeDisabled();
1825
+ }
1826
+ async clickFailureHandler() {
1827
+ await this.page.getByRole("button", {
1828
+ name: "failure"
1829
+ }).click();
1830
+ return this;
1831
+ }
1832
+ async clickPrecondition() {
1833
+ await this.page.getByRole("button", {
1834
+ name: "precondition"
1835
+ }).click();
1836
+ return this;
1837
+ }
1838
+ async expectFailureHandlerHasDefaults() {
1839
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-conditions .dot-label-wrapper")).toContainText("If the task fails");
1840
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#select-action")).toContainText("Skip task");
1841
+ return this;
1842
+ }
1843
+ async selectPostAction(action) {
1844
+ await this.page.getByRole("textbox", {
1845
+ name: "If the task fails"
1846
+ }).getByLabel("If the task fails").selectOption(action);
1847
+ return this;
1848
+ }
1849
+ async enterFailureHandlerScript(script) {
1850
+ await this.page.locator(".ace_content").click();
1851
+ await this.page.locator("textarea").fill(script);
1852
+ await this.saveButton.click();
1853
+ return this;
1854
+ }
1855
+ async expectScriptToContain(script) {
1856
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".code-editor .ace_content")).toContainText(script);
1857
+ }
1858
+ async expectFailureHandlerEditable() {
1859
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#select-action")).toBeVisible();
1860
+ return this;
1861
+ }
1817
1862
  }
1818
1863
 
1819
1864
 
@@ -1882,6 +1927,7 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1882
1927
  constructor(page){
1883
1928
  super(page);
1884
1929
  this.dependency = new $eb81c1b930e440ff$export$fbbf45eff21470e3(page);
1930
+ this.modal = new $eb81c1b930e440ff$export$bb6ccfada3e7d0f7(page);
1885
1931
  this.railLocator = this.page.locator("task-drawer .dot-drawer .task-drawer-content");
1886
1932
  this.scriptTextArea = this.page.locator(".code-editor textarea.ace_text-input");
1887
1933
  }
@@ -1905,6 +1951,11 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1905
1951
  hasText: value
1906
1952
  }).click();
1907
1953
  }
1954
+ async clickCreateNewCiInVariable(propertyName) {
1955
+ await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
1956
+ await this.railLocator.locator(`input[id="${propertyName}"]`).click();
1957
+ await this.railLocator.getByTestId("dot-action-item-btn").click();
1958
+ }
1908
1959
  async getValueFromString(propertyName) {
1909
1960
  await this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`).focus();
1910
1961
  return this.railLocator.locator(`input[id="${propertyName}"]`).inputValue();
@@ -1936,6 +1987,12 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1936
1987
  name: variable
1937
1988
  }).click();
1938
1989
  }
1990
+ async setValueForDateVariable(variable, date) {
1991
+ await this.page.getByRole("textbox", {
1992
+ name: variable
1993
+ }).fill(date);
1994
+ return this;
1995
+ }
1939
1996
  async createNewVariableForField(objectID, variable) {
1940
1997
  await this.page.locator(`div[data-testid="${objectID}"] .icon-variable`).waitFor({
1941
1998
  timeout: 10000
@@ -2078,13 +2135,22 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
2078
2135
  if (option) await (0, $kKeXs$playwrighttest.expect)(depOptionsIcon).toBeVisible();
2079
2136
  else await (0, $kKeXs$playwrighttest.expect)(depOptionsIcon).not.toBeVisible();
2080
2137
  }
2081
- async removeDependency(title) {
2138
+ async expectDependencyContextualMenuFor(title, option = true) {
2082
2139
  const depOptionsIcon = this.page.locator(".dependency").filter({
2083
2140
  has: this.page.getByRole("link", {
2084
2141
  name: title,
2085
2142
  exact: true
2086
2143
  })
2087
2144
  }).locator(".icon-options");
2145
+ if (option) await (0, $kKeXs$playwrighttest.expect)(depOptionsIcon).toBeVisible();
2146
+ else await (0, $kKeXs$playwrighttest.expect)(depOptionsIcon).not.toBeVisible();
2147
+ }
2148
+ async removeDependency(title) {
2149
+ const depOptionsIcon = this.page.locator(".dependency").filter({
2150
+ has: this.page.getByLabel(title, {
2151
+ exact: true
2152
+ })
2153
+ }).locator(".icon-options");
2088
2154
  await depOptionsIcon.isVisible();
2089
2155
  await depOptionsIcon.click();
2090
2156
  await this.railLocator.getByRole("menuitem", {
@@ -2106,9 +2172,11 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
2106
2172
  await (0, $kKeXs$playwrighttest.expect)(this.railLocator.getByTestId("add-condition")).toBeVisible();
2107
2173
  await this.railLocator.getByTestId("add-condition").click();
2108
2174
  }
2109
- async expectDependencyText(dependencies) {
2110
- await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
2111
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.gate-task-dependencies`).getByLabel(dependencies).first()).toBeVisible();
2175
+ async expectDependencyText(dependencies, isVisible = true) {
2176
+ if (isVisible) {
2177
+ await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
2178
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.gate-task-dependencies`).getByLabel(dependencies).first()).toBeVisible();
2179
+ } else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.gate-task-dependencies`).getByLabel(dependencies)).not.toBeVisible();
2112
2180
  }
2113
2181
  async clickEditDependency(dependencies) {
2114
2182
  const depOptionsIcon = this.page.locator(".dependency").filter({
@@ -2264,10 +2332,31 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
2264
2332
  name: "Save"
2265
2333
  }).click();
2266
2334
  }
2267
- async expectedGateConditionDisplayed(title) {
2268
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".gate-task-condition-input").filter({
2335
+ async expectedGateConditionDisplayed(title, isVisible = true) {
2336
+ if (isVisible) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".gate-task-condition-input").filter({
2269
2337
  hasText: title
2270
2338
  })).toBeVisible();
2339
+ else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".gate-task-condition-input").filter({
2340
+ hasText: title
2341
+ })).not.toBeVisible();
2342
+ }
2343
+ async expectedGateConditionChecked(title, expected = true) {
2344
+ if (expected) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".gate-task-condition").filter({
2345
+ hasText: title
2346
+ }).getByTestId("CheckBoxIcon")).toBeVisible();
2347
+ else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".gate-task-condition").filter({
2348
+ hasText: title
2349
+ }).getByTestId("CheckBoxOutlineBlankIcon")).toBeVisible();
2350
+ }
2351
+ async removeCondition(title) {
2352
+ await this.page.locator(".gate-task-condition").filter({
2353
+ hasText: title
2354
+ }).locator(".icon-delete").click();
2355
+ }
2356
+ async checkGateCondition(title) {
2357
+ await this.page.locator(".gate-task-condition").filter({
2358
+ hasText: title
2359
+ }).getByTestId("CheckBoxOutlineBlankIcon").click();
2271
2360
  }
2272
2361
  async expectScriptEditable() {
2273
2362
  await this.page.locator("div.ace_content").click();
@@ -2309,6 +2398,61 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
2309
2398
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`#${ObjectID}`)).toHaveValue("");
2310
2399
  return this;
2311
2400
  }
2401
+ async expectEditVariableList(isVisible = true) {
2402
+ if (isVisible) await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("edit-btn")).toBeVisible();
2403
+ else await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("edit-btn")).toBeDisabled();
2404
+ return this;
2405
+ }
2406
+ async clickEditVariableList() {
2407
+ await this.page.getByTestId("edit-btn").click();
2408
+ return this;
2409
+ }
2410
+ async removeVariable(variableName) {
2411
+ await this.page.locator(".draggable-list").filter({
2412
+ hasText: variableName
2413
+ }).locator(".icon-close").click();
2414
+ return this;
2415
+ }
2416
+ async saveVariable() {
2417
+ await this.page.getByTestId("save-btn").click();
2418
+ return this;
2419
+ }
2420
+ async selectVariable(variable) {
2421
+ if (variable instanceof Array) for (const value of variable){
2422
+ await this.railLocator.getByRole("combobox", {
2423
+ name: "Variables in this task"
2424
+ }).click();
2425
+ await this.railLocator.getByText(value).click();
2426
+ }
2427
+ else {
2428
+ await this.railLocator.getByRole("combobox", {
2429
+ name: "Variables in this task"
2430
+ }).click();
2431
+ await this.railLocator.getByText(variable).click();
2432
+ }
2433
+ return this;
2434
+ }
2435
+ async setValueForUserInputField(propertyName, value) {
2436
+ await this.page.locator(`.input-scalar-fake-input[id="${propertyName}"]`).focus();
2437
+ await this.page.locator(`input[id="${propertyName}"]`).fill(value);
2438
+ }
2439
+ }
2440
+ class $eb81c1b930e440ff$export$bb6ccfada3e7d0f7 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2441
+ constructor(page){
2442
+ super(page);
2443
+ this.modalLocator = this.page.locator(".dot-dialog-content");
2444
+ this.saveLocator = this.page.getByRole("button", {
2445
+ name: "Save"
2446
+ });
2447
+ }
2448
+ async setInputTextField(propertyName, value) {
2449
+ await this.modalLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`).focus();
2450
+ await this.modalLocator.locator(`input[id="${propertyName}"]`).fill(value);
2451
+ await this.modalLocator.press("Tab");
2452
+ }
2453
+ async save() {
2454
+ await this.saveLocator.click();
2455
+ }
2312
2456
  }
2313
2457
  class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2314
2458
  constructor(page){
@@ -2362,7 +2506,7 @@ class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$ex
2362
2506
  }
2363
2507
  async setTask(taskTitle) {
2364
2508
  await this.task.click();
2365
- await this.task.fill("");
2509
+ await this.task.fill(" ");
2366
2510
  await this.page.getByRole("option", {
2367
2511
  name: taskTitle
2368
2512
  }).click();
@@ -2684,6 +2828,17 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
2684
2828
  async expectCompleteButtonNotEnabled() {
2685
2829
  await (0, $kKeXs$playwrighttest.expect)(this.completeButton).not.toBeEnabled();
2686
2830
  }
2831
+ async expectButtonNotVisible(buttonName) {
2832
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("button", {
2833
+ name: buttonName,
2834
+ exact: true
2835
+ })).not.toBeVisible();
2836
+ return this;
2837
+ }
2838
+ async expectSkipMenuNotEnabled() {
2839
+ await this.openMenu.click();
2840
+ await (0, $kKeXs$playwrighttest.expect)(this.skipMenu).not.toBeEnabled();
2841
+ }
2687
2842
  async setTitle(title) {
2688
2843
  await this.page.getByTestId("task-title-input-view-mode-typography").click();
2689
2844
  await this.page.getByTestId("task-title-input-input").clear();
@@ -2749,6 +2904,9 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
2749
2904
  await this.page.locator(".user-task-assigned-wrapper .editable").getByText(existingUsername).click();
2750
2905
  await this.page.getByTestId(`render-option-${userName}`).click();
2751
2906
  }
2907
+ async expectAssigneeToBeEnabled() {
2908
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".user-task-assigned-wrapper .clickable-avatar")).toBeVisible();
2909
+ }
2752
2910
  async removeAssignToUser(userName) {
2753
2911
  await this.page.getByRole("button", {
2754
2912
  name: userName
@@ -3909,13 +4067,13 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
3909
4067
  hasText: newPhaseName
3910
4068
  })).toBeVisible();
3911
4069
  }
3912
- async exportRelease() {
4070
+ async exportRelease(exportAs = "Audit report (Excel)") {
3913
4071
  // eslint-disable-next-line @typescript-eslint/no-empty-function
3914
4072
  this.page.on("download", ()=>{});
3915
4073
  await this.page.getByTestId("template-export-btn").click();
3916
4074
  const downloadPromise = this.page.waitForEvent("download");
3917
4075
  await this.page.getByRole("link", {
3918
- name: "Audit report (Excel)"
4076
+ name: exportAs
3919
4077
  }).click();
3920
4078
  await downloadPromise;
3921
4079
  }
@@ -4094,6 +4252,15 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
4094
4252
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-type-gatetask .marker-check-icon")).toBeVisible();
4095
4253
  return this;
4096
4254
  }
4255
+ async expectFailureHandlerCheckMar(taskTitle, isVisible = true) {
4256
+ if (isVisible) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task").filter({
4257
+ hasText: taskTitle
4258
+ }).locator(".failure-handler-icon")).toBeVisible();
4259
+ else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task").filter({
4260
+ hasText: taskTitle
4261
+ }).locator(".failure-handler-icon")).not.toBeVisible();
4262
+ return this;
4263
+ }
4097
4264
  async expectNoOptionInChangeType(taskTitle, taskGroup) {
4098
4265
  await this.openContextMenuForTask(taskTitle);
4099
4266
  await this.page.locator(".dropdown-menu li").getByText("Change type").click();
@@ -5280,7 +5447,7 @@ class $00fc48341ebf7de4$export$2fb4351c41ce6e7a extends (0, $f8721861c660dd88$ex
5280
5447
  await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("Online documentation")).toBeVisible();
5281
5448
  await this.page.getByText("Online documentation").click();
5282
5449
  const page2 = await page2Promise;
5283
- (0, $kKeXs$playwrighttest.expect)(page2.url()).toContain("https://docs.digital.ai/bundle/devops-release-version-v." + versionNumber.substring(8, 12) + "/page/release/how-to/get-started-with-xl-release.html");
5450
+ (0, $kKeXs$playwrighttest.expect)(page2.url()).toContain("https://docs.digital.ai/release/docs/" + versionNumber.substring(8, 12) + "/how-to/get-started-with-xl-release");
5284
5451
  await this.page.bringToFront();
5285
5452
  }
5286
5453
  async verifySupportRequest() {