@digital-ai/devops-page-object-release 0.0.16 → 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/module.js CHANGED
@@ -25,7 +25,45 @@ class $9626bc9256ce31f7$export$2b65d1d97338f32b {
25
25
  }
26
26
 
27
27
 
28
+
29
+ class $05d91a1d3381a287$export$34addcca3f0ae43f extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
30
+ constructor(page){
31
+ super(page);
32
+ }
33
+ async setName(releaseName) {
34
+ await this.page.locator("#release-form-title").click();
35
+ await this.page.locator("#release-form-title").fill(releaseName);
36
+ }
37
+ async setDescription(description) {
38
+ await this.page.locator(".release-description").hover();
39
+ await this.page.locator(".display").filter({
40
+ hasText: "Set description"
41
+ }).locator(".edit-icon").click();
42
+ await this.page.locator("textarea").click();
43
+ await this.page.locator("textarea").clear();
44
+ await this.page.locator("textarea").fill(description);
45
+ await this.page.getByText("Save", {
46
+ exact: true
47
+ }).click();
48
+ }
49
+ async create() {
50
+ await this.page.getByRole("button", {
51
+ name: "Create"
52
+ }).waitFor({
53
+ state: "visible"
54
+ });
55
+ await this.page.getByRole("button", {
56
+ name: "Create"
57
+ }).click();
58
+ }
59
+ }
60
+
61
+
28
62
  class $5359280e98d97ff9$export$a678525e79c4ccc4 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
63
+ constructor(page){
64
+ super(page);
65
+ this.releaseCreatePage = new (0, $05d91a1d3381a287$export$34addcca3f0ae43f)(page);
66
+ }
29
67
  async expectNumberOfReleases(releaseTitle, amount) {
30
68
  await this.filterReleaseByTitle(releaseTitle);
31
69
  if (amount === 1) await (0, $hOLA6$expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible({
@@ -33,6 +71,10 @@ class $5359280e98d97ff9$export$a678525e79c4ccc4 extends (0, $9626bc9256ce31f7$ex
33
71
  });
34
72
  else await (0, $hOLA6$expect)(this.page.locator(".release").getByText(releaseTitle).count()).toBe(amount);
35
73
  }
74
+ async filterReleaseByAllStatus() {
75
+ await this.page.locator(".ci-status .remaining-tags").getByText("more").click();
76
+ await this.page.locator(".ci-status .xl-react-link").getByText("Select all").click();
77
+ }
36
78
  async openReleaseByName(releaseTitle) {
37
79
  await this.page.locator(".release-line .row-wrapper .release-title-wrapper a", {
38
80
  hasText: releaseTitle
@@ -45,6 +87,12 @@ class $5359280e98d97ff9$export$a678525e79c4ccc4 extends (0, $9626bc9256ce31f7$ex
45
87
  await this.page.locator(".searchFilter").press("Enter");
46
88
  await (0, $hOLA6$expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible();
47
89
  }
90
+ async createNewRelease(releaseName, description) {
91
+ await this.releaseCreatePage.setName(releaseName);
92
+ await this.releaseCreatePage.setDescription(description);
93
+ await this.releaseCreatePage.create();
94
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Flow")).toBeVisible();
95
+ }
48
96
  }
49
97
 
50
98
 
@@ -312,7 +360,7 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
312
360
  await this.page.getByTestId("single-action-button").click();
313
361
  await this.page.getByTestId("task-action-comment").click();
314
362
  await this.page.getByTestId("task-action-comment").fill(comment);
315
- await this.page.getByTestId("task-action-confirm").click();
363
+ await this.page.getByTestId("dot-button").click();
316
364
  }
317
365
  async expectDependenciesDisplayed(dependencies) {
318
366
  await this.railLocator.locator(".gate-task-dependencies").waitFor();
@@ -321,24 +369,19 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
321
369
  })).toBeVisible();
322
370
  }
323
371
  async expectCanDeleteDependency(title, canDelete = true) {
324
- if (canDelete) {
325
- const locat = this.page.locator(".dependency").filter({
326
- has: this.page.getByRole("link", {
327
- name: title,
328
- exact: true
329
- })
330
- }).locator(".icon-options");
331
- await locat.isVisible();
332
- await locat.click();
333
- await (0, $hOLA6$expect)(this.railLocator.getByRole("menuitem", {
334
- name: "Remove"
335
- })).toBeVisible();
336
- } else await (0, $hOLA6$expect)(this.page.locator(".dependency").filter({
372
+ const depOptionsIcon = this.page.locator(".dependency").filter({
337
373
  has: this.page.getByRole("link", {
338
374
  name: title,
339
375
  exact: true
340
376
  })
341
- }).locator(".icon-options")).not.toBeVisible();
377
+ }).locator(".icon-options");
378
+ if (canDelete) {
379
+ await depOptionsIcon.isVisible();
380
+ await depOptionsIcon.click();
381
+ await (0, $hOLA6$expect)(this.railLocator.getByRole("menuitem", {
382
+ name: "Remove"
383
+ })).toBeVisible();
384
+ } else await (0, $hOLA6$expect)(depOptionsIcon).not.toBeVisible();
342
385
  }
343
386
  async getDependencyCount() {
344
387
  await (0, $hOLA6$expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
@@ -351,26 +394,20 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
351
394
  }
352
395
  async expectDependencyText(dependencies) {
353
396
  await (0, $hOLA6$expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
354
- await (0, $hOLA6$expect)(this.page.getByRole("link", {
355
- name: dependencies,
356
- exact: true
357
- }).first()).toBeVisible();
397
+ await (0, $hOLA6$expect)(this.page.locator(`.gate-task-dependencies`).getByLabel(dependencies).first()).toBeVisible();
358
398
  }
359
399
  async clickEditDependency(dependencies) {
360
- const locat = this.page.locator(".dependency").filter({
361
- has: this.page.getByRole("link", {
362
- name: dependencies,
363
- exact: true
364
- })
365
- }).locator(".icon-options");
366
- await locat.isVisible();
367
- await locat.click();
400
+ const depOptionsIcon = this.page.locator(".dependency").filter({
401
+ has: this.page.getByLabel(dependencies)
402
+ }).locator(".actions");
403
+ await depOptionsIcon.isVisible();
404
+ await depOptionsIcon.click();
368
405
  const frame = this.page.getByTestId("undefined-menu");
369
406
  if (await frame.isVisible()) await this.railLocator.getByRole("menuitem", {
370
407
  name: "Edit"
371
408
  }).click();
372
409
  else {
373
- await locat.nth(1).click();
410
+ await depOptionsIcon.click();
374
411
  await this.railLocator.getByRole("menuitem", {
375
412
  name: "Edit"
376
413
  }).click();
@@ -403,24 +440,32 @@ class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$ex
403
440
  async setRelease(releaseTitle) {
404
441
  await this.release.click();
405
442
  await this.release.fill(releaseTitle);
443
+ await this.page.getByRole("option", {
444
+ name: releaseTitle
445
+ }).waitFor();
406
446
  await this.page.getByRole("option", {
407
447
  name: releaseTitle
408
448
  }).click();
409
449
  }
410
450
  async save() {
411
- await (0, $hOLA6$expect)(this.dependencyLocator.getByRole("button", {
412
- name: "OK"
413
- })).toBeEnabled();
414
- await this.dependencyLocator.getByRole("button", {
415
- name: "OK"
416
- }).click();
451
+ await (0, $hOLA6$expect)(this.dependencyLocator.getByTestId("save-button")).toBeVisible();
452
+ await this.dependencyLocator.getByTestId("save-button").click();
417
453
  }
418
454
  async setPhase(phaseTitle) {
419
455
  await this.phase.click();
420
456
  await this.phase.fill("");
421
- await this.page.getByRole("option", {
457
+ const count = await this.page.getByRole("option", {
458
+ name: phaseTitle
459
+ }).count();
460
+ if (count > 0) await this.page.getByRole("option", {
422
461
  name: phaseTitle
423
462
  }).click();
463
+ else {
464
+ await this.page.locator(".phase-dependency").getByLabel("Open").click();
465
+ await this.page.getByRole("option", {
466
+ name: phaseTitle
467
+ }).click();
468
+ }
424
469
  }
425
470
  async setTask(taskTitle) {
426
471
  await this.task.click();
@@ -438,6 +483,7 @@ class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$ex
438
483
  (0, $hOLA6$expect)(variablemode).toBe("" + mode + "");
439
484
  }
440
485
  async clickVariable() {
486
+ await this.dependencyLocator.getByLabel("input-variable").waitFor();
441
487
  await this.dependencyLocator.getByLabel("input-variable").click();
442
488
  }
443
489
  //TODO: getAttribute('value') is not working as expected. Need to be fixed with better alternative.
@@ -531,7 +577,7 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
531
577
  });
532
578
  this.cancelButton = this.page.getByTestId("task-action-cancel");
533
579
  this.commentBox = this.page.getByTestId("task-action-comment");
534
- this.confirm = this.page.getByTestId("task-action-confirm");
580
+ this.confirm = this.page.getByTestId("dot-button");
535
581
  this.activity = new (0, $69e86f559cdf2bd0$export$15d3f9b095bb5188)(page);
536
582
  this.attachment = new (0, $9c357602b6f466e7$export$aa59788fdecae2f2)(page);
537
583
  this.config = new (0, $e44e9af564fb00f7$export$64c93bc7fb9ca44e)(page);
@@ -540,6 +586,16 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
540
586
  this.skipMenu = this.page.getByRole("menuitem", {
541
587
  name: "Skip"
542
588
  });
589
+ this.failMenu = this.page.getByRole("menuitem", {
590
+ name: "Fail"
591
+ });
592
+ this.openMenu = this.page.getByRole("button", {
593
+ name: "arrow-down icon",
594
+ exact: true
595
+ });
596
+ this.completeButton = this.page.getByRole("button", {
597
+ name: "Complete"
598
+ });
543
599
  }
544
600
  async openOverviewRail() {
545
601
  await this.openRail("Overview");
@@ -569,19 +625,28 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
569
625
  await this.taskDrawerLocator.locator(".task-drawer-header").getByTestId("close-btn").click();
570
626
  }
571
627
  async retryTask(comment) {
628
+ await this.page.waitForTimeout(1000);
572
629
  await this.retryButton.click();
573
630
  await this.commentBox.fill(comment);
574
631
  await this.confirm.click();
575
632
  }
576
633
  async skipTask(comment) {
577
- await this.page.getByRole("button", {
578
- name: "arrow-down icon",
579
- exact: true
580
- }).click();
634
+ await this.openMenu.click();
581
635
  await this.skipMenu.click();
582
636
  await this.commentBox.fill(comment);
583
637
  await this.confirm.click();
584
638
  }
639
+ async failTask(comment) {
640
+ await this.openMenu.click();
641
+ await this.failMenu.click();
642
+ await this.commentBox.fill(comment);
643
+ await this.confirm.click();
644
+ }
645
+ async completeTask(comment) {
646
+ await this.completeButton.click();
647
+ await this.commentBox.fill(comment);
648
+ await this.confirm.click();
649
+ }
585
650
  async expectTaskTitle(taskTitle) {
586
651
  (0, $hOLA6$expect)(await this.page.locator(".task-drawer .task-title-input .dot-view-mode-typography").innerText()).toContain(taskTitle);
587
652
  }
@@ -589,18 +654,62 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
589
654
  (0, $hOLA6$expect)(await this.page.locator(".task-drawer .task-type").innerText()).toContain(taskType);
590
655
  }
591
656
  async clickExpand() {
592
- await this.page.locator(".icon-fullscreen-enter").click();
593
- await (0, $hOLA6$expect)(this.page.locator(".icon-fullscreen-enter")).not.toBeVisible();
657
+ await this.page.getByRole("tooltip", {
658
+ name: "Expand"
659
+ }).getByTestId("expand-btn").click();
660
+ await (0, $hOLA6$expect)(this.page.getByRole("tooltip", {
661
+ name: "Shrink"
662
+ }).getByTestId("expand-btn")).toBeVisible();
594
663
  }
595
664
  async clickShrink() {
596
- await this.page.locator(".icon-fullscreen-exit").click();
597
- await (0, $hOLA6$expect)(this.page.locator(".icon-fullscreen-exit")).not.toBeVisible();
665
+ await this.page.getByRole("tooltip", {
666
+ name: "Shrink"
667
+ }).getByTestId("expand-btn").click();
668
+ await (0, $hOLA6$expect)(this.page.getByRole("tooltip", {
669
+ name: "Expand"
670
+ }).getByTestId("expand-btn")).toBeVisible();
598
671
  }
599
672
  async expectAssignedTo(username) {
600
673
  await (0, $hOLA6$expect)(this.page.getByRole("button", {
601
674
  name: username
602
675
  })).toBeVisible();
603
676
  }
677
+ async expectStartNowButtonToBeVisible() {
678
+ await (0, $hOLA6$expect)(this.page.getByTestId("single-action-button")).toBeVisible();
679
+ }
680
+ async startNow(comment) {
681
+ await this.page.getByTestId("single-action-button").click();
682
+ await this.page.getByTestId("task-action-comment").fill(comment);
683
+ await this.page.getByTestId("dot-button").click();
684
+ await (0, $hOLA6$expect)(this.page.getByTestId("single-action-button")).not.toBeVisible();
685
+ }
686
+ async expectCommentsToContain(text) {
687
+ await (0, $hOLA6$expect)(this.page.locator(".task-comment-body .markdown-wrapper p")).toContainText(text);
688
+ }
689
+ async switchWaitForScheduledDate() {
690
+ await this.page.locator(".wait-for-start input").click();
691
+ }
692
+ async expectWaitForScheduledDateToBeChecked() {
693
+ await (0, $hOLA6$expect)(this.page.locator(".wait-for-start input")).toBeChecked();
694
+ }
695
+ async expectWaitForScheduledDateToBeUnchecked() {
696
+ await (0, $hOLA6$expect)(this.page.locator(".wait-for-start input")).not.toBeChecked();
697
+ }
698
+ // Other locators are flaky and it can be replaced if we get locator change in the frontend
699
+ async clickOnStartDate() {
700
+ await this.page.getByTestId("month-and-year").first().click();
701
+ }
702
+ async removeStartDate() {
703
+ await this.page.getByRole("button", {
704
+ name: "Set by user"
705
+ }).locator(".MuiChip-deleteIcon").click();
706
+ }
707
+ async setStartDate(date) {
708
+ await this.clickOnStartDate();
709
+ await this.page.locator(".MuiPickersDay-root", {
710
+ hasText: date
711
+ }).click();
712
+ }
604
713
  async assignToMe(userName, existingUsername) {
605
714
  await this.page.getByRole("button", {
606
715
  name: existingUsername
@@ -624,6 +733,15 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
624
733
  const regexPattern = new RegExp(`${flagComment}.*${flagName}`, "i");
625
734
  await (0, $hOLA6$expect)(this.page.getByText(regexPattern)).toBeVisible();
626
735
  }
736
+ async expectStartDateToBeDisplayed() {
737
+ await (0, $hOLA6$expect)(this.page.getByTestId("start-date-title")).toHaveCount(1);
738
+ }
739
+ async expectEndDateToBeDisplayed() {
740
+ await (0, $hOLA6$expect)(this.page.getByTestId("end-date-title")).toHaveCount(1);
741
+ }
742
+ async expectStartDateAndEndDateToBeDisplayed() {
743
+ await (0, $hOLA6$expect)(this.page.getByTestId("month-and-year")).toHaveCount(2);
744
+ }
627
745
  }
628
746
 
629
747
 
@@ -806,12 +924,141 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
806
924
  }
807
925
 
808
926
 
927
+
928
+
929
+
930
+ class $71075ce65fcede1d$export$9b575f14aa5e09a1 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
931
+ constructor(page){
932
+ super(page);
933
+ }
934
+ async openDatePicker(selector) {
935
+ await this.page.locator(`${selector} .date`).click();
936
+ }
937
+ /**
938
+ * Setting date, month and year from calendar picker
939
+ */ async setDate(date, monthYear) {
940
+ const prev = this.page.locator(".datepicker-days .prev");
941
+ const next = this.page.locator(".datepicker-days .next");
942
+ const monYear = this.page.locator(".datepicker-days .datepicker-switch");
943
+ const thisMonth = (0, $hOLA6$moment)(monthYear, "MMMM YYYY").isBefore();
944
+ while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
945
+ else await next.click();
946
+ await this.page.getByRole("cell", {
947
+ name: "" + date + ""
948
+ }).first().click();
949
+ }
950
+ async expectDurationToBe(duration) {
951
+ (0, $hOLA6$expect)(await this.page.locator(".duration-editor").textContent()).toBe(duration);
952
+ }
953
+ async setDuration(days, hours, mins) {
954
+ await this.page.locator(".duration-editor").click();
955
+ if (typeof days !== "undefined") await this.page.locator(".days").fill(days);
956
+ if (typeof hours !== "undefined") await this.page.locator(".hours").fill(hours);
957
+ if (typeof mins !== "undefined") await this.page.locator(".minutes").fill(mins);
958
+ await this.page.keyboard.press("Enter");
959
+ }
960
+ async expectTimeToBe(selector, format, date) {
961
+ if (typeof date === "string") date = new Date(date);
962
+ const formattedDate = (0, $hOLA6$moment)(date).format(format);
963
+ const input = this.page.locator(`${selector}`);
964
+ await (0, $hOLA6$expect)(input).toBeVisible();
965
+ const value = await input.inputValue();
966
+ (0, $hOLA6$expect)(value).toBe(formattedDate);
967
+ }
968
+ /**
969
+ *
970
+ * @returns Getting current month and year in the format "MonthName YYYY"
971
+ */ async getCurrentMonthYear() {
972
+ const monthNames = [
973
+ "January",
974
+ "February",
975
+ "March",
976
+ "April",
977
+ "May",
978
+ "June",
979
+ "July",
980
+ "August",
981
+ "September",
982
+ "October",
983
+ "November",
984
+ "December"
985
+ ];
986
+ const d = new Date();
987
+ const month = monthNames[d.getMonth()];
988
+ const year = d.getFullYear();
989
+ return `${month} ${year}`;
990
+ }
991
+ /**
992
+ *
993
+ * @returns Getting current date in the format "dd MonthName YYYY"
994
+ */ async getCurrentDate() {
995
+ const d = new Date();
996
+ const date = d.getDate();
997
+ const monthYear = await this.getCurrentMonthYear();
998
+ return `${date} ${monthYear}`;
999
+ }
1000
+ /**
1001
+ *
1002
+ * @param days Number of days to add to current date within the current month
1003
+ * @returns
1004
+ */ async getFutureDate(days) {
1005
+ const d = new Date();
1006
+ d.setDate(d.getDate() + days);
1007
+ const date = d.getDate();
1008
+ const monthYear = await this.getCurrentMonthYear();
1009
+ return `${date} ${monthYear}`;
1010
+ }
1011
+ }
1012
+
1013
+
1014
+
1015
+
1016
+
1017
+ class $87bbb6d35ad31a00$export$f8f26dd395d7e1bd extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1018
+ constructor(page){
1019
+ super(page);
1020
+ this.tempDir = "";
1021
+ this.content = "";
1022
+ this.closeIcon = this.page.locator(".xl-icon.close-icon");
1023
+ }
1024
+ async createTempFile(fileName, testInfo) {
1025
+ const content = fileName.toString();
1026
+ const tempDir = testInfo.outputPath(fileName.toString());
1027
+ $hOLA6$promises.writeFile(tempDir, content, "utf8");
1028
+ }
1029
+ async expandAllFolders() {
1030
+ const icExpandTreeview1 = this.page.locator(".rstm-toggle-icon.xl-icon.arrow-right-icon");
1031
+ for (const element of (await icExpandTreeview1.all())){
1032
+ const blnVal = await element.isVisible();
1033
+ if (blnVal) {
1034
+ await element.click();
1035
+ await this.expandAllFolders();
1036
+ }
1037
+ }
1038
+ await (0, $hOLA6$expect)(icExpandTreeview1).not.toBeVisible();
1039
+ }
1040
+ async openSideNavMenu(menuItem) {
1041
+ await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
1042
+ exact: true
1043
+ }).scrollIntoViewIfNeeded();
1044
+ await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
1045
+ exact: true
1046
+ }).click();
1047
+ }
1048
+ async clickCloseIcon() {
1049
+ await this.closeIcon.click();
1050
+ }
1051
+ }
1052
+
1053
+
809
1054
  class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
810
1055
  constructor(page){
811
1056
  super(page);
812
1057
  this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
1058
+ this.phaseTitle = this.page.locator(".phase .phase-title");
813
1059
  this.properties = new (0, $c9bb587dd92143c3$export$d1077068a9cc9f17)(page);
814
1060
  this.variables = new (0, $f48771b486a3eb8f$export$a87f0ae8695e74be)(page);
1061
+ this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
815
1062
  }
816
1063
  async openTriggers() {
817
1064
  await this.openSubPage("Triggers");
@@ -855,6 +1102,18 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
855
1102
  timeout: 10000
856
1103
  });
857
1104
  }
1105
+ async waitForTaskCompletedInAdvance(taskTitle) {
1106
+ await (0, $hOLA6$expect)(this.page.locator(".task.completed_in_advance").getByText(taskTitle, {
1107
+ exact: true
1108
+ })).toBeVisible({
1109
+ timeout: 10000
1110
+ });
1111
+ }
1112
+ async waitForTaskInProgress(taskTitle) {
1113
+ await (0, $hOLA6$expect)(this.page.locator(".task.in_progress").getByText(taskTitle, {
1114
+ exact: true
1115
+ })).toBeVisible();
1116
+ }
858
1117
  async waitForTaskFailed(taskTitle) {
859
1118
  await (0, $hOLA6$expect)(this.page.locator(".task.failed").getByText(taskTitle, {
860
1119
  exact: true
@@ -869,6 +1128,13 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
869
1128
  timeout: 10000
870
1129
  });
871
1130
  }
1131
+ async waitForTaskSkippedInAdvance(taskTitle) {
1132
+ await (0, $hOLA6$expect)(this.page.locator(".task.skipped_in_advance").getByText(taskTitle, {
1133
+ exact: true
1134
+ })).toBeVisible({
1135
+ timeout: 10000
1136
+ });
1137
+ }
872
1138
  async waitForTaskAborted(taskTitle) {
873
1139
  await (0, $hOLA6$expect)(this.page.locator(".task.aborted").getByText(taskTitle, {
874
1140
  exact: true
@@ -893,6 +1159,21 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
893
1159
  async waitForTaskPlanned(title) {
894
1160
  await (0, $hOLA6$expect)(this.page.locator(`.task:has-text('${title}').planned`)).toBeVisible();
895
1161
  }
1162
+ async expectTaskCompletedInAdvance(taskTitle) {
1163
+ await (0, $hOLA6$expect)(this.page.locator("#release-content").getByRole("list").locator("div").filter({
1164
+ hasText: taskTitle
1165
+ }).locator('span.pull-right.ng-binding.ng-scope:has-text("Completed on")')).toBeVisible();
1166
+ }
1167
+ async expectTaskPending(taskTitle) {
1168
+ await (0, $hOLA6$expect)(this.page.locator(".task.pending").getByText(taskTitle, {
1169
+ exact: true
1170
+ })).toBeVisible();
1171
+ }
1172
+ async expectCurrentTaskToContain(taskTitle) {
1173
+ await (0, $hOLA6$expect)(this.page.locator(".task.active .task-title").getByText(taskTitle, {
1174
+ exact: true
1175
+ })).toBeVisible();
1176
+ }
896
1177
  async openManualTaskDetails(title) {
897
1178
  await this.page.locator(`text=${title}`).click({
898
1179
  force: true
@@ -907,7 +1188,7 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
907
1188
  }).click();
908
1189
  await this.page.getByTestId("task-action-comment").click();
909
1190
  await this.page.getByTestId("task-action-comment").fill(comment);
910
- await this.page.getByTestId("task-action-confirm").click();
1191
+ await this.page.getByTestId("dot-button").click();
911
1192
  }
912
1193
  async openTaskDrawer(taskName) {
913
1194
  await this.page.locator(".task-header").getByText(taskName, {
@@ -928,25 +1209,32 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
928
1209
  return this.taskDrawer;
929
1210
  }
930
1211
  async openVariables() {
931
- await this.openReleaseMenu("Variables");
1212
+ await this.util.openSideNavMenu("Variables");
1213
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Variables")).toBeVisible();
932
1214
  }
933
1215
  async openProperties() {
934
- await this.openReleaseMenu("Properties");
1216
+ await this.util.openSideNavMenu("Properties");
1217
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Properties")).toBeVisible();
935
1218
  }
936
1219
  async openReleaseFlow() {
937
- await this.openReleaseMenu("Release flow");
1220
+ await this.util.openSideNavMenu("Flow");
1221
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Flow")).toBeVisible();
938
1222
  }
939
1223
  async openRelationships() {
940
- await this.openReleaseMenu("Relationships");
1224
+ await this.util.openSideNavMenu("Relationships");
1225
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Relationships")).toBeVisible();
941
1226
  }
942
1227
  async openTeamsPermissions() {
943
- await this.openReleaseMenu("Teams & Permissions");
1228
+ await this.util.openSideNavMenu("Teams & Permissions");
1229
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Teams & Permissions")).toBeVisible();
944
1230
  }
945
1231
  async openDashboard() {
946
- await this.openReleaseMenu("Dashboard");
1232
+ await this.util.openSideNavMenu("Dashboard");
1233
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Dashboard")).toBeVisible();
947
1234
  }
948
1235
  async openActivityLogs() {
949
- await this.openReleaseMenu("ActivityLogs");
1236
+ await this.util.openSideNavMenu("Activity logs");
1237
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Activity logs")).toBeVisible();
950
1238
  }
951
1239
  async openReleaseMenu(menuItem) {
952
1240
  await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
@@ -983,15 +1271,17 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
983
1271
  }
984
1272
  }
985
1273
  }
986
- async backToRelease() {
987
- await this.page.locator(".icon-back").click();
1274
+ async expectTemplateLabelNotToBePresent() {
1275
+ await (0, $hOLA6$expect)(this.page.locator(".dot-chip").filter({
1276
+ hasText: "TEMPLATE"
1277
+ })).not.toBeVisible();
988
1278
  }
989
1279
  async openTableView() {
990
- await this.page.locator(".xl-icon.table-icon").click();
1280
+ await this.util.openSideNavMenu("Table");
991
1281
  await (0, $hOLA6$expect)(this.page.locator(".release-grid-container")).toBeVisible();
992
1282
  }
993
1283
  async openPlannerView() {
994
- await this.page.locator(".xl-icon.planner-icon").click();
1284
+ await this.util.openSideNavMenu("Planner");
995
1285
  await (0, $hOLA6$expect)(this.page.locator(".gantt-container")).toBeVisible();
996
1286
  }
997
1287
  async expandGanttFolder() {
@@ -1004,6 +1294,9 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
1004
1294
  }
1005
1295
  }
1006
1296
  }
1297
+ async backToRelease() {
1298
+ await this.page.locator(".icon-back").click();
1299
+ }
1007
1300
  async expectTitleToBeInBreadcrumbLink(title) {
1008
1301
  await (0, $hOLA6$expect)(this.page.locator(".dot-breadcrumbs a", {
1009
1302
  hasText: title
@@ -1014,6 +1307,41 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
1014
1307
  hasText: title
1015
1308
  })).toBeVisible();
1016
1309
  }
1310
+ async addNewPhase(phaseName) {
1311
+ await this.page.getByTestId("add-phase-btn").click();
1312
+ if (phaseName) {
1313
+ await this.phaseTitle.getByText("New Phase").click();
1314
+ await this.phaseTitle.getByRole("textbox").clear();
1315
+ await this.phaseTitle.getByRole("textbox").fill(phaseName);
1316
+ await this.page.keyboard.press("Enter");
1317
+ await (0, $hOLA6$expect)(this.phaseTitle.filter({
1318
+ hasText: phaseName
1319
+ })).toBeVisible();
1320
+ }
1321
+ }
1322
+ async renamePhase(oldPhaseName, newPhaseName) {
1323
+ await this.phaseTitle.getByText(oldPhaseName).click();
1324
+ await this.phaseTitle.filter({
1325
+ hasText: oldPhaseName
1326
+ }).locator(".editable").clear();
1327
+ await this.phaseTitle.filter({
1328
+ hasText: oldPhaseName
1329
+ }).locator(".editable").fill(newPhaseName);
1330
+ await this.page.keyboard.press("Enter");
1331
+ await (0, $hOLA6$expect)(this.phaseTitle.filter({
1332
+ hasText: newPhaseName
1333
+ })).toBeVisible();
1334
+ }
1335
+ async exportRelease() {
1336
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1337
+ this.page.on("download", ()=>{});
1338
+ await this.page.getByTestId("template-export-btn").click();
1339
+ const downloadPromise = this.page.waitForEvent("download");
1340
+ await this.page.getByRole("link", {
1341
+ name: "Audit report (Excel)"
1342
+ }).click();
1343
+ await downloadPromise;
1344
+ }
1017
1345
  }
1018
1346
  class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1019
1347
  constructor(page, phaseName){
@@ -1021,6 +1349,10 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
1021
1349
  this.phaseLocator = page.locator(".phase", {
1022
1350
  hasText: phaseName
1023
1351
  });
1352
+ this.commentBox = this.page.locator(`.input-block-level`);
1353
+ this.confirm = this.page.getByTestId("dot-button");
1354
+ this.contextMenuButton = this.page.locator("#context-menu-container li");
1355
+ this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
1024
1356
  }
1025
1357
  async setTitle(title) {
1026
1358
  await this.phaseLocator.locator(".phase-header .display").click();
@@ -1028,28 +1360,56 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
1028
1360
  await this.phaseLocator.locator(".phase-header input").fill(title);
1029
1361
  await this.phaseLocator.locator(".phase-header input").blur();
1030
1362
  }
1363
+ async isMenuItemEnabled(menuName, taskTitle) {
1364
+ await this.openContextMenuForTask(taskTitle);
1365
+ await (0, $hOLA6$expect)(this.contextMenuButton.filter({
1366
+ hasText: menuName
1367
+ })).not.toHaveClass(/disabled/);
1368
+ await (0, $hOLA6$expect)(this.contextMenuButton.filter({
1369
+ hasText: menuName
1370
+ }).locator("a")).not.toBeDisabled();
1371
+ await this.closeContextMenu();
1372
+ }
1373
+ async isMenuItemDisabled(menuName, taskTitle) {
1374
+ await this.openContextMenuForTask(taskTitle);
1375
+ await (0, $hOLA6$expect)(this.contextMenuButton.filter({
1376
+ hasText: menuName
1377
+ })).toHaveClass(/disabled/);
1378
+ await (0, $hOLA6$expect)(this.contextMenuButton.filter({
1379
+ hasText: menuName
1380
+ }).locator("a")).toBeDisabled();
1381
+ await this.closeContextMenu();
1382
+ }
1383
+ async expectMenuItemIsNotVisible(menuName, taskTitle) {
1384
+ await this.openContextMenuForTask(taskTitle);
1385
+ await (0, $hOLA6$expect)(this.page.locator("#context-menu-container li").filter({
1386
+ hasText: menuName
1387
+ })).not.toBeVisible();
1388
+ await this.closeContextMenu();
1389
+ }
1390
+ async expectMenuItemIsVisible(menuName, taskTitle) {
1391
+ await this.openContextMenuForTask(taskTitle);
1392
+ await (0, $hOLA6$expect)(this.page.locator("#context-menu-container li").filter({
1393
+ hasText: menuName
1394
+ })).toBeVisible();
1395
+ await this.closeContextMenu();
1396
+ }
1397
+ async closeContextMenu() {
1398
+ await this.page.locator("#release-header").click();
1399
+ }
1031
1400
  async expectTaskBorderWithColor(taskName, color) {
1032
1401
  await (0, $hOLA6$expect)(this.page.locator(`.task-box:has-text('${taskName}')`)).toHaveCSS("border-top-color", color);
1033
1402
  }
1034
- async addTaskInPhase(taskTitle, taskType) {
1403
+ async addTaskInPhase(taskTitle, taskGroup, taskType) {
1035
1404
  await this.phaseLocator.getByText("Add task").click();
1036
- await this.phaseLocator.getByPlaceholder("Task title...").click();
1037
- await this.phaseLocator.getByPlaceholder("Task title...").fill(taskTitle);
1038
- await this.phaseLocator.locator(".xlr-ctx-menu-toggle").click();
1039
- const count = taskType.length - 1;
1040
- for(let i = 0; i < count; i++){
1041
- await this.page.locator('[data-test="' + taskType[i] + '"]').getByText(taskType[i]).click();
1042
- await this.page.getByText(taskType[i + 1]).click();
1043
- }
1044
- await this.phaseLocator.locator(".quick-controls-container a").getByText("Add", {
1045
- exact: true
1046
- }).click();
1047
- await this.phaseLocator.locator(".button.cancel").click();
1048
- await (0, $hOLA6$expect)(this.phaseLocator.locator(".task").filter({
1049
- hasText: taskTitle
1050
- })).toBeVisible({
1051
- timeout: 5000
1052
- });
1405
+ await this.page.locator("#task-selector").hover();
1406
+ await this.page.locator('button[aria-label="Clear"]').click();
1407
+ await this.page.locator("#task-selector").fill(taskGroup);
1408
+ await this.page.getByTestId(taskType).click();
1409
+ await this.page.locator(".icon-close").click();
1410
+ await this.page.locator("#task-title").fill(taskTitle);
1411
+ await this.page.getByTestId("save-select-task-btn").click();
1412
+ await (0, $hOLA6$expect)(this.phaseLocator.getByText(taskTitle)).toBeVisible();
1053
1413
  }
1054
1414
  async getNumberOfTasks() {
1055
1415
  return await this.phaseLocator.locator(".task").count();
@@ -1060,11 +1420,95 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
1060
1420
  async expectToHaveTitle(phaseTitle) {
1061
1421
  await (0, $hOLA6$expect)(this.phaseLocator.locator(".phase-title")).toContainText(phaseTitle);
1062
1422
  }
1423
+ async openContextMenuForTask(taskTitle) {
1424
+ await this.phaseLocator.locator(".task").filter({
1425
+ hasText: taskTitle
1426
+ }).locator(".context-menu-button").click();
1427
+ }
1428
+ async skipFromContextMenu(comment, taskTitle) {
1429
+ await this.openContextMenuForTask(taskTitle);
1430
+ await this.page.locator(".dropdown-menu li").getByText("Skip").click();
1431
+ await this.commentBox.fill(comment);
1432
+ await this.page.getByRole("button", {
1433
+ name: "Skip",
1434
+ exact: true
1435
+ }).click();
1436
+ }
1063
1437
  async expectTemplateLabelNotToBePresent() {
1064
1438
  await (0, $hOLA6$expect)(this.page.locator(".dot-chip").filter({
1065
1439
  hasText: "TEMPLATE"
1066
1440
  })).not.toBeVisible();
1067
1441
  }
1442
+ async openPhaseDetails() {
1443
+ await this.phaseLocator.locator(".phase-details").click();
1444
+ }
1445
+ async close() {
1446
+ await this.page.locator("button[type='button'] i[class='xl-icon close-icon']").click();
1447
+ }
1448
+ async expectStartDateToBeDisplayed() {
1449
+ await (0, $hOLA6$expect)(this.page.locator(".modal .start-date")).toBeVisible();
1450
+ }
1451
+ async expectDueDateToBeDisplayed() {
1452
+ await (0, $hOLA6$expect)(this.page.locator(".modal .due-date")).toBeVisible();
1453
+ }
1454
+ async expectEndDateToBeDisplayed() {
1455
+ await (0, $hOLA6$expect)(this.page.locator(".modal .end-date")).toBeVisible();
1456
+ }
1457
+ async setTitleFromPhaseDetails(title) {
1458
+ await this.page.locator("h4.phase-title").click();
1459
+ await this.page.locator("h4.phase-title input").fill(title);
1460
+ await this.page.locator("h4.phase-title input").press("Enter");
1461
+ await (0, $hOLA6$expect)(this.page.locator("h4.phase-title")).toContainText(title);
1462
+ }
1463
+ async setDueDateFromPhaseDetails(date, monthYear) {
1464
+ await this.dateUtil.openDatePicker(".modal .due-date .date-editor");
1465
+ await this.dateUtil.setDate(date, monthYear);
1466
+ }
1467
+ async setScheduledStartDateFromPhaseDetails(date, monthYear) {
1468
+ await this.dateUtil.openDatePicker(".modal .scheduled-start-date .date-editor");
1469
+ await this.dateUtil.setDate(date, monthYear);
1470
+ }
1471
+ async expectDurationToBe(duration) {
1472
+ await this.dateUtil.expectDurationToBe(duration);
1473
+ }
1474
+ async setDurationFromPhaseDetails(days, hours, mins) {
1475
+ await this.dateUtil.setDuration(days, hours, mins);
1476
+ }
1477
+ async expectDueTimeToBe(format, date) {
1478
+ await this.dateUtil.expectTimeToBe(".modal .due-date .time-picker-holder input", format, date);
1479
+ }
1480
+ async deleteTaskInPhase(taskName) {
1481
+ await this.page.locator(".task").filter({
1482
+ hasText: taskName
1483
+ }).locator(".xl-icon.options-icon").click();
1484
+ await this.page.locator(".remove-task-button").click();
1485
+ await (0, $hOLA6$expect)(this.page.getByRole("heading", {
1486
+ name: "Delete Task"
1487
+ })).toBeVisible();
1488
+ await this.page.getByRole("button", {
1489
+ name: "Delete"
1490
+ }).click();
1491
+ await (0, $hOLA6$expect)(this.phaseLocator.locator("li").filter({
1492
+ hasText: taskName
1493
+ })).not.toBeVisible();
1494
+ }
1495
+ async deletePhase(phaseName) {
1496
+ await this.phaseLocator.locator(".phase-header").filter({
1497
+ hasText: phaseName
1498
+ }).locator(".actions").hover();
1499
+ await this.phaseLocator.locator(".phase-header").filter({
1500
+ hasText: phaseName
1501
+ }).locator(".delete-icon").click();
1502
+ await (0, $hOLA6$expect)(this.page.getByRole("heading", {
1503
+ name: "Delete Phase"
1504
+ })).toBeVisible();
1505
+ await this.page.getByRole("button", {
1506
+ name: "Delete"
1507
+ }).click();
1508
+ await (0, $hOLA6$expect)(this.phaseLocator.locator(".phase-header").filter({
1509
+ hasText: phaseName
1510
+ })).not.toBeVisible();
1511
+ }
1068
1512
  }
1069
1513
 
1070
1514
 
@@ -1098,6 +1542,601 @@ class $c313b10398604df2$export$1533b625ec0c75e2 extends (0, $9626bc9256ce31f7$ex
1098
1542
  }
1099
1543
 
1100
1544
 
1545
+ class $b14c3492cf934ea2$export$e40b5d3c74b04c89 {
1546
+ static codePointA = 65;
1547
+ static codePointZ = 90;
1548
+ static getString() {
1549
+ return Math.random().toString(36).substring(2);
1550
+ }
1551
+ static getNumber(min, max) {
1552
+ return Math.floor(Math.random() * (max - min + 1) + min);
1553
+ }
1554
+ static getAlphabetsString(length) {
1555
+ let alphabets = "";
1556
+ for(let i = 0; i < length; i++)alphabets += String.fromCharCode($b14c3492cf934ea2$export$e40b5d3c74b04c89.getNumber($b14c3492cf934ea2$export$e40b5d3c74b04c89.codePointA, $b14c3492cf934ea2$export$e40b5d3c74b04c89.codePointZ));
1557
+ return alphabets;
1558
+ }
1559
+ }
1560
+
1561
+
1562
+
1563
+
1564
+
1565
+
1566
+
1567
+
1568
+
1569
+ class $d13e78163af94d50$export$9b9454a7f137e99b extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1570
+ constructor(page){
1571
+ super(page);
1572
+ this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
1573
+ this.addName = page.locator('.xl-react-components input[placeholder="Add..."]');
1574
+ this.addDescription = page.getByPlaceholder("Set description...");
1575
+ }
1576
+ async clickNewDeliveryPattern() {
1577
+ await this.page.getByTestId("dot-button").click();
1578
+ await (0, $hOLA6$expect)(this.page.getByRole("heading", {
1579
+ name: "Create delivery pattern"
1580
+ })).toBeVisible();
1581
+ }
1582
+ async setPatternName(patternName) {
1583
+ await this.addName.click();
1584
+ await this.addName.clear();
1585
+ await this.addName.fill(patternName);
1586
+ }
1587
+ async setPatternDescription(patternDescription) {
1588
+ await this.page.getByPlaceholder("Set description...").click();
1589
+ await this.page.getByPlaceholder("Set description...").clear();
1590
+ await this.page.getByPlaceholder("Set description...").fill(patternDescription);
1591
+ }
1592
+ async enableAutoComplete() {
1593
+ await this.page.getByRole("checkbox").check();
1594
+ }
1595
+ async disableAutoComplete() {
1596
+ await this.page.getByRole("checkbox").uncheck();
1597
+ }
1598
+ async setDuration(month, days, hours) {
1599
+ await this.page.getByRole("group", {
1600
+ name: "Pattern details"
1601
+ }).getByRole("textbox").click();
1602
+ await this.page.locator('input[name="months"]').click();
1603
+ await this.page.locator('input[name="months"]').fill(month.toString());
1604
+ await this.page.locator('input[name="days"]').click();
1605
+ await this.page.locator('input[name="days"]').fill(days.toString());
1606
+ await this.page.locator('input[name="hours"]').click();
1607
+ await this.page.locator('input[name="hours"]').fill(hours.toString());
1608
+ }
1609
+ async createNewPattern(patternName, patternDescription) {
1610
+ await this.clickNewDeliveryPattern();
1611
+ await this.setPatternName(patternName);
1612
+ await this.setPatternDescription(patternDescription);
1613
+ await (0, $hOLA6$expect)(this.page.locator(".action-toolbar-actions button").filter({
1614
+ hasText: "Create"
1615
+ })).toBeEnabled();
1616
+ await this.page.locator(".action-toolbar-actions button").filter({
1617
+ hasText: "Create"
1618
+ }).click({
1619
+ force: true
1620
+ });
1621
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Delivery flow")).toBeVisible();
1622
+ }
1623
+ async clickEditPatternIcon(patternName) {
1624
+ await this.page.locator(".delivery-pattern-row").filter({
1625
+ hasText: patternName
1626
+ }).locator(".edit").click();
1627
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Delivery flow")).toBeVisible();
1628
+ }
1629
+ async clickCopyPatternIcon(patternName) {
1630
+ await this.page.locator(".delivery-pattern-row").filter({
1631
+ hasText: patternName
1632
+ }).locator(".copy").click();
1633
+ await (0, $hOLA6$expect)(this.page.getByText("Copy delivery pattern")).toBeVisible();
1634
+ }
1635
+ async filterPatternByName(patternName) {
1636
+ await this.page.getByPlaceholder("Filter by name...").click();
1637
+ await this.page.getByPlaceholder("Filter by name...").clear();
1638
+ await this.page.getByPlaceholder("Filter by name...").fill(patternName);
1639
+ await this.page.getByPlaceholder("Filter by name...").press("Enter");
1640
+ await (0, $hOLA6$expect)(this.page.locator(".delivery-pattern-row").filter({
1641
+ hasText: patternName
1642
+ })).toBeVisible();
1643
+ }
1644
+ async openProperties() {
1645
+ await this.util.openSideNavMenu("Properties");
1646
+ return new $d13e78163af94d50$var$Properties(this.page);
1647
+ }
1648
+ async back() {
1649
+ await this.page.getByTestId("back-button").click();
1650
+ }
1651
+ async copyPattern(existingPatternName, NewPatternName) {
1652
+ await this.clickCopyPatternIcon(existingPatternName);
1653
+ await this.page.locator(".xl-icon.close-icon").first().click();
1654
+ await this.addName.fill(NewPatternName);
1655
+ await this.page.getByRole("button", {
1656
+ name: "Continue"
1657
+ }).click();
1658
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Delivery flow")).toBeVisible();
1659
+ }
1660
+ async clickDeletePattern(patternName) {
1661
+ await this.page.locator(".delivery-pattern-row").filter({
1662
+ hasText: patternName
1663
+ }).locator(".delete").click();
1664
+ await (0, $hOLA6$expect)(this.page.getByText("Delete delivery pattern", {
1665
+ exact: true
1666
+ })).toBeVisible();
1667
+ await this.page.getByRole("button", {
1668
+ name: "Delete"
1669
+ }).click();
1670
+ await (0, $hOLA6$expect)(this.page.locator(".delivery-pattern-row").filter({
1671
+ hasText: patternName
1672
+ })).not.toBeVisible();
1673
+ }
1674
+ }
1675
+ class $d13e78163af94d50$var$Properties extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1676
+ constructor(page){
1677
+ super(page);
1678
+ this.addName = page.locator('.xl-react-components input[placeholder="Add..."]');
1679
+ this.addDescription = page.getByPlaceholder("Set description...");
1680
+ }
1681
+ async editName(name) {
1682
+ await this.addName.click();
1683
+ await this.addName.clear();
1684
+ await this.addName.fill(name);
1685
+ }
1686
+ async editDescription(description) {
1687
+ await this.page.getByPlaceholder("Set description...").click();
1688
+ await this.page.getByPlaceholder("Set description...").clear();
1689
+ await this.page.getByPlaceholder("Set description...").fill(description);
1690
+ }
1691
+ async editDuration(month, days, hours) {
1692
+ await this.page.getByRole("group", {
1693
+ name: "Pattern details"
1694
+ }).getByRole("textbox").click();
1695
+ await this.page.locator('input[name="months"]').click();
1696
+ await this.page.locator('input[name="months"]').fill(month.toString());
1697
+ await this.page.locator('input[name="days"]').click();
1698
+ await this.page.locator('input[name="days"]').fill(days.toString());
1699
+ await this.page.locator('input[name="hours"]').click();
1700
+ await this.page.locator('input[name="hours"]').fill(hours.toString());
1701
+ }
1702
+ async save() {
1703
+ await this.page.getByRole("button", {
1704
+ name: "Save"
1705
+ }).click();
1706
+ (0, $hOLA6$expect)(await this.page.locator(".saved-text").textContent()).toContain("Last saved on ");
1707
+ }
1708
+ }
1709
+
1710
+
1711
+
1712
+
1713
+
1714
+
1715
+ class $27cd192f30944b0c$export$572f40d328c1d028 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1716
+ constructor(page){
1717
+ super(page);
1718
+ this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
1719
+ this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
1720
+ this.newReleaseGroupButton = page.getByTestId("dot-button");
1721
+ this.dateMonth = new Date();
1722
+ }
1723
+ async createGroup(groupName, startDate, endDate) {
1724
+ await this.newReleaseGroupButton.click();
1725
+ await (0, $hOLA6$expect)(this.page.getByText("Create new release group")).toBeVisible();
1726
+ await this.enterGroupName(groupName);
1727
+ const monthYear = await this.dateUtil.getCurrentMonthYear();
1728
+ if (startDate) await this.enterStartDate(startDate, monthYear);
1729
+ if (endDate) await this.enterEndDate(endDate, monthYear);
1730
+ await this.clickCreate();
1731
+ await this.expectSuccessMessageOnReleaseGroupCreation();
1732
+ }
1733
+ async addReleaseToGroup(releaseName) {
1734
+ await (0, $hOLA6$expect)(this.page.locator(".action-toolbar-actions button").filter({
1735
+ hasText: "Add release"
1736
+ })).toBeEnabled();
1737
+ await this.page.locator(".action-toolbar-actions button").filter({
1738
+ hasText: "Add release"
1739
+ }).click({
1740
+ force: true
1741
+ });
1742
+ await this.page.getByPlaceholder("Search for a release...").click();
1743
+ await this.page.getByPlaceholder("Search for a release...").fill(releaseName);
1744
+ await this.page.keyboard.press("Enter");
1745
+ await this.page.locator("release-list-modal-release-row").filter({
1746
+ hasText: releaseName
1747
+ }).getByRole("checkbox").check();
1748
+ await this.page.getByRole("button", {
1749
+ name: "Add"
1750
+ }).click();
1751
+ await this.expectSuccessMessageOnAddingReleaseToGroup();
1752
+ await (0, $hOLA6$expect)(this.page.getByRole("link", {
1753
+ name: releaseName
1754
+ })).toBeVisible();
1755
+ }
1756
+ async editReleaseGroupName(newGroupName) {
1757
+ await this.page.locator("#title").click();
1758
+ await this.page.locator("#title").clear();
1759
+ await this.page.locator("#title").fill(newGroupName);
1760
+ }
1761
+ async enterGroupName(groupName) {
1762
+ await this.page.locator("#title").click();
1763
+ await this.page.locator("#title").fill(groupName);
1764
+ }
1765
+ async enterStartDate(date, monthYear) {
1766
+ await this.page.locator(".form-group").filter({
1767
+ hasText: "start date"
1768
+ }).locator(".date input").click();
1769
+ await this.dateUtil.setDate(date, monthYear);
1770
+ }
1771
+ async enterEndDate(date, monthYear) {
1772
+ await this.page.locator(".form-group").filter({
1773
+ hasText: "end date"
1774
+ }).locator(".date input").click();
1775
+ await this.dateUtil.setDate(date, monthYear);
1776
+ }
1777
+ async clickCreate() {
1778
+ await this.page.getByRole("button", {
1779
+ name: "Create"
1780
+ }).click();
1781
+ }
1782
+ async expectSuccessMessageOnReleaseGroupCreation() {
1783
+ await (0, $hOLA6$expect)(this.page.getByLabel("success")).toBeVisible();
1784
+ await (0, $hOLA6$expect)(this.page.locator(".success").filter({
1785
+ hasText: "Created release group successfully"
1786
+ })).toBeVisible();
1787
+ }
1788
+ async expectSuccessMessageOnAddingReleaseToGroup() {
1789
+ await (0, $hOLA6$expect)(this.page.getByLabel("success")).toBeVisible();
1790
+ await (0, $hOLA6$expect)(this.page.locator(".success").filter({
1791
+ hasText: "Added release to release group successfully"
1792
+ })).toBeVisible();
1793
+ }
1794
+ async expectSuccessMessageOnUpdatingGroup() {
1795
+ await (0, $hOLA6$expect)(this.page.getByLabel("success")).toBeVisible();
1796
+ await (0, $hOLA6$expect)(this.page.locator(".success").filter({
1797
+ hasText: "Updated release group successfully"
1798
+ })).toBeVisible();
1799
+ }
1800
+ async searchReleaseGroupByTitle(title) {
1801
+ await this.page.getByPlaceholder("Search for groups...", {
1802
+ exact: true
1803
+ }).click();
1804
+ await this.page.getByPlaceholder("Search for groups...", {
1805
+ exact: true
1806
+ }).fill(title);
1807
+ await this.page.getByPlaceholder("Search for groups...", {
1808
+ exact: true
1809
+ }).press("Enter");
1810
+ await (0, $hOLA6$expect)(this.page.locator(".fc-list-item-title")).toContainText(title);
1811
+ }
1812
+ async deleteReleaseGroup(title) {
1813
+ await this.page.locator(".fc-list-item-line").filter({
1814
+ hasText: title
1815
+ }).locator(".fc-item-delete").click();
1816
+ await this.page.getByRole("button", {
1817
+ name: "Delete"
1818
+ }).click();
1819
+ }
1820
+ async clickReleaseGroupEdit(title) {
1821
+ await this.page.locator(".fc-list-item-line").filter({
1822
+ hasText: title
1823
+ }).locator(".fc-item-update").click();
1824
+ }
1825
+ async clickSave() {
1826
+ await this.page.getByRole("button", {
1827
+ name: "Save"
1828
+ }).click();
1829
+ }
1830
+ async clickCancel() {
1831
+ await this.page.getByRole("button", {
1832
+ name: "Cancel"
1833
+ }).click();
1834
+ }
1835
+ async clickOnStatusField() {
1836
+ await this.page.locator(".ci-filter-status.ng-isolate-scope").click();
1837
+ }
1838
+ async statusFilter(statusNames) {
1839
+ await this.clickOnStatusClearAll();
1840
+ await this.clickOnStatusField();
1841
+ for(let i = 0; i < statusNames.length; i++)await this.page.locator(`i.xl-icon.icon-s.checkbox[data='${statusNames[i]}']`).click();
1842
+ }
1843
+ async clickOnStatusClearAll() {
1844
+ await this.clickOnStatusField();
1845
+ await this.page.locator("a.xl-react-link", {
1846
+ hasText: "Clear all"
1847
+ }).click();
1848
+ }
1849
+ async clickOnStatusSelectAll() {
1850
+ await this.clickOnStatusField();
1851
+ await this.page.locator("a.xl-react-link", {
1852
+ hasText: "Select all"
1853
+ }).click();
1854
+ }
1855
+ }
1856
+
1857
+
1858
+ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1859
+ constructor(page){
1860
+ super(page);
1861
+ this.expandButton = this.page.getByRole("button", {
1862
+ name: " Expand"
1863
+ });
1864
+ this.folderGroupsPage = new (0, $27cd192f30944b0c$export$572f40d328c1d028)(page);
1865
+ this.patternPage = new (0, $d13e78163af94d50$export$9b9454a7f137e99b)(page);
1866
+ this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
1867
+ }
1868
+ async openFoldersPage() {
1869
+ await this.page.goto("./#/folders");
1870
+ await (0, $hOLA6$expect)(this.page).toHaveTitle("Folders - Digital.ai Release");
1871
+ return this;
1872
+ }
1873
+ async backToAllFolders() {
1874
+ await this.page.locator(".icon-back.dot-i").click();
1875
+ await (0, $hOLA6$expect)(this.page).toHaveTitle("Folders - Digital.ai Release");
1876
+ await this.page.locator("button.btn-add-folder").isVisible();
1877
+ return this;
1878
+ }
1879
+ async createFolder(folderName) {
1880
+ await this.page.getByRole("button", {
1881
+ name: " Add folder"
1882
+ }).click();
1883
+ await (0, $hOLA6$expect)(this.page.getByText("Create a new folder in root")).toBeVisible();
1884
+ await this.page.getByRole("textbox").fill(folderName);
1885
+ await this.page.getByRole("button", {
1886
+ name: "Create"
1887
+ }).click();
1888
+ await (0, $hOLA6$expect)(this.page.getByRole("link", {
1889
+ name: folderName
1890
+ })).toBeVisible();
1891
+ return this;
1892
+ }
1893
+ async openFolder(folderName) {
1894
+ await this.page.getByTitle(folderName).waitFor({
1895
+ timeout: 500
1896
+ });
1897
+ await this.page.getByTitle(folderName).click();
1898
+ await (0, $hOLA6$expect)(this.page.locator(".MuiBreadcrumbs-li").getByRole("link", {
1899
+ name: `${folderName}`
1900
+ })).toBeVisible();
1901
+ return this;
1902
+ }
1903
+ async openGroups() {
1904
+ await this.util.openSideNavMenu("Groups");
1905
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Groups")).toBeVisible();
1906
+ return this.folderGroupsPage;
1907
+ }
1908
+ async createGroup(groupName) {
1909
+ await this.page.locator("//button[normalize-space()='New release group']").click();
1910
+ await this.page.locator("#title").type(groupName);
1911
+ await this.page.locator("button[type='submit']").click();
1912
+ return this;
1913
+ }
1914
+ async selectPlannedStatus() {
1915
+ await this.page.locator(".remaining-tags").click();
1916
+ await this.page.locator('.xl-react-link:text-is("Clear all")').click();
1917
+ await this.page.locator(".react-tagsinput").click();
1918
+ await this.page.locator(`.yt-option[title=Planned]`).click();
1919
+ await this.page.locator("//span[normalize-space()='Status']").click();
1920
+ return this;
1921
+ }
1922
+ async expectReleaseGroupisDisplayed(title) {
1923
+ //await this.page.locator(`.fc-list-item-title-wrapper .fc-list-item-title strong:text-is('${title}`).isVisible()
1924
+ await this.page.waitForSelector(`.fc-list-item-title-wrapper .fc-list-item-title strong:text-is('${title}')`);
1925
+ return this;
1926
+ }
1927
+ async createSubFolder(parentFolder, subFolderName) {
1928
+ await this.clickExpandButton();
1929
+ await this.page.getByRole("link", {
1930
+ name: parentFolder
1931
+ }).hover();
1932
+ await this.clickFolderOptions(parentFolder, "add");
1933
+ await this.page.getByRole("textbox").fill(subFolderName);
1934
+ await this.page.getByRole("button", {
1935
+ name: "Create"
1936
+ }).click();
1937
+ await (0, $hOLA6$expect)(this.page.getByRole("link", {
1938
+ name: subFolderName
1939
+ })).toBeVisible();
1940
+ }
1941
+ async renameFolder(existingFolderName, newFolderName) {
1942
+ await this.clickExpandButton();
1943
+ await this.page.getByRole("link", {
1944
+ name: existingFolderName
1945
+ }).hover();
1946
+ await this.clickFolderOptions(existingFolderName, "edit");
1947
+ await this.page.locator(".folder-row-wrapper input").click();
1948
+ await this.page.locator(".folder-row-wrapper input").fill(newFolderName);
1949
+ await this.page.keyboard.press("Enter");
1950
+ await (0, $hOLA6$expect)(this.page.getByRole("link", {
1951
+ name: newFolderName
1952
+ })).toBeVisible();
1953
+ }
1954
+ async deleteFolder(folderName) {
1955
+ await this.clickExpandButton();
1956
+ await this.page.getByRole("link", {
1957
+ name: folderName
1958
+ }).hover();
1959
+ await this.clickFolderOptions(folderName, "delete");
1960
+ await (0, $hOLA6$expect)(this.page.getByRole("heading", {
1961
+ name: "Delete folder"
1962
+ }).locator("span")).toBeVisible();
1963
+ await (0, $hOLA6$expect)(this.page.locator(".xl-react-modal .confirmation-content").getByText("You are about to delete the folder " + folderName + ". Folders nested in " + folderName + " will also be deleted.")).toBeVisible();
1964
+ await this.page.getByRole("button", {
1965
+ name: "Delete"
1966
+ }).click();
1967
+ await (0, $hOLA6$expect)(this.page.getByRole("link", {
1968
+ name: folderName
1969
+ })).not.toBeVisible();
1970
+ }
1971
+ async searchFolderByName(folderName) {
1972
+ await this.page.getByPlaceholder("Search folder...").click();
1973
+ await this.page.getByPlaceholder("Search folder...").clear();
1974
+ await this.page.getByPlaceholder("Search folder...").fill(folderName);
1975
+ await this.page.getByPlaceholder("Search folder...").press("Enter");
1976
+ await (0, $hOLA6$expect)(this.page.getByRole("link", {
1977
+ name: folderName
1978
+ })).toBeVisible();
1979
+ }
1980
+ async openPatterns() {
1981
+ await this.util.openSideNavMenu("Patterns");
1982
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Patterns")).toBeVisible();
1983
+ return this.patternPage;
1984
+ }
1985
+ async clickFolderOptions(folderName, option) {
1986
+ await this.page.locator(".folder-row-wrapper", {
1987
+ hasText: folderName
1988
+ }).locator(`.xl-icon.${option}-icon`).click();
1989
+ }
1990
+ async clickExpandButton() {
1991
+ if (await this.expandButton.isEnabled()) await this.expandButton.click();
1992
+ }
1993
+ }
1994
+
1995
+
1996
+
1997
+
1998
+
1999
+ class $3df1257265fba073$export$74ca1eaaa9a0054 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
2000
+ constructor(page){
2001
+ super(page);
2002
+ this.addListValue = this.page.locator(".variable-selector .xl-components-input-full input");
2003
+ this.addVariableValue = this.page.locator(".variable-value .xl-components-input-full input");
2004
+ this.addVariablelabel = this.page.locator(".variable-label input");
2005
+ this.listAddButton = this.page.getByRole("button", {
2006
+ name: "Add"
2007
+ });
2008
+ }
2009
+ async addVariableText(valuename) {
2010
+ await this.page.getByRole("combobox").selectOption("StringVariable");
2011
+ await this.page.locator(".variable-value").type(valuename);
2012
+ await this.submitTheVariable();
2013
+ }
2014
+ async addVariableListbox(possiblevalue) {
2015
+ await this.page.getByRole("combobox").selectOption("DropDownListBox");
2016
+ await this.addListValue.fill(possiblevalue);
2017
+ await this.listAddButton.click();
2018
+ await this.page.getByRole("combobox").nth(1).selectOption(possiblevalue);
2019
+ await this.submitTheVariable();
2020
+ }
2021
+ async addVariablePassword(possiblevalue) {
2022
+ await this.page.getByRole("combobox").selectOption("PasswordStringVariable");
2023
+ await this.page.locator('input[type="password"]').type(possiblevalue);
2024
+ await this.submitTheVariable();
2025
+ }
2026
+ async addVariableCheckbox() {
2027
+ await this.page.getByRole("combobox").selectOption("BooleanVariable");
2028
+ await this.page.getByRole("checkbox").check();
2029
+ await this.submitTheVariable();
2030
+ }
2031
+ async addVariableNumber(possiblevalue) {
2032
+ await this.page.getByRole("combobox").selectOption("IntegerVariable");
2033
+ await this.page.locator('input[ng-model="var.value"]').fill(possiblevalue);
2034
+ await this.submitTheVariable();
2035
+ }
2036
+ async addVariableList(possiblevalue1, possiblevalue2) {
2037
+ await this.page.getByRole("combobox").selectOption("ListStringVariable");
2038
+ await this.addVariableValue.fill(possiblevalue1);
2039
+ await this.listAddButton.click();
2040
+ await this.addVariableValue.fill(possiblevalue2);
2041
+ await this.listAddButton.click();
2042
+ await this.submitTheVariable();
2043
+ }
2044
+ async addVariableMultiList(possiblevalue1, possiblevalue2) {
2045
+ await this.page.getByRole("combobox").selectOption("MultiSelectListBox");
2046
+ await this.addListValue.fill(possiblevalue1);
2047
+ await this.listAddButton.click();
2048
+ await this.addListValue.fill(possiblevalue2);
2049
+ await this.listAddButton.click();
2050
+ await this.page.locator(".react-tagsinput").click();
2051
+ await this.page.getByText("Select all", {
2052
+ exact: true
2053
+ }).click();
2054
+ await this.submitTheVariable();
2055
+ }
2056
+ async addVariableDate() {
2057
+ await this.page.getByRole("combobox").selectOption("DateVariable");
2058
+ await this.page.getByText("Select date").click();
2059
+ }
2060
+ async setDate(date, monthYear) {
2061
+ const dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(this.page);
2062
+ await dateUtil.setDate(date, monthYear);
2063
+ }
2064
+ async addVariableKeyValueMap(keys1, values1) {
2065
+ await this.page.getByRole("combobox").selectOption("MapStringStringVariable");
2066
+ await this.page.getByPlaceholder("key").fill(keys1);
2067
+ await this.page.getByPlaceholder("Value").fill(values1);
2068
+ await this.listAddButton.click();
2069
+ await this.page.locator(".xl-map-string-string-div-buttons .search-icon").click();
2070
+ await this.page.getByRole("row", {
2071
+ name: "Search"
2072
+ }).getByRole("textbox").fill(keys1);
2073
+ const detail = await this.page.locator("table.table-condensed span").allInnerTexts();
2074
+ await (0, $hOLA6$expect)(detail[0]).toEqual(keys1);
2075
+ await (0, $hOLA6$expect)(detail[1]).toEqual(values1);
2076
+ await this.submitTheVariable();
2077
+ }
2078
+ async addVariableSet(possiblevalue1) {
2079
+ await this.page.getByRole("combobox").selectOption("SetStringVariable");
2080
+ await this.page.locator(".dip-input input").fill(possiblevalue1);
2081
+ await this.listAddButton.click();
2082
+ await this.submitTheVariable();
2083
+ }
2084
+ async addNewVariable(variableName, labelname, description) {
2085
+ await this.page.getByRole("button", {
2086
+ name: "New global variable"
2087
+ }).click();
2088
+ await this.page.locator(`div.input-group > input`).type(variableName);
2089
+ await this.addVariablelabel.fill(labelname);
2090
+ await this.page.locator(".variable-description input").fill(description);
2091
+ }
2092
+ async verifyGlobalVariableCreation(variableName) {
2093
+ await this.page.locator("[id='variables-filter']").fill(variableName);
2094
+ await (0, $hOLA6$expect)(this.page.locator(".variable.ui-sortable-handle").filter({
2095
+ hasText: variableName
2096
+ })).toBeVisible();
2097
+ }
2098
+ async submitTheVariable() {
2099
+ const pagesubmit = await this.page.locator(".button.save");
2100
+ await pagesubmit.hover();
2101
+ await pagesubmit.click();
2102
+ }
2103
+ async deleteGlobalVariable(variableName) {
2104
+ await this.page.locator("[id='variables-filter']").fill(variableName);
2105
+ await this.page.getByText("Delete").click();
2106
+ await (0, $hOLA6$expect)(this.page.locator("h4.ng-binding")).toContainText(variableName);
2107
+ await this.page.getByRole("button", {
2108
+ name: "Cancel"
2109
+ }).click();
2110
+ await this.verifyGlobalVariableCreation(variableName);
2111
+ await this.page.getByText("Delete").click();
2112
+ await this.page.getByRole("button", {
2113
+ name: "Delete"
2114
+ }).click();
2115
+ await this.page.locator("alert.notice.ng-scope").isVisible();
2116
+ }
2117
+ async editVariable(variableName, editedvariabletext) {
2118
+ await this.page.locator("[id='variables-filter']").fill(variableName);
2119
+ await this.page.getByText("Edit").click();
2120
+ await this.addVariablelabel.clear();
2121
+ await this.addVariablelabel.fill(editedvariabletext);
2122
+ await this.page.getByRole("button", {
2123
+ name: "Save"
2124
+ }).click();
2125
+ await (0, $hOLA6$expect)(this.page.locator(".variable.ui-sortable-handle").getByText(editedvariabletext, {
2126
+ exact: true
2127
+ })).toBeVisible();
2128
+ }
2129
+ }
2130
+
2131
+
2132
+
2133
+ class $2174535b78371022$export$36d69433c4f81145 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
2134
+ constructor(page){
2135
+ super(page);
2136
+ }
2137
+ }
2138
+
2139
+
1101
2140
 
1102
2141
 
1103
2142
  class $6720a523bcb1cce0$export$3cac5fd37ae64b91 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
@@ -1167,11 +2206,13 @@ class $21185a378c23589e$export$e2e2e1ffdce20c30 extends (0, $9626bc9256ce31f7$ex
1167
2206
  }
1168
2207
 
1169
2208
 
2209
+
1170
2210
  class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1171
2211
  constructor(page){
1172
2212
  super(page);
1173
2213
  this.page = page;
1174
2214
  this.modal = new (0, $21185a378c23589e$export$e2e2e1ffdce20c30)(page);
2215
+ this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
1175
2216
  }
1176
2217
  async openUsersPage() {
1177
2218
  this.page.goto("./#/users", {
@@ -1208,6 +2249,18 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
1208
2249
  }).locator("i").nth(1).click();
1209
2250
  await this.modal.delete();
1210
2251
  }
2252
+ async openRoles() {
2253
+ await this.util.openSideNavMenu("Roles");
2254
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Roles")).toBeVisible();
2255
+ }
2256
+ async openPermissions() {
2257
+ await this.util.openSideNavMenu("Permissions");
2258
+ await (0, $hOLA6$expect)(this.page.locator(".permissions-table-v2")).toBeVisible();
2259
+ }
2260
+ async openTaskAccess() {
2261
+ await this.util.openSideNavMenu("Task access");
2262
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Task access")).toBeVisible();
2263
+ }
1211
2264
  }
1212
2265
 
1213
2266
 
@@ -1457,12 +2510,150 @@ class $3a340a3f4fd8f04d$export$43682cddead1dd78 extends (0, $9626bc9256ce31f7$ex
1457
2510
 
1458
2511
 
1459
2512
 
2513
+ class $cc2d15e53de5cef7$export$b6fbc3e67030138f extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
2514
+ async setStatus(status) {
2515
+ await this.page.locator(".react-tagsinput").click({
2516
+ force: true
2517
+ });
2518
+ await this.page.getByText("Clear all").click();
2519
+ await this.page.locator(".react-tagsinput").click({
2520
+ force: true
2521
+ });
2522
+ if (status === "Select all") await this.page.getByText(status).click();
2523
+ else await this.page.getByTitle(status).locator("i").first().click();
2524
+ }
2525
+ async openReleaseGroup(title) {
2526
+ await this.page.locator("xlr-release-group-row").filter({
2527
+ hasText: title
2528
+ }).getByRole("link").click();
2529
+ await this.page.getByTitle(title).click();
2530
+ await (0, $hOLA6$expect)(this.page).toHaveURL(/.*ReleaseGroup/);
2531
+ }
2532
+ async expectReleaseGroupStatus(status) {
2533
+ await (0, $hOLA6$expect)(this.page.locator(".release-status")).toContainText(status);
2534
+ }
2535
+ async expectReleaseGroupDisplayed(title) {
2536
+ await (0, $hOLA6$expect)(this.page.getByText(title, {
2537
+ exact: true
2538
+ })).toBeVisible();
2539
+ }
2540
+ async expectReleaseGroupNotDisplayed(title) {
2541
+ await (0, $hOLA6$expect)(this.page.getByText(title, {
2542
+ exact: true
2543
+ })).not.toBeVisible();
2544
+ }
2545
+ async searchReleaseGroupByTitle(title) {
2546
+ await this.page.getByPlaceholder("Search for groups...", {
2547
+ exact: true
2548
+ }).click();
2549
+ await this.page.getByPlaceholder("Search for groups...", {
2550
+ exact: true
2551
+ }).fill(title);
2552
+ await this.page.getByPlaceholder("Search for groups...", {
2553
+ exact: true
2554
+ }).press("Enter");
2555
+ }
2556
+ async deleteReleaseGroup(title) {
2557
+ await this.page.locator(".fc-list-item-line").filter({
2558
+ hasText: title
2559
+ }).locator(".fc-item-delete").click();
2560
+ await this.page.getByRole("button", {
2561
+ name: "Delete"
2562
+ }).click();
2563
+ }
2564
+ async clickReleaseGroupEdit(title) {
2565
+ await this.page.locator(".fc-list-item-line").filter({
2566
+ hasText: title
2567
+ }).locator(".fc-item-update").click();
2568
+ }
2569
+ async enterReleaseGroupDetails(new_title) {
2570
+ await this.page.locator(".modal-body").locator("#title").fill(new_title);
2571
+ }
2572
+ async clickSaveButton() {
2573
+ await this.page.locator(".modal-footer").getByRole("button", {
2574
+ name: "Save"
2575
+ }).click();
2576
+ }
2577
+ async clickCancelButton() {
2578
+ await this.page.locator(".modal-footer").getByRole("button", {
2579
+ name: "Cancel"
2580
+ }).click();
2581
+ }
2582
+ }
2583
+
2584
+
2585
+
2586
+
2587
+ class $cc231ea61b77c7a2$export$1a0994e9c202d529 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
2588
+ async expectReleaseDisplayed(title) {
2589
+ await (0, $hOLA6$expect)(this.page.getByText(title, {
2590
+ exact: true
2591
+ })).toBeVisible();
2592
+ }
2593
+ async expectReleaseNotDisplayed(title) {
2594
+ await (0, $hOLA6$expect)(this.page.getByText(title, {
2595
+ exact: true
2596
+ })).not.toBeVisible({
2597
+ timeout: 10000
2598
+ });
2599
+ }
2600
+ async expectPhaseDisplayed(title) {
2601
+ await (0, $hOLA6$expect)(this.page.getByText(title, {
2602
+ exact: true
2603
+ })).toBeVisible();
2604
+ }
2605
+ async openContextMenu(title) {
2606
+ await this.page.locator(".timeline-row-name").filter({
2607
+ hasText: title
2608
+ }).locator(".options-icon").click();
2609
+ }
2610
+ async removeFromReleaseGroup() {
2611
+ await this.page.getByRole("menuitem", {
2612
+ name: "Remove from group"
2613
+ }).locator("a").click();
2614
+ await this.page.getByRole("button", {
2615
+ name: "Remove"
2616
+ }).click();
2617
+ }
2618
+ async expectNumberOfReleases(num_of_release) {
2619
+ const elementCount = await this.page.locator(".timeline-row-name-release").count();
2620
+ (0, $hOLA6$expect)(elementCount).toBe(num_of_release);
2621
+ }
2622
+ async openAddReleaseList() {
2623
+ await this.page.getByRole("button", {
2624
+ name: "Add release"
2625
+ }).click();
2626
+ }
2627
+ async filterReleases(title) {
2628
+ await this.page.getByPlaceholder("Search for a release...").click();
2629
+ await this.page.getByPlaceholder("Search for a release...").fill(title);
2630
+ await this.page.waitForTimeout(5000);
2631
+ await this.page.getByPlaceholder("Search for a release...").press("Enter");
2632
+ }
2633
+ async expectNumberOfReleasesOnModal(num_of_release) {
2634
+ const elementCount = await this.page.locator(".release-modal-line").count();
2635
+ (0, $hOLA6$expect)(elementCount).toBe(num_of_release);
2636
+ }
2637
+ async selectAllReleaseCheckbox() {
2638
+ await this.page.getByLabel("Select all").check();
2639
+ }
2640
+ async addReleasesToGroup() {
2641
+ await this.page.getByRole("button", {
2642
+ name: "Add"
2643
+ }).click();
2644
+ }
2645
+ }
2646
+
2647
+
2648
+
2649
+
1460
2650
 
1461
2651
 
1462
2652
  class $c37c93912f458e81$export$60c3bfa6385e2a10 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1463
2653
  constructor(page){
1464
2654
  super(page);
1465
2655
  this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
2656
+ this.commentBox = this.page.locator(`.input-block-level`);
1466
2657
  }
1467
2658
  async openTask(taskName) {
1468
2659
  await this.filterTaskByTitle(taskName);
@@ -1472,13 +2663,29 @@ class $c37c93912f458e81$export$60c3bfa6385e2a10 extends (0, $9626bc9256ce31f7$ex
1472
2663
  await this.page.locator(`.row.task-inner`, {
1473
2664
  hasText: taskName
1474
2665
  }).locator("span.skip").click();
1475
- await this.page.getByPlaceholder("Give feedback or place a comment...").click();
1476
- await this.page.getByPlaceholder("Give feedback or place a comment...").fill(comment);
2666
+ await this.commentBox.click();
2667
+ await this.commentBox.fill(comment);
1477
2668
  await this.page.getByRole("button", {
1478
2669
  name: "Skip",
1479
2670
  exact: true
1480
2671
  }).click();
1481
2672
  }
2673
+ async fail(taskName, comment) {
2674
+ await this.page.locator(`.row.task-inner`, {
2675
+ hasText: taskName
2676
+ }).locator("span.fail").click();
2677
+ await this.commentBox.click();
2678
+ await this.commentBox.fill(comment);
2679
+ await this.page.getByRole("button", {
2680
+ name: "Fail",
2681
+ exact: true
2682
+ }).click();
2683
+ }
2684
+ async waitForTaskFailed(taskName) {
2685
+ await (0, $hOLA6$expect)(this.page.locator(`.row.task-inner`, {
2686
+ hasText: taskName
2687
+ }).getByText("Failed")).toBeVisible();
2688
+ }
1482
2689
  async waitForTaskInProgress(taskName) {
1483
2690
  await (0, $hOLA6$expect)(this.page.locator(`.row.task-inner`, {
1484
2691
  hasText: taskName
@@ -1546,6 +2753,76 @@ class $c37c93912f458e81$export$60c3bfa6385e2a10 extends (0, $9626bc9256ce31f7$ex
1546
2753
  async clickOnAssigneeButton(title) {
1547
2754
  await this.page.locator(`.btn-group-filter.btn-group button.btn.btn-flat[title="${title}"]`).click();
1548
2755
  }
2756
+ async clickOnAssignedToMe() {
2757
+ await this.page.locator(`button[title="Assigned to me"]`).click();
2758
+ }
2759
+ async clickOnAssignedToMyTeams() {
2760
+ await this.page.locator(`button[title="Assigned to my teams"]`).click();
2761
+ }
2762
+ async clickOnAssignedToAllAvailable() {
2763
+ await this.page.locator(`button[title="All available"]`).click();
2764
+ }
2765
+ async expectTaskToNotBeDisplayed(taskTitle) {
2766
+ await (0, $hOLA6$expect)(this.page.locator(`.row.task-inner`).filter({
2767
+ hasText: taskTitle
2768
+ }).getByText(taskTitle)).toHaveCount(0);
2769
+ }
2770
+ async expectTaskToBeDisplayed(taskTitle) {
2771
+ await (0, $hOLA6$expect)(this.page.locator(`.row.task-inner`).filter({
2772
+ hasText: taskTitle
2773
+ }).getByText(taskTitle)).toHaveCount(1);
2774
+ }
2775
+ async expectTasksToBeDisplayed(tasks) {
2776
+ for (const [taskTitle, shouldBeDisplayed] of Object.entries(tasks))if (shouldBeDisplayed) await this.expectTaskToBeDisplayed(taskTitle);
2777
+ else await this.expectTaskToNotBeDisplayed(taskTitle);
2778
+ }
2779
+ async expectTasksDisplayedInOrder(expectedTasks) {
2780
+ for (const task of expectedTasks){
2781
+ const taskElement = await this.page.locator(`[data-release-title='${task.releaseTitle}'] .row .task`).nth(task.taskPosition);
2782
+ await (0, $hOLA6$expect)(taskElement).toHaveAttribute("data-task-title", task.taskTitle);
2783
+ }
2784
+ }
2785
+ async setOrderBy(orderBy) {
2786
+ await this.page.locator(".order-selector .btn:first-child").click();
2787
+ await this.page.locator(`.order-selector .bootstrap-link:has-text('${orderBy}')`).click();
2788
+ }
2789
+ async expectTaskCountForRelease(releaseTitle, expectedCount) {
2790
+ await (0, $hOLA6$expect)(this.page.locator(`#tasks-content #task-list-grouped-view div:has-text('${releaseTitle}') .task`)).toHaveCount(expectedCount);
2791
+ }
2792
+ async setSearchFilter(filterText) {
2793
+ await this.page.locator(".searchFilter").fill(filterText);
2794
+ }
2795
+ async clearSearchFilter() {
2796
+ await this.page.locator(".searchFilter").clear();
2797
+ }
2798
+ async setTagsFilter(filterText) {
2799
+ await this.page.locator(".tag-input").fill(filterText);
2800
+ await this.page.locator(".tag-input").press("Enter");
2801
+ }
2802
+ async clickOnStatusField() {
2803
+ await this.page.locator(".ci-filter-status.ng-isolate-scope").click();
2804
+ }
2805
+ async clickOnStatus(statusNames) {
2806
+ await this.clickOnStatusClearAll();
2807
+ await this.clickOnStatusField();
2808
+ for(let i = 0; i < statusNames.length; i++)await this.page.locator(`i.xl-icon.icon-s.checkbox[data='${statusNames[i]}']`).click();
2809
+ // Clicking outside to close the grid dropdown
2810
+ await this.clickOnTasksLabel();
2811
+ }
2812
+ async clickOnStatusClearAll() {
2813
+ await this.clickOnStatusField();
2814
+ await this.page.locator("a.xl-react-link", {
2815
+ hasText: "Clear all"
2816
+ }).click();
2817
+ await this.clickOnTasksLabel();
2818
+ }
2819
+ async clickOnStatusSelectAll() {
2820
+ await this.clickOnStatusField();
2821
+ await this.page.locator("a.xl-react-link", {
2822
+ hasText: "Select all"
2823
+ }).click();
2824
+ await this.clickOnTasksLabel();
2825
+ }
1549
2826
  async assignTaskToMe(title) {
1550
2827
  await this.page.locator(`.task-line`).filter({
1551
2828
  hasText: title
@@ -1561,35 +2838,22 @@ class $c37c93912f458e81$export$60c3bfa6385e2a10 extends (0, $9626bc9256ce31f7$ex
1561
2838
  async expectTaskTitle(taskTitle) {
1562
2839
  (0, $hOLA6$expect)(await this.page.locator("#tasks0").innerText()).toContain(taskTitle);
1563
2840
  }
2841
+ async clickOnTasksLabel() {
2842
+ await this.page.getByLabel("breadcrumb").getByText("Tasks").click();
2843
+ }
1564
2844
  async expectGroupView(expected = true) {
1565
2845
  if (expected) {
1566
- await (0, $hOLA6$expect)(this.page.locator("#group-tasks-by-release")).toBeChecked();
1567
- await (0, $hOLA6$expect)(this.page.locator("#task-list-grouped-view")).toBeVisible();
1568
- await (0, $hOLA6$expect)(this.page.locator("#task-ungrouped-view")).not.toBeVisible();
1569
- } else {
1570
- await (0, $hOLA6$expect)(this.page.locator("#group-tasks-by-release")).not.toBeChecked();
1571
- await (0, $hOLA6$expect)(this.page.locator("#task-list-grouped-view")).not.toBeVisible();
1572
- await (0, $hOLA6$expect)(this.page.locator("#task-ungrouped-view")).toBeVisible();
1573
- }
1574
- }
1575
- async changeGroupView() {
1576
- await this.page.locator("#group-tasks-by-release").click();
1577
- }
1578
- }
1579
-
1580
-
1581
-
1582
-
1583
- class $aa992f812fb1e470$export$6adb8dd3f0d1e432 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1584
- constructor(page){
1585
- super(page);
1586
- this.tempDir = "";
1587
- this.content = "";
2846
+ await (0, $hOLA6$expect)(this.page.locator("#group-tasks-by-release")).toBeChecked();
2847
+ await (0, $hOLA6$expect)(this.page.locator("#task-list-grouped-view")).toBeVisible();
2848
+ await (0, $hOLA6$expect)(this.page.locator("#task-ungrouped-view")).not.toBeVisible();
2849
+ } else {
2850
+ await (0, $hOLA6$expect)(this.page.locator("#group-tasks-by-release")).not.toBeChecked();
2851
+ await (0, $hOLA6$expect)(this.page.locator("#task-list-grouped-view")).not.toBeVisible();
2852
+ await (0, $hOLA6$expect)(this.page.locator("#task-ungrouped-view")).toBeVisible();
2853
+ }
1588
2854
  }
1589
- async createTempFile(fileName, testInfo) {
1590
- const content = fileName.toString();
1591
- const tempDir = testInfo.outputPath(fileName.toString());
1592
- $hOLA6$promises.writeFile(tempDir, content, "utf8");
2855
+ async changeGroupView() {
2856
+ await this.page.locator("#group-tasks-by-release").click();
1593
2857
  }
1594
2858
  }
1595
2859
 
@@ -1716,11 +2980,12 @@ class $e83a7515970cee7f$export$98de9bca7d44fc1a extends (0, $9626bc9256ce31f7$ex
1716
2980
  await this.page.locator("#release-form-title").fill(name);
1717
2981
  }
1718
2982
  async setDescription(description) {
1719
- await this.page.getByText("Set description...").click();
1720
- await this.page.locator("span").filter({
1721
- hasText: "Set description... * Save"
1722
- }).locator("i").first().click();
2983
+ await this.page.getByText("Set description...").hover();
2984
+ await this.page.locator(".display").filter({
2985
+ hasText: "Set description"
2986
+ }).locator(".edit-icon").click();
1723
2987
  await this.page.locator("textarea").click();
2988
+ await this.page.locator("textarea").clear();
1724
2989
  await this.page.locator("textarea").fill(description);
1725
2990
  await this.page.getByText("Save", {
1726
2991
  exact: true
@@ -1768,13 +3033,16 @@ class $8f36d138075416d2$export$899a7095bab1879d extends (0, $9626bc9256ce31f7$ex
1768
3033
  }
1769
3034
 
1770
3035
 
3036
+
1771
3037
  class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1772
3038
  constructor(page){
1773
3039
  super(page);
1774
3040
  this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
3041
+ this.phaseTitle = page.locator(".phase .phase-title");
1775
3042
  this.properties = new (0, $880dec03c4eca8dc$export$ccf2756779bad715)(page);
1776
3043
  this.createTemplatePage = new (0, $e83a7515970cee7f$export$98de9bca7d44fc1a)(page);
1777
3044
  this.triggers = new (0, $8f36d138075416d2$export$899a7095bab1879d)(page);
3045
+ this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
1778
3046
  }
1779
3047
  async openTemplateMenu(menuItem) {
1780
3048
  await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
@@ -1787,6 +3055,12 @@ class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$ex
1787
3055
  }).click();
1788
3056
  return this.taskDrawer;
1789
3057
  }
3058
+ async openTaskDrawerFromTableView(taskName) {
3059
+ await this.page.locator(".name-cell-title").getByText(taskName, {
3060
+ exact: true
3061
+ }).click();
3062
+ return this.taskDrawer;
3063
+ }
1790
3064
  async openTaskDrawerFromGrantt(taskName) {
1791
3065
  await this.page.locator(".gantt_tree_content").getByText(taskName, {
1792
3066
  exact: true
@@ -1794,19 +3068,39 @@ class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$ex
1794
3068
  return this.taskDrawer;
1795
3069
  }
1796
3070
  async openProperties() {
1797
- await this.openTemplateMenu("Properties");
3071
+ await this.util.openSideNavMenu("Properties");
3072
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Properties")).toBeVisible();
3073
+ }
3074
+ async openVariables() {
3075
+ await this.util.openSideNavMenu("Variables");
3076
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Variables")).toBeVisible();
3077
+ }
3078
+ async openRelationships() {
3079
+ await this.util.openSideNavMenu("Relationships");
3080
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Relationships")).toBeVisible();
3081
+ }
3082
+ async openTeamsPermissions() {
3083
+ await this.util.openSideNavMenu("Teams & Permissions");
3084
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Teams & Permissions")).toBeVisible();
3085
+ }
3086
+ async openDashboard() {
3087
+ await this.util.openSideNavMenu("Dashboard");
3088
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Dashboard")).toBeVisible();
3089
+ }
3090
+ async openActivityLogs() {
3091
+ await this.util.openSideNavMenu("Activity logs");
3092
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Activity logs")).toBeVisible();
1798
3093
  }
1799
3094
  async openTriggers() {
1800
3095
  await this.openTemplateMenu("Triggers");
3096
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Triggers")).toBeVisible();
1801
3097
  }
1802
3098
  async backToTemplate() {
1803
3099
  await this.page.locator(".icon-back").click();
1804
3100
  await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Templates")).toBeVisible();
1805
3101
  }
1806
3102
  async expectTemplateLabelToBePresent() {
1807
- await (0, $hOLA6$expect)(this.page.locator(".dot-chip").filter({
1808
- hasText: "TEMPLATE"
1809
- })).toBeVisible();
3103
+ await (0, $hOLA6$expect)(this.page.getByTestId("template-workflow-pill").getByText("Template")).toBeVisible();
1810
3104
  }
1811
3105
  async expectSubPage(menuItem, toBePresent) {
1812
3106
  if (toBePresent) await (0, $hOLA6$expect)(this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
@@ -1817,20 +3111,20 @@ class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$ex
1817
3111
  })).not.toBeVisible();
1818
3112
  }
1819
3113
  async openFlowView() {
1820
- await this.page.locator(".xl-icon.column-icon").click();
3114
+ await this.util.openSideNavMenu("Flow");
1821
3115
  await (0, $hOLA6$expect)(this.page.locator("#release-content")).toBeVisible();
1822
3116
  }
1823
3117
  async openTableView() {
1824
- await this.page.locator(".xl-icon.table-icon").click();
3118
+ await this.util.openSideNavMenu("Table");
1825
3119
  await (0, $hOLA6$expect)(this.page.locator(".release-grid-container")).toBeVisible();
1826
3120
  }
1827
3121
  async openPlannerView() {
1828
- await this.page.locator(".xl-icon.planner-icon").click();
3122
+ await this.util.openSideNavMenu("Planner");
1829
3123
  await (0, $hOLA6$expect)(this.page.locator(".gantt-container")).toBeVisible();
1830
3124
  }
1831
3125
  async openCodeView() {
1832
- await this.page.locator(".xl-icon.code-icon").click();
1833
- await (0, $hOLA6$expect)(this.page.locator("#dsl-content")).toBeVisible();
3126
+ await this.util.openSideNavMenu("Code");
3127
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Code")).toBeVisible();
1834
3128
  }
1835
3129
  async expandGanttFolder() {
1836
3130
  const icExpandTreeview1 = this.page.locator(".gantt_tree_icon.gantt_open");
@@ -1842,6 +3136,108 @@ class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$ex
1842
3136
  }
1843
3137
  }
1844
3138
  }
3139
+ async addNewPhase(phaseName) {
3140
+ await this.page.getByTestId("add-phase-btn").click();
3141
+ if (phaseName) {
3142
+ await this.phaseTitle.getByText("New Phase").click();
3143
+ await this.phaseTitle.getByRole("textbox").clear();
3144
+ await this.phaseTitle.getByRole("textbox").fill(phaseName);
3145
+ await this.page.keyboard.press("Enter");
3146
+ await (0, $hOLA6$expect)(this.phaseTitle.filter({
3147
+ hasText: phaseName
3148
+ })).toBeVisible();
3149
+ }
3150
+ }
3151
+ async renamePhase(oldPhaseName, newPhaseName) {
3152
+ await this.phaseTitle.getByText(oldPhaseName).click();
3153
+ await this.phaseTitle.filter({
3154
+ hasText: oldPhaseName
3155
+ }).locator(".editable").clear();
3156
+ await this.phaseTitle.filter({
3157
+ hasText: oldPhaseName
3158
+ }).locator(".editable").fill(newPhaseName);
3159
+ await this.page.keyboard.press("Enter");
3160
+ await (0, $hOLA6$expect)(this.phaseTitle.filter({
3161
+ hasText: newPhaseName
3162
+ })).toBeVisible();
3163
+ }
3164
+ getPhase(phaseName) {
3165
+ return new $0c4084f199d70d72$var$Phase(this.page, phaseName);
3166
+ }
3167
+ }
3168
+ class $0c4084f199d70d72$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
3169
+ constructor(page, phaseName){
3170
+ super(page);
3171
+ this.phaseLocator = page.locator(".phase", {
3172
+ hasText: phaseName
3173
+ });
3174
+ }
3175
+ async setTitle(title) {
3176
+ await this.phaseLocator.locator(".phase-header .display").click();
3177
+ await this.phaseLocator.locator(".phase-header input").clear();
3178
+ await this.phaseLocator.locator(".phase-header input").fill(title);
3179
+ await this.phaseLocator.locator(".phase-header input").blur();
3180
+ }
3181
+ async expectTaskBorderWithColor(taskName, color) {
3182
+ await (0, $hOLA6$expect)(this.page.locator(`.task-box:has-text('${taskName}')`)).toHaveCSS("border-top-color", color);
3183
+ }
3184
+ /**
3185
+ *
3186
+ * @param taskTitle Title of the task
3187
+ * @param taskType : Type of the task
3188
+ * @param taskTypeSelector : Selector of the task
3189
+ */ async addTaskInPhase(taskTitle, taskGroup, taskType) {
3190
+ await this.phaseLocator.getByText("Add task").click();
3191
+ await this.page.locator("#task-selector").hover();
3192
+ await this.page.locator('button[aria-label="Clear"]').click();
3193
+ await this.page.locator("#task-selector").fill(taskGroup);
3194
+ await this.page.getByTestId(taskType).click();
3195
+ await this.page.locator(".icon-close").click();
3196
+ await this.page.locator("#task-title").fill(taskTitle);
3197
+ await this.page.getByTestId("save-select-task-btn").click();
3198
+ await (0, $hOLA6$expect)(this.phaseLocator.getByText(taskTitle)).toBeVisible();
3199
+ }
3200
+ async getNumberOfTasks() {
3201
+ return await this.phaseLocator.locator(".task").count();
3202
+ }
3203
+ async expectToHaveNoneditableTitle(phaseTitle) {
3204
+ await (0, $hOLA6$expect)(this.phaseLocator.locator(".phase-title > span")).toContainText(phaseTitle);
3205
+ }
3206
+ async expectToHaveTitle(phaseTitle) {
3207
+ await (0, $hOLA6$expect)(this.phaseLocator.locator(".phase-title")).toContainText(phaseTitle);
3208
+ }
3209
+ async deleteTaskInPhase(taskName) {
3210
+ await this.page.locator(".task").filter({
3211
+ hasText: taskName
3212
+ }).locator(".xl-icon.options-icon").click();
3213
+ await this.page.locator(".remove-task-button").click();
3214
+ await (0, $hOLA6$expect)(this.page.getByRole("heading", {
3215
+ name: "Delete Task"
3216
+ })).toBeVisible();
3217
+ await this.page.getByRole("button", {
3218
+ name: "Delete"
3219
+ }).click();
3220
+ await (0, $hOLA6$expect)(this.phaseLocator.locator("li").filter({
3221
+ hasText: taskName
3222
+ })).not.toBeVisible();
3223
+ }
3224
+ async deletePhase(phaseName) {
3225
+ await this.page.locator(".phase-header").filter({
3226
+ hasText: phaseName
3227
+ }).locator(".actions").hover();
3228
+ await this.page.locator(".phase-header").filter({
3229
+ hasText: phaseName
3230
+ }).locator(".delete-icon").click();
3231
+ await (0, $hOLA6$expect)(this.page.getByRole("heading", {
3232
+ name: "Delete Phase"
3233
+ })).toBeVisible();
3234
+ await this.page.getByRole("button", {
3235
+ name: "Delete"
3236
+ }).click();
3237
+ await (0, $hOLA6$expect)(this.page.locator(".phase-header").filter({
3238
+ hasText: phaseName
3239
+ })).not.toBeVisible();
3240
+ }
1845
3241
  }
1846
3242
 
1847
3243
 
@@ -1871,8 +3267,47 @@ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$ex
1871
3267
  await this.page.getByRole("button", {
1872
3268
  name: "Continue"
1873
3269
  }).click();
1874
- await (0, $hOLA6$expect)(this.page.locator(".dot-chip").filter({
1875
- hasText: "TEMPLATE"
3270
+ await (0, $hOLA6$expect)(this.page.getByTestId("template-workflow-pill").getByText("Template")).toBeVisible();
3271
+ }
3272
+ async move(templateName, targetFolder) {
3273
+ await this.page.locator(".template").filter({
3274
+ hasText: templateName
3275
+ }).locator(".template-actions .move").click();
3276
+ await (0, $hOLA6$expect)(this.page.getByText("Move template to")).toBeVisible();
3277
+ if (await this.page.getByRole("button", {
3278
+ name: "Expand"
3279
+ }).isEnabled()) await this.page.getByRole("button", {
3280
+ name: "Expand"
3281
+ }).click();
3282
+ await this.page.getByPlaceholder("Search folder...").click();
3283
+ await this.page.getByPlaceholder("Search folder...").fill(targetFolder);
3284
+ await this.page.getByRole("button", {
3285
+ name: targetFolder
3286
+ }).click();
3287
+ await this.page.getByRole("button", {
3288
+ name: "Move"
3289
+ }).click();
3290
+ await (0, $hOLA6$expect)(this.page.getByText("Add", {
3291
+ exact: true
3292
+ })).toBeVisible();
3293
+ await (0, $hOLA6$expect)(this.page.getByText("Remove")).toBeVisible();
3294
+ await this.page.getByRole("button", {
3295
+ name: "Move"
3296
+ }).click();
3297
+ }
3298
+ async metaInformation(templateName, validationMsg) {
3299
+ await this.page.locator(".title").filter({
3300
+ hasText: templateName
3301
+ }).locator(".template-context-menu").click();
3302
+ await this.page.getByRole("menuitem", {
3303
+ name: "Meta information"
3304
+ }).locator("a").click();
3305
+ await (0, $hOLA6$expect)(this.page.getByRole("heading", {
3306
+ name: "Meta information - " + templateName
3307
+ })).toBeVisible();
3308
+ if (validationMsg) await (0, $hOLA6$expect)(this.page.getByText(validationMsg)).toBeVisible();
3309
+ await (0, $hOLA6$expect)(this.page.getByRole("button", {
3310
+ name: "Close"
1876
3311
  })).toBeVisible();
1877
3312
  }
1878
3313
  async expectTemplateVisible(title, expected = true) {
@@ -1893,6 +3328,7 @@ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$ex
1893
3328
  }
1894
3329
  }
1895
3330
  async delete(title) {
3331
+ await this.searchBy(title);
1896
3332
  await this.page.locator(".title").filter({
1897
3333
  hasText: title
1898
3334
  }).locator(".delete").waitFor();
@@ -1913,15 +3349,7 @@ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$ex
1913
3349
  }).click();
1914
3350
  }
1915
3351
  async openTemplateByName(templateName) {
1916
- await this.page.getByPlaceholder("Filter by title...", {
1917
- exact: true
1918
- }).click();
1919
- await this.page.getByPlaceholder("Filter by title...", {
1920
- exact: true
1921
- }).fill(templateName);
1922
- await this.page.getByPlaceholder("Filter by title...", {
1923
- exact: true
1924
- }).press("Enter");
3352
+ await this.filterByTitle(templateName);
1925
3353
  await this.page.locator(`.template`).filter({
1926
3354
  hasText: templateName
1927
3355
  }).locator(`.raised-link`).waitFor();
@@ -1929,162 +3357,51 @@ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$ex
1929
3357
  hasText: templateName
1930
3358
  }).locator(`.raised-link`).click();
1931
3359
  }
1932
- }
1933
-
1934
-
1935
-
1936
-
1937
- class $cc2d15e53de5cef7$export$b6fbc3e67030138f extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1938
- async setStatus(status) {
1939
- await this.page.locator(".react-tagsinput").click({
1940
- force: true
1941
- });
1942
- await this.page.getByText("Clear all").click();
1943
- await this.page.locator(".react-tagsinput").click({
1944
- force: true
1945
- });
1946
- if (status === "Select all") await this.page.getByText(status).click();
1947
- else await this.page.getByTitle(status).locator("i").first().click();
1948
- }
1949
- async openReleaseGroup(title) {
1950
- await this.page.locator("xlr-release-group-row").filter({
1951
- hasText: title
1952
- }).getByRole("link").click();
1953
- await this.page.getByTitle(title).click();
1954
- await (0, $hOLA6$expect)(this.page).toHaveURL(/.*ReleaseGroup/);
1955
- }
1956
- async expectReleaseGroupStatus(status) {
1957
- await (0, $hOLA6$expect)(this.page.locator(".release-status")).toContainText(status);
1958
- }
1959
- async expectReleaseGroupDisplayed(title) {
1960
- await (0, $hOLA6$expect)(this.page.getByText(title, {
1961
- exact: true
3360
+ async clickNewReleaseIcon(templateName) {
3361
+ await this.page.locator("xlr-template-row-component").filter({
3362
+ hasText: templateName
3363
+ }).locator(".link .add-icon").click();
3364
+ await (0, $hOLA6$expect)(this.page.getByRole("heading", {
3365
+ name: "Create new release"
1962
3366
  })).toBeVisible();
1963
3367
  }
1964
- async expectReleaseGroupNotDisplayed(title) {
1965
- await (0, $hOLA6$expect)(this.page.getByText(title, {
1966
- exact: true
1967
- })).not.toBeVisible();
1968
- }
1969
- async searchReleaseGroupByTitle(title) {
1970
- await this.page.getByPlaceholder("Search for groups...", {
3368
+ async filterByTitle(templateName) {
3369
+ await this.page.getByPlaceholder("Filter by title...", {
1971
3370
  exact: true
1972
3371
  }).click();
1973
- await this.page.getByPlaceholder("Search for groups...", {
3372
+ await this.page.getByPlaceholder("Filter by title...", {
1974
3373
  exact: true
1975
- }).fill(title);
1976
- await this.page.getByPlaceholder("Search for groups...", {
3374
+ }).fill(templateName);
3375
+ await this.page.getByPlaceholder("Filter by title...", {
1977
3376
  exact: true
1978
3377
  }).press("Enter");
1979
3378
  }
1980
- async deleteReleaseGroup(title) {
1981
- await this.page.locator(".fc-list-item-line").filter({
1982
- hasText: title
1983
- }).locator(".fc-item-delete").click();
1984
- await this.page.getByRole("button", {
1985
- name: "Delete"
1986
- }).click();
1987
- }
1988
- async clickReleaseGroupEdit(title) {
1989
- await this.page.locator(".fc-list-item-line").filter({
1990
- hasText: title
1991
- }).locator(".fc-item-update").click();
1992
- }
1993
- async enterReleaseGroupDetails(new_title) {
1994
- await this.page.locator(".modal-body").locator("#title").fill(new_title);
1995
- }
1996
- async clickSaveButton() {
1997
- await this.page.locator(".modal-footer").getByRole("button", {
1998
- name: "Save"
1999
- }).click();
2000
- }
2001
- async clickCancelButton() {
2002
- await this.page.locator(".modal-footer").getByRole("button", {
2003
- name: "Cancel"
2004
- }).click();
2005
- }
2006
3379
  }
2007
3380
 
2008
3381
 
2009
3382
 
2010
-
2011
- class $cc231ea61b77c7a2$export$1a0994e9c202d529 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
2012
- async expectReleaseDisplayed(title) {
2013
- await (0, $hOLA6$expect)(this.page.getByText(title, {
2014
- exact: true
2015
- })).toBeVisible();
2016
- }
2017
- async expectReleaseNotDisplayed(title) {
2018
- await (0, $hOLA6$expect)(this.page.getByText(title, {
2019
- exact: true
2020
- })).not.toBeVisible({
2021
- timeout: 10000
2022
- });
2023
- }
2024
- async expectPhaseDisplayed(title) {
2025
- await (0, $hOLA6$expect)(this.page.getByText(title, {
2026
- exact: true
2027
- })).toBeVisible();
2028
- }
2029
- async openContextMenu(title) {
2030
- await this.page.locator(".timeline-row-name").filter({
2031
- hasText: title
2032
- }).locator(".options-icon").click();
2033
- }
2034
- async removeFromReleaseGroup() {
2035
- await this.page.getByRole("menuitem", {
2036
- name: "Remove from group"
2037
- }).locator("a").click();
2038
- await this.page.getByRole("button", {
2039
- name: "Remove"
2040
- }).click();
2041
- }
2042
- async expectNumberOfReleases(num_of_release) {
2043
- const elementCount = await this.page.locator(".timeline-row-name-release").count();
2044
- (0, $hOLA6$expect)(elementCount).toBe(num_of_release);
2045
- }
2046
- async openAddReleaseList() {
2047
- await this.page.getByRole("button", {
2048
- name: "Add release"
2049
- }).click();
2050
- }
2051
- async filterReleases(title) {
2052
- await this.page.getByPlaceholder("Search for a release...").click();
2053
- await this.page.getByPlaceholder("Search for a release...").fill(title);
2054
- await this.page.waitForTimeout(5000);
2055
- await this.page.getByPlaceholder("Search for a release...").press("Enter");
2056
- }
2057
- async expectNumberOfReleasesOnModal(num_of_release) {
2058
- const elementCount = await this.page.locator(".release-modal-line").count();
2059
- (0, $hOLA6$expect)(elementCount).toBe(num_of_release);
2060
- }
2061
- async selectAllReleaseCheckbox() {
2062
- await this.page.getByLabel("Select all").check();
2063
- }
2064
- async addReleasesToGroup() {
2065
- await this.page.getByRole("button", {
2066
- name: "Add"
2067
- }).click();
2068
- }
2069
- }
2070
-
2071
-
2072
3383
  class $e72552cbf941ecfa$export$b8a61e5c71402559 {
2073
3384
  constructor(page){
2074
3385
  this.page = page;
3386
+ this.dataRandomGenerator = new (0, $b14c3492cf934ea2$export$e40b5d3c74b04c89)();
3387
+ this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
3388
+ this.folderPage = new (0, $50c91328c9110668$export$b453f08936c58edb)(page);
3389
+ this.globalvariable = new (0, $3df1257265fba073$export$74ca1eaaa9a0054)(page);
3390
+ this.homePage = new (0, $2174535b78371022$export$36d69433c4f81145)(page);
2075
3391
  this.releasePage = new (0, $43cbcdfccb6c2a76$export$f43492e8ac3c566)(page);
2076
3392
  this.settingsMenu = new (0, $f1bf370bb7f683ca$export$1d7840d5cdc861d5)(page);
2077
3393
  this.usersPage = new (0, $2cb6a6ac6b17e85f$export$107317390f5aa598)(page);
2078
3394
  this.applicationPage = new (0, $c313b10398604df2$export$1533b625ec0c75e2)(page);
3395
+ this.taskDetailsPage = new (0, $9ca6e63d357957dd$export$922081b54f2ab994)(page);
2079
3396
  this.taskListPage = new (0, $c37c93912f458e81$export$60c3bfa6385e2a10)(page);
2080
3397
  this.templatePage = new (0, $0c4084f199d70d72$export$8c8e7207254accc2)(page);
2081
3398
  this.templateListPage = new (0, $171d52b372748c0b$export$7e1d435fa474ee21)(page);
2082
- this.taskDetailsPage = new (0, $9ca6e63d357957dd$export$922081b54f2ab994)(page);
3399
+ this.randomString = new (0, $b14c3492cf934ea2$export$e40b5d3c74b04c89)();
2083
3400
  this.releaseCalendarPage = new (0, $3a340a3f4fd8f04d$export$43682cddead1dd78)(page);
2084
- this.releaseListPage = new (0, $5359280e98d97ff9$export$a678525e79c4ccc4)(page);
2085
3401
  this.releaseGroupPage = new (0, $cc2d15e53de5cef7$export$b6fbc3e67030138f)(page);
2086
3402
  this.releaseGroupTimelinePage = new (0, $cc231ea61b77c7a2$export$1a0994e9c202d529)(page);
2087
- this.util = new (0, $aa992f812fb1e470$export$6adb8dd3f0d1e432)(page);
3403
+ this.releaseListPage = new (0, $5359280e98d97ff9$export$a678525e79c4ccc4)(page);
3404
+ this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
2088
3405
  }
2089
3406
  async openTemplate(id) {
2090
3407
  return this.openReleaseOrTemplate(id, false);
@@ -2185,12 +3502,12 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
2185
3502
  return new (0, $43cbcdfccb6c2a76$export$f43492e8ac3c566)(this.page);
2186
3503
  }
2187
3504
  async collapseSideView() {
2188
- await this.page.locator('.dot-tooltip[aria-label="Collapse"]').click();
2189
- await (0, $hOLA6$expect)(this.page.locator('.dot-tooltip[aria-label="Collapse"]')).not.toBeVisible();
3505
+ await this.page.getByLabel("Collapse Q").click();
3506
+ await (0, $hOLA6$expect)(this.page.getByLabel("Collapse Q")).not.toBeVisible();
2190
3507
  }
2191
3508
  async expandSideView() {
2192
- await this.page.locator('.dot-tooltip[aria-label="Expand"]').click();
2193
- await (0, $hOLA6$expect)(this.page.locator('.dot-tooltip[aria-label="Expand"]')).not.toBeVisible();
3509
+ await this.page.getByLabel("Expand Q").click();
3510
+ await (0, $hOLA6$expect)(this.page.getByLabel("Expand Q")).not.toBeVisible();
2194
3511
  }
2195
3512
  }
2196
3513
 
@@ -2469,6 +3786,13 @@ class $80c3ae34677b4324$var$Fixtures {
2469
3786
  permissions(rolePermissions) {
2470
3787
  return this.doPost("fixtures/roles/permissions/global", rolePermissions);
2471
3788
  }
3789
+ updateUserProfile(username, profile) {
3790
+ profile.id = username;
3791
+ profile.type = "xlrelease.UserProfile";
3792
+ profile.canonicalId = username.toLowerCase();
3793
+ if (this.userProfiles.indexOf(profile.canonicalId) === -1) this.userProfiles.push(profile.canonicalId);
3794
+ return this.doPut("fixtures/userProfile", profile);
3795
+ }
2472
3796
  deleteRole(roleName) {
2473
3797
  return this.doDelete(`fixtures/role/${roleName}`);
2474
3798
  }