@digital-ai/devops-page-object-release 0.0.32 → 0.0.33

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,14 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
+ ## 0.0.33
4
+
5
+ ### Patch Changes
6
+
7
+ - 7d07a5e: S-118301: Migrated change-task-type-scenario into playwright
8
+ - c75aeb5: S-118350: Dont use dot-button as testid
9
+ - 9c80d98: S-118339: Migrated custom-script-task-scenario in playwright
10
+ - f5b8672: S-117710: Migrated task-grid-scenario into playwright
11
+
3
12
  ## 0.0.32
4
13
 
5
14
  ### Patch Changes
package/dist/main.js CHANGED
@@ -1325,7 +1325,9 @@ class $59543fc69900e8db$export$f8e64fcf447db2bf extends (0, $f8721861c660dd88$ex
1325
1325
  return new $59543fc69900e8db$var$VariableModal(this.page);
1326
1326
  }
1327
1327
  async addNewVariable(variableName, labelname, description) {
1328
- await this.page.locator("#action-toolbar").getByTestId("dot-button").click();
1328
+ await this.page.locator("button", {
1329
+ hasText: "New variable"
1330
+ }).click();
1329
1331
  await this.page.fill(`[name="fieldKey"]`, variableName);
1330
1332
  await this.page.locator(".variable-label input").fill(labelname);
1331
1333
  if (description) await this.page.locator(".variable-description input").fill(description);
@@ -1545,7 +1547,13 @@ class $59543fc69900e8db$var$VariableModal extends (0, $f8721861c660dd88$export$2
1545
1547
  async createPossibleValuesVariable(variableName) {
1546
1548
  await this.page.locator(".variable-toggle button").click();
1547
1549
  await this.page.locator(".ui-autocomplete-input").fill(variableName);
1548
- await this.page.locator(".ui-menu-item-wrapper").filter({
1550
+ const check = await this.page.locator(".ui-menu-item-wrapper").getByText("${" + variableName + "}", {
1551
+ exact: true
1552
+ }).isVisible();
1553
+ if (check) await this.page.locator(".ui-menu-item-wrapper").getByText("${" + variableName + "}", {
1554
+ exact: true
1555
+ }).click();
1556
+ else await this.page.locator(".ui-menu-item-wrapper").filter({
1549
1557
  hasText: `${variableName}`
1550
1558
  }).click();
1551
1559
  }
@@ -1872,6 +1880,15 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1872
1880
  await this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`).focus();
1873
1881
  return this.railLocator.locator(`input[id="${propertyName}"]`).inputValue();
1874
1882
  }
1883
+ async getStringListField(propertyName) {
1884
+ return new $eb81c1b930e440ff$export$2d646ce41126d906(propertyName, this.page);
1885
+ }
1886
+ async getStringSetField(propertyName) {
1887
+ return new $eb81c1b930e440ff$export$1a41fd2ab8394c46(propertyName, this.page);
1888
+ }
1889
+ async getStringMapField(propertyName) {
1890
+ return new $eb81c1b930e440ff$export$62811a109bb4377d(propertyName, this.page);
1891
+ }
1875
1892
  async setValueFromString(propertyName, value) {
1876
1893
  await this.railLocator.locator(`input[name=${propertyName}]`).focus();
1877
1894
  await this.railLocator.locator(`input[id="${propertyName}"]`).fill(value);
@@ -1907,8 +1924,11 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1907
1924
  await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`#${variableId}`)).toHaveValue(value);
1908
1925
  } else await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`#${variableId}`)).not.toBeVisible();
1909
1926
  }
1910
- async selectReleaseIdInOutputProperties(propertyName, variableName) {
1911
- await this.railLocator.locator(`#${propertyName}`).fill(variableName);
1927
+ async expectValueInInputProperties(propertyName, value, expected = true) {
1928
+ if (expected) await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`[name='${propertyName}']`)).toHaveValue(value);
1929
+ }
1930
+ async selectReleaseIdInOutputProperties(objectID, variableName) {
1931
+ await this.railLocator.locator(`#${objectID}`).fill(variableName);
1912
1932
  await this.page.getByRole("option", {
1913
1933
  name: variableName
1914
1934
  }).click();
@@ -1923,6 +1943,10 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1923
1943
  async expectValueFromString(propertyName, propertyValue) {
1924
1944
  return await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`)).toHaveText(propertyValue);
1925
1945
  }
1946
+ async expectValueFromResultString(propertyName, value) {
1947
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`[data-test-id="${propertyName}"]`).getByText(value)).toBeVisible();
1948
+ return this;
1949
+ }
1926
1950
  async expectRiskProfileValue(value) {
1927
1951
  await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator("#riskProfileId")).toHaveValue(value);
1928
1952
  }
@@ -1953,12 +1977,6 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1953
1977
  await this.page.locator("#release-tags").press("Enter");
1954
1978
  }
1955
1979
  }
1956
- async setValueFromMap(propertyName, key, value) {
1957
- await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.add-new-button`).click();
1958
- await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] input[id="new-row-key-input"]`).fill(key);
1959
- await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] input[id="new-row-value-input"]`).fill(value);
1960
- await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.map-row-save-button`).click();
1961
- }
1962
1980
  async setScript(script) {
1963
1981
  await this.scriptTextArea.clear();
1964
1982
  await this.scriptTextArea.fill(script);
@@ -1988,7 +2006,9 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1988
2006
  await this.page.getByTestId("single-action-button").click();
1989
2007
  await this.page.getByTestId("task-action-comment").click();
1990
2008
  await this.page.getByTestId("task-action-comment").fill(comment);
1991
- await this.page.getByTestId("dot-button").click();
2009
+ await this.page.locator("button", {
2010
+ hasText: "Abort"
2011
+ }).click();
1992
2012
  }
1993
2013
  async expectDependenciesDisplayed(dependencies) {
1994
2014
  await this.railLocator.locator(".gate-task-dependencies").waitFor();
@@ -2249,6 +2269,14 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
2249
2269
  async close() {
2250
2270
  await this.page.locator("task-drawer .dot-drawer .task-drawer-header").getByTestId("close-btn").click();
2251
2271
  }
2272
+ async deselectValue(ObjectID) {
2273
+ await this.page.locator(`#${ObjectID}`).hover();
2274
+ await this.page.getByRole("button", {
2275
+ name: "Clear"
2276
+ }).click();
2277
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`#${ObjectID}`)).toHaveValue("");
2278
+ return this;
2279
+ }
2252
2280
  }
2253
2281
  class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2254
2282
  constructor(page){
@@ -2339,6 +2367,103 @@ class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$ex
2339
2367
  }).click();
2340
2368
  }
2341
2369
  }
2370
+ class $eb81c1b930e440ff$export$2d646ce41126d906 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2371
+ constructor(propertyName, page){
2372
+ super(page);
2373
+ this.propertyName = propertyName;
2374
+ }
2375
+ async setValueFromStringList(value) {
2376
+ await this.page.locator(`input[id="${this.propertyName}"]`).focus();
2377
+ await this.page.locator(`input[id="${this.propertyName}"]`).fill(value);
2378
+ await this.page.locator(`[data-test-id="${this.propertyName}"] .icon-add`).click();
2379
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`[data-test-id="${this.propertyName}"] .list`).getByText(value)).toBeVisible();
2380
+ return this;
2381
+ }
2382
+ async expectStringListCount(count) {
2383
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`[data-test-id="${this.propertyName}"] .list`).count()).toBe(count);
2384
+ return this;
2385
+ }
2386
+ async removeValueFromStringList(value) {
2387
+ await this.page.locator(`[data-test-id="${this.propertyName}"] .list`).filter({
2388
+ hasText: value
2389
+ }).locator(".icon-close").click();
2390
+ return this;
2391
+ }
2392
+ async expectInputFieldDisabled() {
2393
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`[data-test-id="${this.propertyName}"] input`)).not.toBeEditable();
2394
+ return this;
2395
+ }
2396
+ async expectValueFromStringList(value) {
2397
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`[data-test-id="${this.propertyName}"] .list`).getByText(value)).toBeVisible();
2398
+ return this;
2399
+ }
2400
+ }
2401
+ class $eb81c1b930e440ff$export$1a41fd2ab8394c46 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2402
+ constructor(propertyName, page){
2403
+ super(page);
2404
+ this.propertyName = propertyName;
2405
+ }
2406
+ async setValueFromStringSet(value) {
2407
+ await this.page.locator(`input[id="${this.propertyName}"]`).focus();
2408
+ await this.page.locator(`input[id="${this.propertyName}"]`).fill(value);
2409
+ await this.page.locator(`[data-test-id="${this.propertyName}"] .icon-add`).click();
2410
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`[data-test-id="${this.propertyName}"] .list`).getByText(value)).toBeVisible();
2411
+ return this;
2412
+ }
2413
+ async expectInputFieldDisabled() {
2414
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`[data-test-id="${this.propertyName}"] input`)).not.toBeEditable();
2415
+ return this;
2416
+ }
2417
+ async expectAddButtonDisabled() {
2418
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`[data-test-id="${this.propertyName}"] .icon-add`)).toBeDisabled();
2419
+ return this;
2420
+ }
2421
+ async expectStringSetCount(count) {
2422
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(`[data-test-id="${this.propertyName}"] .list`).count()).toBe(count);
2423
+ return this;
2424
+ }
2425
+ async removeValueFromStringSet(key) {
2426
+ await this.page.locator(`[data-test-id="${this.propertyName}"] .list`).filter({
2427
+ hasText: key
2428
+ }).locator(".icon-close").click();
2429
+ return this;
2430
+ }
2431
+ }
2432
+ class $eb81c1b930e440ff$export$62811a109bb4377d extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2433
+ constructor(propertyName, page){
2434
+ super(page);
2435
+ this.propertyName = propertyName;
2436
+ }
2437
+ async setValueFromMap(key, value) {
2438
+ await this.page.locator(`.input-with-map[data-test-id="${this.propertyName}"] button.add-new-button`).click();
2439
+ await this.page.locator(`.input-with-map[data-test-id="${this.propertyName}"] input[id="new-row-key-input"]`).fill(key);
2440
+ await this.page.locator(`.input-with-map[data-test-id="${this.propertyName}"] input[id="new-row-value-input"]`).fill(value);
2441
+ await this.page.locator(`.input-with-map[data-test-id="${this.propertyName}"] button.map-row-save-button`).click();
2442
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.map-data-row .map-key`).getByText(key)).toBeVisible();
2443
+ }
2444
+ async removeValueFromMap(key) {
2445
+ await this.page.locator(`.map-data-row`).filter({
2446
+ has: this.page.locator(`.map-key`).getByText(key)
2447
+ }).locator(`.icon-delete`).click();
2448
+ return this;
2449
+ }
2450
+ async expectStringMapCount(count) {
2451
+ (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".map-data-row").count()).toBe(count);
2452
+ return this;
2453
+ }
2454
+ async expectAddButtonDisabledForMap(key, value) {
2455
+ await this.page.locator(`.input-with-map[data-test-id="${this.propertyName}"] button.add-new-button`).click();
2456
+ await this.page.locator(`.input-with-map[data-test-id="${this.propertyName}"] input[id="new-row-key-input"]`).fill(key);
2457
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.input-with-map[data-test-id="${this.propertyName}"] button.add-new-button`)).toBeDisabled();
2458
+ await this.page.locator(`.input-with-map[data-test-id="${this.propertyName}"] input[id="new-row-value-input"]`).fill(value);
2459
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.input-with-map[data-test-id="${this.propertyName}"] button.add-new-button`)).toBeDisabled();
2460
+ return this;
2461
+ }
2462
+ async expectInputFieldDisabledForMap() {
2463
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.input-with-map[data-test-id="${this.propertyName}"] input[id="new-row-value-input"]`)).not.toBeVisible();
2464
+ return this;
2465
+ }
2466
+ }
2342
2467
 
2343
2468
 
2344
2469
 
@@ -2512,12 +2637,17 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
2512
2637
  async startNow(comment) {
2513
2638
  await this.startButton.click();
2514
2639
  await this.commentBox.fill(comment);
2515
- await this.page.getByTestId("dot-button").click();
2640
+ await this.page.locator("button", {
2641
+ hasText: "Start now"
2642
+ }).click();
2516
2643
  await (0, $kKeXs$playwrighttest.expect)(this.startButton).not.toBeVisible();
2517
2644
  }
2518
2645
  async expectTaskTitle(taskTitle) {
2519
2646
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-drawer .task-title-input .dot-view-mode-typography")).toContainText(taskTitle);
2520
2647
  }
2648
+ async expectCompleteButtonEnabled() {
2649
+ await (0, $kKeXs$playwrighttest.expect)(this.completeButton).toBeEnabled();
2650
+ }
2521
2651
  async setTitle(title) {
2522
2652
  await this.page.getByTestId("task-title-input-view-mode-typography").click();
2523
2653
  await this.page.getByTestId("task-title-input-input").clear();
@@ -3541,7 +3671,9 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
3541
3671
  }).click();
3542
3672
  await this.page.getByTestId("task-action-comment").click();
3543
3673
  await this.page.getByTestId("task-action-comment").fill(comment);
3544
- await this.page.getByTestId("dot-button").click();
3674
+ await this.page.locator("button", {
3675
+ hasText: "Reopen"
3676
+ }).click();
3545
3677
  }
3546
3678
  async openTaskDrawer(taskName) {
3547
3679
  await this.page.locator(".task-header").getByText(taskName, {
@@ -3765,7 +3897,6 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
3765
3897
  hasText: phaseName
3766
3898
  });
3767
3899
  this.commentBox = this.page.locator(`.input-block-level`);
3768
- this.confirm = this.page.getByTestId("dot-button");
3769
3900
  this.contextMenuButton = this.page.locator("#context-menu-container li");
3770
3901
  this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
3771
3902
  }
@@ -3862,6 +3993,44 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
3862
3993
  exact: true
3863
3994
  }).click();
3864
3995
  }
3996
+ async changeTypeFromContextMenu(taskTitle, taskGroup, taskType) {
3997
+ await this.openContextMenuForTask(taskTitle);
3998
+ await this.page.locator(".dropdown-menu li").getByText("Change type").click();
3999
+ await this.page.locator("#task-selector").fill(taskGroup);
4000
+ await this.page.getByTestId(taskType).click();
4001
+ await this.page.getByRole("button", {
4002
+ name: "Change type"
4003
+ }).click();
4004
+ return this;
4005
+ }
4006
+ async expectChangeTypeContextMenuDisabled(taskTitle, taskGroup, taskType) {
4007
+ await this.openContextMenuForTask(taskTitle);
4008
+ await this.page.locator(".dropdown-menu li").getByText("Change type").click();
4009
+ await this.page.locator("#task-selector").fill(taskGroup);
4010
+ await this.page.getByTestId(taskType).click();
4011
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("button", {
4012
+ name: "Change type"
4013
+ })).toBeDisabled();
4014
+ await this.page.getByRole("button", {
4015
+ name: "Cancel"
4016
+ }).click();
4017
+ return this;
4018
+ }
4019
+ async expectGateCheckMark() {
4020
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-type-gatetask .marker-check-icon")).toBeVisible();
4021
+ return this;
4022
+ }
4023
+ async expectNoOptionInChangeType(taskTitle, taskGroup) {
4024
+ await this.openContextMenuForTask(taskTitle);
4025
+ await this.page.locator(".dropdown-menu li").getByText("Change type").click();
4026
+ await this.page.locator("#task-selector").fill(taskGroup);
4027
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("No options")).toBeVisible();
4028
+ await this.page.getByTestId("ArrowDropDownIcon").click();
4029
+ await this.page.getByRole("button", {
4030
+ name: "Cancel"
4031
+ }).click();
4032
+ return this;
4033
+ }
3865
4034
  async assignToMeFromContextMenu(taskTitle) {
3866
4035
  await this.openContextMenuForTask(taskTitle);
3867
4036
  await this.page.locator(".dropdown-menu li").getByText("Assign to me").click();
@@ -4003,6 +4172,18 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
4003
4172
  await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task-generator .add-task")).toHaveCount(0);
4004
4173
  await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".display")).toHaveCount(0);
4005
4174
  }
4175
+ async expectTaskFailureManualPermission() {
4176
+ await this.phaseLocator.getByText("Add task").click();
4177
+ const checkboxElement = await this.page.getByTestId("save-select-task-btn").isEnabled();
4178
+ if (!checkboxElement) {
4179
+ await this.page.getByTestId("cancel-select-task-btn").click();
4180
+ await this.phaseLocator.getByText("Add task").click();
4181
+ }
4182
+ await this.page.getByTestId("save-select-task-btn").click();
4183
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("p").filter({
4184
+ hasText: "Your request has been rejected, your permissions may have been revoked."
4185
+ })).toBeVisible();
4186
+ }
4006
4187
  }
4007
4188
  class $9b9a8c3da392d020$var$RestartPhaseModel extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
4008
4189
  constructor(page){
@@ -4145,7 +4326,7 @@ class $0767ec703ce1f9a5$export$572f40d328c1d028 extends (0, $f8721861c660dd88$ex
4145
4326
  super(page);
4146
4327
  this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
4147
4328
  this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
4148
- this.newReleaseGroupButton = page.getByTestId("dot-button");
4329
+ this.newReleaseGroupButton = page.getByText("New release group");
4149
4330
  this.dateMonth = new Date();
4150
4331
  }
4151
4332
  async createGroup(groupName, startDate, endDate) {
@@ -4294,7 +4475,7 @@ class $ceb2e9e08e1837c2$export$9b9454a7f137e99b extends (0, $f8721861c660dd88$ex
4294
4475
  this.addDescription = page.getByPlaceholder("Set description...");
4295
4476
  }
4296
4477
  async clickNewDeliveryPattern() {
4297
- await this.page.getByTestId("dot-button").click();
4478
+ await this.page.getByText("New delivery pattern").click();
4298
4479
  await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
4299
4480
  name: "Create delivery pattern"
4300
4481
  })).toBeVisible();
@@ -4392,7 +4573,9 @@ class $ceb2e9e08e1837c2$export$9b9454a7f137e99b extends (0, $f8721861c660dd88$ex
4392
4573
  })).not.toBeVisible();
4393
4574
  }
4394
4575
  async createNewDelivery(deliveryName, deliveryDes, setAutoComplete) {
4395
- await this.page.getByTestId("dot-button").click();
4576
+ await this.page.getByRole("button", {
4577
+ name: "New delivery"
4578
+ }).click();
4396
4579
  await this.addName.fill(deliveryName);
4397
4580
  await this.addDescription.click();
4398
4581
  if (deliveryDes) await this.addDescription.fill(deliveryDes);
@@ -5100,7 +5283,9 @@ class $b4d98f757ef92467$export$7b434e00c788d0bf extends (0, $f8721861c660dd88$ex
5100
5283
  await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("info").locator("div")).toContainText("New plugin installedPlugin release-" + pluginName.toLowerCase() + "-integration has been installed, click here to reload the changes or refresh your browser");
5101
5284
  }
5102
5285
  async clickUpload() {
5103
- await this.page.getByTestId("dot-button").click();
5286
+ await this.page.locator("button", {
5287
+ hasText: "Upload"
5288
+ }).click();
5104
5289
  }
5105
5290
  }
5106
5291
 
@@ -5141,7 +5326,7 @@ class $010122e1d9b28b80$export$3cf9c90f870f31bd extends (0, $f8721861c660dd88$ex
5141
5326
  async editUserProfile(email) {
5142
5327
  await this.page.getByLabel("Email address").click();
5143
5328
  await this.page.getByLabel("Email address").fill(email);
5144
- await this.page.getByTestId("dot-button").click();
5329
+ await this.page.getByText("Save").click();
5145
5330
  (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".saved-text").textContent()).toContain("Last saved on ");
5146
5331
  }
5147
5332
  async generateNewAccessToken(tokenName, expiryOptions) {
@@ -5659,6 +5844,11 @@ class $a8855257f8bb2b12$export$43682cddead1dd78 extends (0, $f8721861c660dd88$ex
5659
5844
  await this.page.locator(".release-modal-container").waitFor({
5660
5845
  state: "visible"
5661
5846
  });
5847
+ const modalWindow = await this.page.locator(".release-modal-container").isVisible();
5848
+ if (!modalWindow) {
5849
+ await this.page.locator(".tl-event-title").getByText(release_title).scrollIntoViewIfNeeded();
5850
+ await this.page.locator(".tl-event-title").getByText(release_title).click();
5851
+ }
5662
5852
  await this.page.locator(".release-modal-container").locator(".xl-icon.release-icon").click();
5663
5853
  const releaseurl = `/#/releases/${release_id}`;
5664
5854
  const currentURL = await this.page.url();
@@ -5856,7 +6046,7 @@ class $fd4eef3ad2b2e612$export$a87f0ae8695e74be extends (0, $f8721861c660dd88$ex
5856
6046
  return new $fd4eef3ad2b2e612$var$ReleaseVariableModal(this.page);
5857
6047
  }
5858
6048
  async addNewVariable(variableName, labelname, description) {
5859
- await this.page.locator("#action-toolbar").getByTestId("dot-button").click();
6049
+ await this.page.locator("#action-toolbar").getByText("New variable").click();
5860
6050
  await this.page.fill(`[name="fieldKey"]`, variableName);
5861
6051
  await this.page.locator(".variable-label input").fill(labelname);
5862
6052
  if (description) await this.page.locator(".variable-description input").fill(description);
@@ -6165,8 +6355,9 @@ class $fd4eef3ad2b2e612$var$DeleteVariableModel extends (0, $f8721861c660dd88$ex
6165
6355
  class $ed2d4739e27d43c1$export$60c3bfa6385e2a10 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
6166
6356
  constructor(page){
6167
6357
  super(page);
6168
- this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
6169
6358
  this.commentBox = this.page.locator(`.input-block-level`);
6359
+ this.gridView = new $ed2d4739e27d43c1$var$GridView(page);
6360
+ this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
6170
6361
  }
6171
6362
  async openTask(taskName) {
6172
6363
  await this.filterTaskByTitle(taskName);
@@ -6379,6 +6570,75 @@ class $ed2d4739e27d43c1$export$60c3bfa6385e2a10 extends (0, $f8721861c660dd88$ex
6379
6570
  async changeGroupView() {
6380
6571
  await this.page.locator("#group-tasks-by-release").click();
6381
6572
  }
6573
+ async enableGroupByReleaseView() {
6574
+ await this.page.getByRole("checkbox", {
6575
+ name: "Group by release"
6576
+ }).check();
6577
+ }
6578
+ async disableGroupByReleaseView() {
6579
+ await this.page.getByRole("checkbox", {
6580
+ name: "Group by release"
6581
+ }).uncheck();
6582
+ }
6583
+ async switchToGridView() {
6584
+ await this.page.locator(".xl-icon.grid-icon").click();
6585
+ return this.gridView;
6586
+ }
6587
+ }
6588
+ class $ed2d4739e27d43c1$var$GridView extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
6589
+ constructor(page){
6590
+ super(page);
6591
+ this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
6592
+ }
6593
+ async expectTaskCountInGridView(count) {
6594
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("task-grid .task-wrapper")).toHaveCount(count);
6595
+ }
6596
+ // eslint-disable-next-line max-params
6597
+ async expectTaskDetailsInGridView(taskId, taskStatus, taskTitle, assignedTo, release, phase, startDate) {
6598
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`[data-test-id="${taskId}"] .label`)).toContainText(taskStatus);
6599
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`[data-test-id="${taskId}"] .title`)).toContainText(taskTitle);
6600
+ if (assignedTo) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`[data-test-id="${taskId}"] span`).filter({
6601
+ hasText: "Assigned to "
6602
+ }).first()).toContainText(assignedTo);
6603
+ if (release) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`[data-test-id="${taskId}"] [data-test="release"]`)).toContainText(release);
6604
+ if (phase) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`[data-test-id="${taskId}"] [data-test="phase"] span`)).toContainText(phase);
6605
+ if (startDate) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`[data-test-id="${taskId}"] [data-test="started"]`)).toContainText(startDate);
6606
+ else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`[data-test-id="${taskId}"] .caption`).getByText("Started")).not.toBeVisible();
6607
+ return this;
6608
+ }
6609
+ async openTaskDrawerFromGridView(taskId, taskTitle) {
6610
+ await this.page.locator(`[data-test-id="${taskId}"] .title`).filter({
6611
+ hasText: taskTitle
6612
+ }).click();
6613
+ return this.taskDrawer;
6614
+ }
6615
+ async openContextualMenu(taskId) {
6616
+ await this.page.locator(`[data-test-id="${taskId}"] .xl-icon.options-icon`).click();
6617
+ }
6618
+ async expectContextMenuHas(taskId, enabled, disabled) {
6619
+ await this.openContextualMenu(taskId);
6620
+ for (const e of enabled)await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`[data-test-id="${taskId}"] #context-menu-container li:not(.disabled) a`).getByText(e)).toBeVisible();
6621
+ for (const e of disabled)await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`[data-test-id="${taskId}"] #context-menu-container li.disabled a`).getByText(e)).toBeVisible();
6622
+ return this;
6623
+ }
6624
+ async waitForTaskNotDisplayed(taskId) {
6625
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`div.task[data-test-id=${taskId}]`)).not.toBeVisible();
6626
+ return this;
6627
+ }
6628
+ async triggerContextMenuAction(action) {
6629
+ await this.page.locator(`#context-menu-container li a`).filter({
6630
+ hasText: action
6631
+ }).click();
6632
+ if (action === "Complete") {
6633
+ await this.page.locator("#modal textarea[mentio]").isVisible();
6634
+ await this.page.locator("#modal textarea[mentio]").fill("complete");
6635
+ await this.page.locator("#modal button.primary").filter({
6636
+ hasText: "Complete"
6637
+ }).click();
6638
+ return this;
6639
+ }
6640
+ return this;
6641
+ }
6382
6642
  }
6383
6643
 
6384
6644
 
@@ -7519,6 +7779,56 @@ class $3ec0e9cf832fdde8$var$ConfigurationInstancePage extends (0, $f8721861c660d
7519
7779
  }
7520
7780
 
7521
7781
 
7782
+
7783
+ class $267ea1f27d28a032$export$8da2fa93430be6ca extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
7784
+ constructor(page){
7785
+ super(page);
7786
+ }
7787
+ async setTaskAvailableToAllUsers(taskName, enable) {
7788
+ await this.page.locator("tr.ng-scope").filter({
7789
+ has: this.page.getByText(taskName, {
7790
+ exact: true
7791
+ })
7792
+ }).getByRole("checkbox").scrollIntoViewIfNeeded();
7793
+ const checkboxElement = this.page.locator("tr.ng-scope").filter({
7794
+ has: this.page.getByText(taskName, {
7795
+ exact: true
7796
+ })
7797
+ }).getByRole("checkbox");
7798
+ const isChecked = await checkboxElement.isChecked();
7799
+ if (isChecked && !enable) {
7800
+ await this.page.locator("tr.ng-scope").filter({
7801
+ has: this.page.getByText(taskName, {
7802
+ exact: true
7803
+ })
7804
+ }).getByRole("checkbox").scrollIntoViewIfNeeded();
7805
+ await this.page.locator("tr.ng-scope").filter({
7806
+ has: this.page.getByText(taskName, {
7807
+ exact: true
7808
+ })
7809
+ }).getByRole("checkbox").click();
7810
+ await this.page.getByTestId("save-btn").isVisible();
7811
+ await this.page.getByTestId("save-btn").click();
7812
+ await this.page.locator(".saved-text").waitFor();
7813
+ } else if (!isChecked && enable) {
7814
+ await this.page.locator("tr.ng-scope").filter({
7815
+ has: this.page.getByText(taskName, {
7816
+ exact: true
7817
+ })
7818
+ }).getByRole("checkbox").scrollIntoViewIfNeeded();
7819
+ await this.page.locator("tr.ng-scope").filter({
7820
+ has: this.page.getByText(taskName, {
7821
+ exact: true
7822
+ })
7823
+ }).getByRole("checkbox").click();
7824
+ await this.page.getByTestId("save-btn").isVisible();
7825
+ await this.page.getByTestId("save-btn").click();
7826
+ await this.page.locator(".saved-text").waitFor();
7827
+ }
7828
+ }
7829
+ }
7830
+
7831
+
7522
7832
  class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
7523
7833
  constructor(page){
7524
7834
  this.page = page;
@@ -7548,6 +7858,7 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
7548
7858
  this.rolesPage = new (0, $84dbf24c796d0540$export$7a5b979a220f477c)(page);
7549
7859
  this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
7550
7860
  this.workflowCatalogPage = new (0, $7bcc05352d6debcf$export$5628dfd1b9e94785)(page);
7861
+ this.taskAccessPage = new (0, $267ea1f27d28a032$export$8da2fa93430be6ca)(page);
7551
7862
  }
7552
7863
  async openTemplate(id) {
7553
7864
  return this.openReleaseOrTemplate(id, false);
@@ -7685,6 +7996,10 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
7685
7996
  async clickOnPrimaryLogo() {
7686
7997
  await this.page.getByTestId("primary-logo").click();
7687
7998
  }
7999
+ async gotoTaskAccessPage() {
8000
+ await this.page.goto("#/task-access");
8001
+ return new (0, $267ea1f27d28a032$export$8da2fa93430be6ca)(this.page);
8002
+ }
7688
8003
  }
7689
8004
 
7690
8005