@digital-ai/devops-page-object-release 0.0.17 → 0.0.18

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/main.js CHANGED
@@ -1330,18 +1330,12 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
1330
1330
  }
1331
1331
  async expectDependencyText(dependencies) {
1332
1332
  await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
1333
- await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
1334
- name: dependencies,
1335
- exact: true
1336
- }).first()).toBeVisible();
1333
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.gate-task-dependencies`).getByLabel(dependencies).first()).toBeVisible();
1337
1334
  }
1338
1335
  async clickEditDependency(dependencies) {
1339
1336
  const depOptionsIcon = this.page.locator(".dependency").filter({
1340
- has: this.page.getByRole("link", {
1341
- name: dependencies,
1342
- exact: true
1343
- })
1344
- }).locator(".icon-options");
1337
+ has: this.page.getByLabel(dependencies)
1338
+ }).locator(".actions");
1345
1339
  await depOptionsIcon.isVisible();
1346
1340
  await depOptionsIcon.click();
1347
1341
  const frame = this.page.getByTestId("undefined-menu");
@@ -1396,12 +1390,18 @@ class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$ex
1396
1390
  async setPhase(phaseTitle) {
1397
1391
  await this.phase.click();
1398
1392
  await this.phase.fill("");
1399
- await this.page.getByRole("option", {
1393
+ const count = await this.page.getByRole("option", {
1400
1394
  name: phaseTitle
1401
- }).waitFor();
1402
- await this.page.getByRole("option", {
1395
+ }).count();
1396
+ if (count > 0) await this.page.getByRole("option", {
1403
1397
  name: phaseTitle
1404
1398
  }).click();
1399
+ else {
1400
+ await this.page.locator(".phase-dependency").getByLabel("Open").click();
1401
+ await this.page.getByRole("option", {
1402
+ name: phaseTitle
1403
+ }).click();
1404
+ }
1405
1405
  }
1406
1406
  async setTask(taskTitle) {
1407
1407
  await this.task.click();
@@ -1529,6 +1529,9 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
1529
1529
  name: "arrow-down icon",
1530
1530
  exact: true
1531
1531
  });
1532
+ this.completeButton = this.page.getByRole("button", {
1533
+ name: "Complete"
1534
+ });
1532
1535
  }
1533
1536
  async openOverviewRail() {
1534
1537
  await this.openRail("Overview");
@@ -1575,6 +1578,11 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
1575
1578
  await this.commentBox.fill(comment);
1576
1579
  await this.confirm.click();
1577
1580
  }
1581
+ async completeTask(comment) {
1582
+ await this.completeButton.click();
1583
+ await this.commentBox.fill(comment);
1584
+ await this.confirm.click();
1585
+ }
1578
1586
  async expectTaskTitle(taskTitle) {
1579
1587
  (0, $kKeXs$playwrighttest.expect)(await this.page.locator(".task-drawer .task-title-input .dot-view-mode-typography").innerText()).toContain(taskTitle);
1580
1588
  }
@@ -1602,6 +1610,42 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
1602
1610
  name: username
1603
1611
  })).toBeVisible();
1604
1612
  }
1613
+ async expectStartNowButtonToBeVisible() {
1614
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("single-action-button")).toBeVisible();
1615
+ }
1616
+ async startNow(comment) {
1617
+ await this.page.getByTestId("single-action-button").click();
1618
+ await this.page.getByTestId("task-action-comment").fill(comment);
1619
+ await this.page.getByTestId("dot-button").click();
1620
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("single-action-button")).not.toBeVisible();
1621
+ }
1622
+ async expectCommentsToContain(text) {
1623
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-comment-body .markdown-wrapper p")).toContainText(text);
1624
+ }
1625
+ async switchWaitForScheduledDate() {
1626
+ await this.page.locator(".wait-for-start input").click();
1627
+ }
1628
+ async expectWaitForScheduledDateToBeChecked() {
1629
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".wait-for-start input")).toBeChecked();
1630
+ }
1631
+ async expectWaitForScheduledDateToBeUnchecked() {
1632
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".wait-for-start input")).not.toBeChecked();
1633
+ }
1634
+ // Other locators are flaky and it can be replaced if we get locator change in the frontend
1635
+ async clickOnStartDate() {
1636
+ await this.page.getByTestId("month-and-year").first().click();
1637
+ }
1638
+ async removeStartDate() {
1639
+ await this.page.getByRole("button", {
1640
+ name: "Set by user"
1641
+ }).locator(".MuiChip-deleteIcon").click();
1642
+ }
1643
+ async setStartDate(date) {
1644
+ await this.clickOnStartDate();
1645
+ await this.page.locator(".MuiPickersDay-root", {
1646
+ hasText: date
1647
+ }).click();
1648
+ }
1605
1649
  async assignToMe(userName, existingUsername) {
1606
1650
  await this.page.getByRole("button", {
1607
1651
  name: existingUsername
@@ -1857,6 +1901,49 @@ class $880df57ffbf6e614$export$9b575f14aa5e09a1 extends (0, $f8721861c660dd88$ex
1857
1901
  const value = await input.inputValue();
1858
1902
  (0, $kKeXs$playwrighttest.expect)(value).toBe(formattedDate);
1859
1903
  }
1904
+ /**
1905
+ *
1906
+ * @returns Getting current month and year in the format "MonthName YYYY"
1907
+ */ async getCurrentMonthYear() {
1908
+ const monthNames = [
1909
+ "January",
1910
+ "February",
1911
+ "March",
1912
+ "April",
1913
+ "May",
1914
+ "June",
1915
+ "July",
1916
+ "August",
1917
+ "September",
1918
+ "October",
1919
+ "November",
1920
+ "December"
1921
+ ];
1922
+ const d = new Date();
1923
+ const month = monthNames[d.getMonth()];
1924
+ const year = d.getFullYear();
1925
+ return `${month} ${year}`;
1926
+ }
1927
+ /**
1928
+ *
1929
+ * @returns Getting current date in the format "dd MonthName YYYY"
1930
+ */ async getCurrentDate() {
1931
+ const d = new Date();
1932
+ const date = d.getDate();
1933
+ const monthYear = await this.getCurrentMonthYear();
1934
+ return `${date} ${monthYear}`;
1935
+ }
1936
+ /**
1937
+ *
1938
+ * @param days Number of days to add to current date within the current month
1939
+ * @returns
1940
+ */ async getFutureDate(days) {
1941
+ const d = new Date();
1942
+ d.setDate(d.getDate() + days);
1943
+ const date = d.getDate();
1944
+ const monthYear = await this.getCurrentMonthYear();
1945
+ return `${date} ${monthYear}`;
1946
+ }
1860
1947
  }
1861
1948
 
1862
1949
 
@@ -1887,6 +1974,9 @@ class $2c89ba54932fbba8$export$f8f26dd395d7e1bd extends (0, $f8721861c660dd88$ex
1887
1974
  await (0, $kKeXs$playwrighttest.expect)(icExpandTreeview1).not.toBeVisible();
1888
1975
  }
1889
1976
  async openSideNavMenu(menuItem) {
1977
+ await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
1978
+ exact: true
1979
+ }).scrollIntoViewIfNeeded();
1890
1980
  await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
1891
1981
  exact: true
1892
1982
  }).click();
@@ -1948,6 +2038,13 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
1948
2038
  timeout: 10000
1949
2039
  });
1950
2040
  }
2041
+ async waitForTaskCompletedInAdvance(taskTitle) {
2042
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.completed_in_advance").getByText(taskTitle, {
2043
+ exact: true
2044
+ })).toBeVisible({
2045
+ timeout: 10000
2046
+ });
2047
+ }
1951
2048
  async waitForTaskInProgress(taskTitle) {
1952
2049
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.in_progress").getByText(taskTitle, {
1953
2050
  exact: true
@@ -1998,6 +2095,21 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
1998
2095
  async waitForTaskPlanned(title) {
1999
2096
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.task:has-text('${title}').planned`)).toBeVisible();
2000
2097
  }
2098
+ async expectTaskCompletedInAdvance(taskTitle) {
2099
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#release-content").getByRole("list").locator("div").filter({
2100
+ hasText: taskTitle
2101
+ }).locator('span.pull-right.ng-binding.ng-scope:has-text("Completed on")')).toBeVisible();
2102
+ }
2103
+ async expectTaskPending(taskTitle) {
2104
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.pending").getByText(taskTitle, {
2105
+ exact: true
2106
+ })).toBeVisible();
2107
+ }
2108
+ async expectCurrentTaskToContain(taskTitle) {
2109
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task.active .task-title").getByText(taskTitle, {
2110
+ exact: true
2111
+ })).toBeVisible();
2112
+ }
2001
2113
  async openManualTaskDetails(title) {
2002
2114
  await this.page.locator(`text=${title}`).click({
2003
2115
  force: true
@@ -2175,6 +2287,7 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
2175
2287
  });
2176
2288
  this.commentBox = this.page.locator(`.input-block-level`);
2177
2289
  this.confirm = this.page.getByTestId("dot-button");
2290
+ this.contextMenuButton = this.page.locator("#context-menu-container li");
2178
2291
  this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
2179
2292
  }
2180
2293
  async setTitle(title) {
@@ -2183,18 +2296,55 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
2183
2296
  await this.phaseLocator.locator(".phase-header input").fill(title);
2184
2297
  await this.phaseLocator.locator(".phase-header input").blur();
2185
2298
  }
2299
+ async isMenuItemEnabled(menuName, taskTitle) {
2300
+ await this.openContextMenuForTask(taskTitle);
2301
+ await (0, $kKeXs$playwrighttest.expect)(this.contextMenuButton.filter({
2302
+ hasText: menuName
2303
+ })).not.toHaveClass(/disabled/);
2304
+ await (0, $kKeXs$playwrighttest.expect)(this.contextMenuButton.filter({
2305
+ hasText: menuName
2306
+ }).locator("a")).not.toBeDisabled();
2307
+ await this.closeContextMenu();
2308
+ }
2309
+ async isMenuItemDisabled(menuName, taskTitle) {
2310
+ await this.openContextMenuForTask(taskTitle);
2311
+ await (0, $kKeXs$playwrighttest.expect)(this.contextMenuButton.filter({
2312
+ hasText: menuName
2313
+ })).toHaveClass(/disabled/);
2314
+ await (0, $kKeXs$playwrighttest.expect)(this.contextMenuButton.filter({
2315
+ hasText: menuName
2316
+ }).locator("a")).toBeDisabled();
2317
+ await this.closeContextMenu();
2318
+ }
2319
+ async expectMenuItemIsNotVisible(menuName, taskTitle) {
2320
+ await this.openContextMenuForTask(taskTitle);
2321
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#context-menu-container li").filter({
2322
+ hasText: menuName
2323
+ })).not.toBeVisible();
2324
+ await this.closeContextMenu();
2325
+ }
2326
+ async expectMenuItemIsVisible(menuName, taskTitle) {
2327
+ await this.openContextMenuForTask(taskTitle);
2328
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#context-menu-container li").filter({
2329
+ hasText: menuName
2330
+ })).toBeVisible();
2331
+ await this.closeContextMenu();
2332
+ }
2333
+ async closeContextMenu() {
2334
+ await this.page.locator("#release-header").click();
2335
+ }
2186
2336
  async expectTaskBorderWithColor(taskName, color) {
2187
2337
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.task-box:has-text('${taskName}')`)).toHaveCSS("border-top-color", color);
2188
2338
  }
2189
2339
  async addTaskInPhase(taskTitle, taskGroup, taskType) {
2190
2340
  await this.phaseLocator.getByText("Add task").click();
2191
- await this.phaseLocator.getByLabel("Open", {
2192
- exact: true
2193
- }).click();
2194
- await this.phaseLocator.getByPlaceholder("Start typing to filter task").fill(taskGroup);
2341
+ await this.page.locator("#task-selector").hover();
2342
+ await this.page.locator('button[aria-label="Clear"]').click();
2343
+ await this.page.locator("#task-selector").fill(taskGroup);
2195
2344
  await this.page.getByTestId(taskType).click();
2196
- await this.phaseLocator.locator("#task-title").fill(taskTitle);
2197
- await this.phaseLocator.getByTestId("save-select-task-btn").click();
2345
+ await this.page.locator(".icon-close").click();
2346
+ await this.page.locator("#task-title").fill(taskTitle);
2347
+ await this.page.getByTestId("save-select-task-btn").click();
2198
2348
  await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.getByText(taskTitle)).toBeVisible();
2199
2349
  }
2200
2350
  async getNumberOfTasks() {
@@ -2206,11 +2356,6 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
2206
2356
  async expectToHaveTitle(phaseTitle) {
2207
2357
  await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".phase-title")).toContainText(phaseTitle);
2208
2358
  }
2209
- async expectTemplateLabelNotToBePresent() {
2210
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-chip").filter({
2211
- hasText: "TEMPLATE"
2212
- })).not.toBeVisible();
2213
- }
2214
2359
  async openContextMenuForTask(taskTitle) {
2215
2360
  await this.phaseLocator.locator(".task").filter({
2216
2361
  hasText: taskTitle
@@ -2225,6 +2370,11 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
2225
2370
  exact: true
2226
2371
  }).click();
2227
2372
  }
2373
+ async expectTemplateLabelNotToBePresent() {
2374
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-chip").filter({
2375
+ hasText: "TEMPLATE"
2376
+ })).not.toBeVisible();
2377
+ }
2228
2378
  async openPhaseDetails() {
2229
2379
  await this.phaseLocator.locator(".phase-details").click();
2230
2380
  }
@@ -2351,6 +2501,7 @@ class $ce55a4fc3c0aa96a$export$e40b5d3c74b04c89 {
2351
2501
 
2352
2502
 
2353
2503
 
2504
+
2354
2505
  class $ceb2e9e08e1837c2$export$9b9454a7f137e99b extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2355
2506
  constructor(page){
2356
2507
  super(page);
@@ -2395,12 +2546,14 @@ class $ceb2e9e08e1837c2$export$9b9454a7f137e99b extends (0, $f8721861c660dd88$ex
2395
2546
  await this.clickNewDeliveryPattern();
2396
2547
  await this.setPatternName(patternName);
2397
2548
  await this.setPatternDescription(patternDescription);
2398
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#action-toolbar").filter({
2549
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".action-toolbar-actions button").filter({
2399
2550
  hasText: "Create"
2400
2551
  })).toBeEnabled();
2401
- await this.page.locator("#action-toolbar").filter({
2552
+ await this.page.locator(".action-toolbar-actions button").filter({
2402
2553
  hasText: "Create"
2403
- }).dblclick();
2554
+ }).click({
2555
+ force: true
2556
+ });
2404
2557
  await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Delivery flow")).toBeVisible();
2405
2558
  }
2406
2559
  async clickEditPatternIcon(patternName) {
@@ -2433,8 +2586,7 @@ class $ceb2e9e08e1837c2$export$9b9454a7f137e99b extends (0, $f8721861c660dd88$ex
2433
2586
  }
2434
2587
  async copyPattern(existingPatternName, NewPatternName) {
2435
2588
  await this.clickCopyPatternIcon(existingPatternName);
2436
- await this.page.locator('.confirmation-content .xl-react-component-input-wrapper input[placeholder="Add..."]').click();
2437
- await this.page.locator(".confirmation-content .close-icon").click();
2589
+ await this.page.locator(".xl-icon.close-icon").first().click();
2438
2590
  await this.addName.fill(NewPatternName);
2439
2591
  await this.page.getByRole("button", {
2440
2592
  name: "Continue"
@@ -2492,14 +2644,162 @@ class $ceb2e9e08e1837c2$var$Properties extends (0, $f8721861c660dd88$export$2b65
2492
2644
  }
2493
2645
 
2494
2646
 
2495
- class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2647
+
2648
+
2649
+
2650
+
2651
+ class $0767ec703ce1f9a5$export$572f40d328c1d028 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2496
2652
  constructor(page){
2497
2653
  super(page);
2498
- this.patternPage = new (0, $ceb2e9e08e1837c2$export$9b9454a7f137e99b)(page);
2654
+ this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
2499
2655
  this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
2656
+ this.newReleaseGroupButton = page.getByTestId("dot-button");
2657
+ this.dateMonth = new Date();
2658
+ }
2659
+ async createGroup(groupName, startDate, endDate) {
2660
+ await this.newReleaseGroupButton.click();
2661
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("Create new release group")).toBeVisible();
2662
+ await this.enterGroupName(groupName);
2663
+ const monthYear = await this.dateUtil.getCurrentMonthYear();
2664
+ if (startDate) await this.enterStartDate(startDate, monthYear);
2665
+ if (endDate) await this.enterEndDate(endDate, monthYear);
2666
+ await this.clickCreate();
2667
+ await this.expectSuccessMessageOnReleaseGroupCreation();
2668
+ }
2669
+ async addReleaseToGroup(releaseName) {
2670
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".action-toolbar-actions button").filter({
2671
+ hasText: "Add release"
2672
+ })).toBeEnabled();
2673
+ await this.page.locator(".action-toolbar-actions button").filter({
2674
+ hasText: "Add release"
2675
+ }).click({
2676
+ force: true
2677
+ });
2678
+ await this.page.getByPlaceholder("Search for a release...").click();
2679
+ await this.page.getByPlaceholder("Search for a release...").fill(releaseName);
2680
+ await this.page.keyboard.press("Enter");
2681
+ await this.page.locator("release-list-modal-release-row").filter({
2682
+ hasText: releaseName
2683
+ }).getByRole("checkbox").check();
2684
+ await this.page.getByRole("button", {
2685
+ name: "Add"
2686
+ }).click();
2687
+ await this.expectSuccessMessageOnAddingReleaseToGroup();
2688
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
2689
+ name: releaseName
2690
+ })).toBeVisible();
2691
+ }
2692
+ async editReleaseGroupName(newGroupName) {
2693
+ await this.page.locator("#title").click();
2694
+ await this.page.locator("#title").clear();
2695
+ await this.page.locator("#title").fill(newGroupName);
2696
+ }
2697
+ async enterGroupName(groupName) {
2698
+ await this.page.locator("#title").click();
2699
+ await this.page.locator("#title").fill(groupName);
2700
+ }
2701
+ async enterStartDate(date, monthYear) {
2702
+ await this.page.locator(".form-group").filter({
2703
+ hasText: "start date"
2704
+ }).locator(".date input").click();
2705
+ await this.dateUtil.setDate(date, monthYear);
2706
+ }
2707
+ async enterEndDate(date, monthYear) {
2708
+ await this.page.locator(".form-group").filter({
2709
+ hasText: "end date"
2710
+ }).locator(".date input").click();
2711
+ await this.dateUtil.setDate(date, monthYear);
2712
+ }
2713
+ async clickCreate() {
2714
+ await this.page.getByRole("button", {
2715
+ name: "Create"
2716
+ }).click();
2717
+ }
2718
+ async expectSuccessMessageOnReleaseGroupCreation() {
2719
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("success")).toBeVisible();
2720
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".success").filter({
2721
+ hasText: "Created release group successfully"
2722
+ })).toBeVisible();
2723
+ }
2724
+ async expectSuccessMessageOnAddingReleaseToGroup() {
2725
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("success")).toBeVisible();
2726
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".success").filter({
2727
+ hasText: "Added release to release group successfully"
2728
+ })).toBeVisible();
2729
+ }
2730
+ async expectSuccessMessageOnUpdatingGroup() {
2731
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("success")).toBeVisible();
2732
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".success").filter({
2733
+ hasText: "Updated release group successfully"
2734
+ })).toBeVisible();
2735
+ }
2736
+ async searchReleaseGroupByTitle(title) {
2737
+ await this.page.getByPlaceholder("Search for groups...", {
2738
+ exact: true
2739
+ }).click();
2740
+ await this.page.getByPlaceholder("Search for groups...", {
2741
+ exact: true
2742
+ }).fill(title);
2743
+ await this.page.getByPlaceholder("Search for groups...", {
2744
+ exact: true
2745
+ }).press("Enter");
2746
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".fc-list-item-title")).toContainText(title);
2747
+ }
2748
+ async deleteReleaseGroup(title) {
2749
+ await this.page.locator(".fc-list-item-line").filter({
2750
+ hasText: title
2751
+ }).locator(".fc-item-delete").click();
2752
+ await this.page.getByRole("button", {
2753
+ name: "Delete"
2754
+ }).click();
2755
+ }
2756
+ async clickReleaseGroupEdit(title) {
2757
+ await this.page.locator(".fc-list-item-line").filter({
2758
+ hasText: title
2759
+ }).locator(".fc-item-update").click();
2760
+ }
2761
+ async clickSave() {
2762
+ await this.page.getByRole("button", {
2763
+ name: "Save"
2764
+ }).click();
2765
+ }
2766
+ async clickCancel() {
2767
+ await this.page.getByRole("button", {
2768
+ name: "Cancel"
2769
+ }).click();
2770
+ }
2771
+ async clickOnStatusField() {
2772
+ await this.page.locator(".ci-filter-status.ng-isolate-scope").click();
2773
+ }
2774
+ async statusFilter(statusNames) {
2775
+ await this.clickOnStatusClearAll();
2776
+ await this.clickOnStatusField();
2777
+ for(let i = 0; i < statusNames.length; i++)await this.page.locator(`i.xl-icon.icon-s.checkbox[data='${statusNames[i]}']`).click();
2778
+ }
2779
+ async clickOnStatusClearAll() {
2780
+ await this.clickOnStatusField();
2781
+ await this.page.locator("a.xl-react-link", {
2782
+ hasText: "Clear all"
2783
+ }).click();
2784
+ }
2785
+ async clickOnStatusSelectAll() {
2786
+ await this.clickOnStatusField();
2787
+ await this.page.locator("a.xl-react-link", {
2788
+ hasText: "Select all"
2789
+ }).click();
2790
+ }
2791
+ }
2792
+
2793
+
2794
+ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
2795
+ constructor(page){
2796
+ super(page);
2500
2797
  this.expandButton = this.page.getByRole("button", {
2501
2798
  name: " Expand"
2502
2799
  });
2800
+ this.folderGroupsPage = new (0, $0767ec703ce1f9a5$export$572f40d328c1d028)(page);
2801
+ this.patternPage = new (0, $ceb2e9e08e1837c2$export$9b9454a7f137e99b)(page);
2802
+ this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
2503
2803
  }
2504
2804
  async openFoldersPage() {
2505
2805
  await this.page.goto("./#/folders");
@@ -2513,20 +2813,33 @@ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$ex
2513
2813
  return this;
2514
2814
  }
2515
2815
  async createFolder(folderName) {
2516
- await this.page.locator("button.btn-add-folder").click();
2517
- await this.page.locator("div.xl-react-component-input-wrapper").type(folderName);
2518
- await this.page.locator("button.xl-react-button.button.primary").click();
2519
- await this.page.locator(`//button[normalize-space()='Add release']`).isVisible();
2816
+ await this.page.getByRole("button", {
2817
+ name: " Add folder"
2818
+ }).click();
2819
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("Create a new folder in root")).toBeVisible();
2820
+ await this.page.getByRole("textbox").fill(folderName);
2821
+ await this.page.getByRole("button", {
2822
+ name: "Create"
2823
+ }).click();
2824
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
2825
+ name: folderName
2826
+ })).toBeVisible();
2520
2827
  return this;
2521
2828
  }
2522
2829
  async openFolder(folderName) {
2523
- await this.page.locator(`.folder-row-wrapper span:text-is('${folderName}')`).click();
2830
+ await this.page.getByTitle(folderName).waitFor({
2831
+ timeout: 500
2832
+ });
2833
+ await this.page.getByTitle(folderName).click();
2834
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".MuiBreadcrumbs-li").getByRole("link", {
2835
+ name: `${folderName}`
2836
+ })).toBeVisible();
2524
2837
  return this;
2525
2838
  }
2526
2839
  async openGroups() {
2527
2840
  await this.util.openSideNavMenu("Groups");
2528
2841
  await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Groups")).toBeVisible();
2529
- return this;
2842
+ return this.folderGroupsPage;
2530
2843
  }
2531
2844
  async createGroup(groupName) {
2532
2845
  await this.page.locator("//button[normalize-space()='New release group']").click();
@@ -2548,7 +2861,7 @@ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$ex
2548
2861
  return this;
2549
2862
  }
2550
2863
  async createSubFolder(parentFolder, subFolderName) {
2551
- await this.expandButton.click();
2864
+ await this.clickExpandButton();
2552
2865
  await this.page.getByRole("link", {
2553
2866
  name: parentFolder
2554
2867
  }).hover();
@@ -2562,7 +2875,7 @@ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$ex
2562
2875
  })).toBeVisible();
2563
2876
  }
2564
2877
  async renameFolder(existingFolderName, newFolderName) {
2565
- await this.expandButton.click();
2878
+ await this.clickExpandButton();
2566
2879
  await this.page.getByRole("link", {
2567
2880
  name: existingFolderName
2568
2881
  }).hover();
@@ -2575,7 +2888,7 @@ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$ex
2575
2888
  })).toBeVisible();
2576
2889
  }
2577
2890
  async deleteFolder(folderName) {
2578
- await this.expandButton.click();
2891
+ await this.clickExpandButton();
2579
2892
  await this.page.getByRole("link", {
2580
2893
  name: folderName
2581
2894
  }).hover();
@@ -2610,6 +2923,9 @@ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$ex
2610
2923
  hasText: folderName
2611
2924
  }).locator(`.xl-icon.${option}-icon`).click();
2612
2925
  }
2926
+ async clickExpandButton() {
2927
+ if (await this.expandButton.isEnabled()) await this.expandButton.click();
2928
+ }
2613
2929
  }
2614
2930
 
2615
2931
 
@@ -3373,11 +3689,52 @@ class $ed2d4739e27d43c1$export$60c3bfa6385e2a10 extends (0, $f8721861c660dd88$ex
3373
3689
  async clickOnAssigneeButton(title) {
3374
3690
  await this.page.locator(`.btn-group-filter.btn-group button.btn.btn-flat[title="${title}"]`).click();
3375
3691
  }
3376
- async expectTaskNotDisplayed(taskTitle) {
3692
+ async clickOnAssignedToMe() {
3693
+ await this.page.locator(`button[title="Assigned to me"]`).click();
3694
+ }
3695
+ async clickOnAssignedToMyTeams() {
3696
+ await this.page.locator(`button[title="Assigned to my teams"]`).click();
3697
+ }
3698
+ async clickOnAssignedToAllAvailable() {
3699
+ await this.page.locator(`button[title="All available"]`).click();
3700
+ }
3701
+ async expectTaskToNotBeDisplayed(taskTitle) {
3377
3702
  await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.row.task-inner`).filter({
3378
3703
  hasText: taskTitle
3379
3704
  }).getByText(taskTitle)).toHaveCount(0);
3380
3705
  }
3706
+ async expectTaskToBeDisplayed(taskTitle) {
3707
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.row.task-inner`).filter({
3708
+ hasText: taskTitle
3709
+ }).getByText(taskTitle)).toHaveCount(1);
3710
+ }
3711
+ async expectTasksToBeDisplayed(tasks) {
3712
+ for (const [taskTitle, shouldBeDisplayed] of Object.entries(tasks))if (shouldBeDisplayed) await this.expectTaskToBeDisplayed(taskTitle);
3713
+ else await this.expectTaskToNotBeDisplayed(taskTitle);
3714
+ }
3715
+ async expectTasksDisplayedInOrder(expectedTasks) {
3716
+ for (const task of expectedTasks){
3717
+ const taskElement = await this.page.locator(`[data-release-title='${task.releaseTitle}'] .row .task`).nth(task.taskPosition);
3718
+ await (0, $kKeXs$playwrighttest.expect)(taskElement).toHaveAttribute("data-task-title", task.taskTitle);
3719
+ }
3720
+ }
3721
+ async setOrderBy(orderBy) {
3722
+ await this.page.locator(".order-selector .btn:first-child").click();
3723
+ await this.page.locator(`.order-selector .bootstrap-link:has-text('${orderBy}')`).click();
3724
+ }
3725
+ async expectTaskCountForRelease(releaseTitle, expectedCount) {
3726
+ await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`#tasks-content #task-list-grouped-view div:has-text('${releaseTitle}') .task`)).toHaveCount(expectedCount);
3727
+ }
3728
+ async setSearchFilter(filterText) {
3729
+ await this.page.locator(".searchFilter").fill(filterText);
3730
+ }
3731
+ async clearSearchFilter() {
3732
+ await this.page.locator(".searchFilter").clear();
3733
+ }
3734
+ async setTagsFilter(filterText) {
3735
+ await this.page.locator(".tag-input").fill(filterText);
3736
+ await this.page.locator(".tag-input").press("Enter");
3737
+ }
3381
3738
  async clickOnStatusField() {
3382
3739
  await this.page.locator(".ci-filter-status.ng-isolate-scope").click();
3383
3740
  }
@@ -3767,13 +4124,13 @@ class $959d38250779aa22$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
3767
4124
  * @param taskTypeSelector : Selector of the task
3768
4125
  */ async addTaskInPhase(taskTitle, taskGroup, taskType) {
3769
4126
  await this.phaseLocator.getByText("Add task").click();
3770
- await this.phaseLocator.getByLabel("Open", {
3771
- exact: true
3772
- }).click();
3773
- await this.phaseLocator.getByPlaceholder("Start typing to filter task").fill(taskGroup);
4127
+ await this.page.locator("#task-selector").hover();
4128
+ await this.page.locator('button[aria-label="Clear"]').click();
4129
+ await this.page.locator("#task-selector").fill(taskGroup);
3774
4130
  await this.page.getByTestId(taskType).click();
3775
- await this.phaseLocator.locator("#task-title").fill(taskTitle);
3776
- await this.phaseLocator.getByTestId("save-select-task-btn").click();
4131
+ await this.page.locator(".icon-close").click();
4132
+ await this.page.locator("#task-title").fill(taskTitle);
4133
+ await this.page.getByTestId("save-select-task-btn").click();
3777
4134
  await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.getByText(taskTitle)).toBeVisible();
3778
4135
  }
3779
4136
  async getNumberOfTasks() {
@@ -3846,16 +4203,16 @@ class $8b6ce149dd48e48b$export$7e1d435fa474ee21 extends (0, $f8721861c660dd88$ex
3846
4203
  await this.page.getByRole("button", {
3847
4204
  name: "Continue"
3848
4205
  }).click();
3849
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-chip").filter({
3850
- hasText: "TEMPLATE"
3851
- })).toBeVisible();
4206
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("template-workflow-pill").getByText("Template")).toBeVisible();
3852
4207
  }
3853
4208
  async move(templateName, targetFolder) {
3854
- await this.page.locator(".title").filter({
4209
+ await this.page.locator(".template").filter({
3855
4210
  hasText: templateName
3856
- }).locator(".move").click();
4211
+ }).locator(".template-actions .move").click();
3857
4212
  await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("Move template to")).toBeVisible();
3858
- await this.page.getByRole("button", {
4213
+ if (await this.page.getByRole("button", {
4214
+ name: "Expand"
4215
+ }).isEnabled()) await this.page.getByRole("button", {
3859
4216
  name: "Expand"
3860
4217
  }).click();
3861
4218
  await this.page.getByPlaceholder("Search folder...").click();
@@ -3962,6 +4319,8 @@ class $8b6ce149dd48e48b$export$7e1d435fa474ee21 extends (0, $f8721861c660dd88$ex
3962
4319
  class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
3963
4320
  constructor(page){
3964
4321
  this.page = page;
4322
+ this.dataRandomGenerator = new (0, $ce55a4fc3c0aa96a$export$e40b5d3c74b04c89)();
4323
+ this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
3965
4324
  this.folderPage = new (0, $9058d40a81bdb1f5$export$b453f08936c58edb)(page);
3966
4325
  this.globalvariable = new (0, $506d511737b3ea46$export$74ca1eaaa9a0054)(page);
3967
4326
  this.homePage = new (0, $9ef669cf95557cb5$export$36d69433c4f81145)(page);
@@ -4079,12 +4438,12 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
4079
4438
  return new (0, $9b9a8c3da392d020$export$f43492e8ac3c566)(this.page);
4080
4439
  }
4081
4440
  async collapseSideView() {
4082
- await this.page.locator(".icon-collapse").click();
4083
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".icon-collapse")).not.toBeVisible();
4441
+ await this.page.getByLabel("Collapse Q").click();
4442
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("Collapse Q")).not.toBeVisible();
4084
4443
  }
4085
4444
  async expandSideView() {
4086
- await this.page.locator(".icon-expand").click();
4087
- await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".icon-expand")).not.toBeVisible();
4445
+ await this.page.getByLabel("Expand Q").click();
4446
+ await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("Expand Q")).not.toBeVisible();
4088
4447
  }
4089
4448
  }
4090
4449
 
@@ -5037,6 +5396,13 @@ class $6998c6a53a9eb4fa$var$Fixtures {
5037
5396
  permissions(rolePermissions) {
5038
5397
  return this.doPost("fixtures/roles/permissions/global", rolePermissions);
5039
5398
  }
5399
+ updateUserProfile(username, profile) {
5400
+ profile.id = username;
5401
+ profile.type = "xlrelease.UserProfile";
5402
+ profile.canonicalId = username.toLowerCase();
5403
+ if (this.userProfiles.indexOf(profile.canonicalId) === -1) this.userProfiles.push(profile.canonicalId);
5404
+ return this.doPut("fixtures/userProfile", profile);
5405
+ }
5040
5406
  deleteRole(roleName) {
5041
5407
  return this.doDelete(`fixtures/role/${roleName}`);
5042
5408
  }