@digital-ai/devops-page-object-release 0.0.25 → 0.0.27

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
@@ -30,6 +30,7 @@ class $9626bc9256ce31f7$export$2b65d1d97338f32b {
30
30
  class $05d91a1d3381a287$export$34addcca3f0ae43f extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
31
31
  constructor(page){
32
32
  super(page);
33
+ this.releaseForm = this.page.locator("#release-properties .form-group");
33
34
  }
34
35
  async setName(releaseName) {
35
36
  await this.page.locator("#release-form-title").click();
@@ -76,6 +77,14 @@ class $05d91a1d3381a287$export$34addcca3f0ae43f extends (0, $9626bc9256ce31f7$ex
76
77
  await this.page.locator(`#form-${variableName} .display`).click();
77
78
  await this.page.locator(`input[name="${variableName}"]`).fill(value);
78
79
  }
80
+ async setVariable(variable, value) {
81
+ await this.releaseForm.filter({
82
+ hasText: variable
83
+ }).locator("div[inline-text-editor]").click();
84
+ await this.releaseForm.filter({
85
+ hasText: variable
86
+ }).locator("div[inline-text-editor] input").fill(value);
87
+ }
79
88
  }
80
89
 
81
90
 
@@ -281,7 +290,7 @@ class $71075ce65fcede1d$export$9b575f14aa5e09a1 extends (0, $9626bc9256ce31f7$ex
281
290
  }
282
291
 
283
292
 
284
- class $f48771b486a3eb8f$export$a87f0ae8695e74be extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
293
+ class $dfc4ce40cbd0eb71$export$f8e64fcf447db2bf extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
285
294
  constructor(page){
286
295
  super(page);
287
296
  this.addListValue = this.page.locator(".variable-selector .xl-components-input-full input");
@@ -293,7 +302,7 @@ class $f48771b486a3eb8f$export$a87f0ae8695e74be extends (0, $9626bc9256ce31f7$ex
293
302
  }
294
303
  async openVariable(variableKey) {
295
304
  await this.page.locator(`.variables-list .variable`).getByText(variableKey).click();
296
- return new $f48771b486a3eb8f$var$ReleaseVariableModal(this.page);
305
+ return new $dfc4ce40cbd0eb71$var$VariableModal(this.page);
297
306
  }
298
307
  async addNewVariable(variableName, labelname, description) {
299
308
  await this.page.locator("#action-toolbar").getByTestId("dot-button").click();
@@ -301,9 +310,12 @@ class $f48771b486a3eb8f$export$a87f0ae8695e74be extends (0, $9626bc9256ce31f7$ex
301
310
  await this.page.locator(".variable-label input").fill(labelname);
302
311
  if (description) await this.page.locator(".variable-description input").fill(description);
303
312
  }
304
- async selectVariableTextType(valuename) {
313
+ async selectVariableTextType(valueName, multiline) {
305
314
  await this.page.getByRole("combobox").selectOption("StringVariable");
306
- await this.page.locator(".variable-value").type(valuename);
315
+ if (multiline) {
316
+ await this.clickMultiline();
317
+ await this.page.locator(".variable-value textarea").fill(valueName);
318
+ } else await this.page.locator(".variable-value input").fill(valueName);
307
319
  }
308
320
  async selectVariableListboxType(possiblevalue, defaultValue, required) {
309
321
  await this.page.getByRole("combobox").selectOption("DropDownListBox");
@@ -317,7 +329,6 @@ class $f48771b486a3eb8f$export$a87f0ae8695e74be extends (0, $9626bc9256ce31f7$ex
317
329
  }
318
330
  await this.page.locator(".variable-value select").type(defaultValue);
319
331
  if (required) await this.page.getByRole("checkbox").check();
320
- else await this.page.getByRole("checkbox").uncheck();
321
332
  }
322
333
  async selectVariablePasswordType(possiblevalue) {
323
334
  await this.page.getByRole("combobox").selectOption("PasswordStringVariable");
@@ -342,9 +353,10 @@ class $f48771b486a3eb8f$export$a87f0ae8695e74be extends (0, $9626bc9256ce31f7$ex
342
353
  exact: true
343
354
  }).click();
344
355
  }
345
- async addVariableDate() {
356
+ async selectVariableByDate(date, monthYear) {
346
357
  await this.page.getByRole("combobox").selectOption("DateVariable");
347
358
  await this.page.getByText("Select date").click();
359
+ await this.setDate(date, monthYear);
348
360
  }
349
361
  async setDate(date, monthYear) {
350
362
  await this.dateUtil.setDate(date, monthYear);
@@ -382,14 +394,16 @@ class $f48771b486a3eb8f$export$a87f0ae8695e74be extends (0, $9626bc9256ce31f7$ex
382
394
  (0, $hOLA6$expect)(rowLocator.toString()).toContain(type);
383
395
  }
384
396
  async clickEditVariable(variableName) {
385
- await this.page.locator("[id='variables-filter']").fill(variableName);
386
- await this.page.getByText("Edit").first().click();
387
- return new $f48771b486a3eb8f$var$ReleaseVariableModal(this.page);
397
+ await this.page.locator(".data-row").filter({
398
+ hasText: variableName
399
+ }).getByText("Edit").first().click();
400
+ return new $dfc4ce40cbd0eb71$var$VariableModal(this.page);
388
401
  }
389
402
  async clickDeleteVariable(variableName) {
390
- await this.page.locator("[id='variables-filter']").fill(variableName);
391
- await this.page.locator(".action .delete-icon").first().click();
392
- return new $f48771b486a3eb8f$var$DeleteVariableModel(this.page);
403
+ await this.page.locator(".data-row").filter({
404
+ hasText: variableName
405
+ }).locator(".action .delete-icon").first().click();
406
+ return new $dfc4ce40cbd0eb71$var$DeleteVariableModel(this.page);
393
407
  }
394
408
  async expectVariablesCountToBe(count) {
395
409
  await (0, $hOLA6$expect)(this.page.locator(".variable .data-row")).toHaveCount(count);
@@ -399,7 +413,7 @@ class $f48771b486a3eb8f$export$a87f0ae8695e74be extends (0, $9626bc9256ce31f7$ex
399
413
  hasText: variableName
400
414
  })).not.toBeVisible();
401
415
  }
402
- async clearSearch() {
416
+ async clearReleaseVariableSearch() {
403
417
  await this.page.locator("[id='variables-filter']").clear();
404
418
  }
405
419
  async switchPossibleValuesToVariable(variableName) {
@@ -420,8 +434,23 @@ class $f48771b486a3eb8f$export$a87f0ae8695e74be extends (0, $9626bc9256ce31f7$ex
420
434
  if (required) await this.page.getByRole("checkbox").check();
421
435
  else await this.page.getByRole("checkbox").uncheck();
422
436
  }
437
+ async clickMultiline() {
438
+ await this.page.locator("#multiline").click();
439
+ }
440
+ async searchFolderVariable(variableName) {
441
+ await this.page.locator(".searchFilter").fill(variableName);
442
+ }
443
+ async clearFolderVarSearch() {
444
+ await this.page.locator(".searchFilter").clear();
445
+ }
446
+ async clickFolderVariableButton() {
447
+ await this.page.getByText("Folder variables").click();
448
+ }
449
+ async clickReleaseVariableButton() {
450
+ await this.page.getByText("Release variables").click();
451
+ }
423
452
  }
424
- class $f48771b486a3eb8f$var$ReleaseVariableModal extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
453
+ class $dfc4ce40cbd0eb71$var$VariableModal extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
425
454
  constructor(page){
426
455
  super(page);
427
456
  this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
@@ -464,8 +493,8 @@ class $f48771b486a3eb8f$var$ReleaseVariableModal extends (0, $9626bc9256ce31f7$e
464
493
  if (possiblevalue instanceof Array) for (const value of possiblevalue)(0, $hOLA6$expect)(listLocator).toContain(value);
465
494
  else (0, $hOLA6$expect)(listLocator).toContain(possiblevalue);
466
495
  }
467
- async expectPossibleVariableValues(possiblevariablevalue) {
468
- await (0, $hOLA6$expect)(this.page.locator(".variable-dropdown input")).toHaveValue(possiblevariablevalue);
496
+ async expectPossibleVariableValues(possibleVariableValue) {
497
+ await (0, $hOLA6$expect)(this.page.locator(".variable-dropdown input")).toHaveValue(possibleVariableValue);
469
498
  }
470
499
  async addPossibleValue(value) {
471
500
  if (value instanceof Array) for (const li of value){
@@ -513,7 +542,7 @@ class $f48771b486a3eb8f$var$ReleaseVariableModal extends (0, $9626bc9256ce31f7$e
513
542
  await (0, $hOLA6$expect)(this.page.locator("#modal .variable-label input")).toHaveValue(value);
514
543
  }
515
544
  async expectRequired(value) {
516
- if (value == true) await (0, $hOLA6$expect)(this.page.locator('.form-group input[ng-model="var.requiresValue"]')).toBeChecked();
545
+ if (value) await (0, $hOLA6$expect)(this.page.locator('.form-group input[ng-model="var.requiresValue"]')).toBeChecked();
517
546
  else await (0, $hOLA6$expect)(this.page.locator('.form-group input[ng-model="var.requiresValue"]')).not.toBeChecked();
518
547
  }
519
548
  async setDescription(description) {
@@ -531,11 +560,20 @@ class $f48771b486a3eb8f$var$ReleaseVariableModal extends (0, $9626bc9256ce31f7$e
531
560
  async setValue(value) {
532
561
  await this.page.locator(".variable-value input").fill(value);
533
562
  }
563
+ async clearValue() {
564
+ await this.page.locator(".variable-value input").clear();
565
+ }
566
+ async clickMultiline() {
567
+ await this.page.locator("#multiline").click();
568
+ }
569
+ async setValueForMultilinePassword(value) {
570
+ await this.page.locator(".password-textarea").fill(value);
571
+ }
534
572
  }
535
- class $f48771b486a3eb8f$var$DeleteVariableModel extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
573
+ class $dfc4ce40cbd0eb71$var$DeleteVariableModel extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
536
574
  constructor(page){
537
575
  super(page);
538
- this.model = new $f48771b486a3eb8f$var$ReleaseVariableModal(page);
576
+ this.model = new $dfc4ce40cbd0eb71$var$VariableModal(page);
539
577
  this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
540
578
  }
541
579
  async deleteVariable() {
@@ -738,11 +776,23 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
738
776
  }).click();
739
777
  }
740
778
  async setVariable(propertyName, variableName) {
741
- return this.setValueFromCi(propertyName, variableName);
779
+ await this.railLocator.locator(`input[id="${propertyName}"]`).fill(variableName);
780
+ }
781
+ async expectVariable(propertyName) {
782
+ await (0, $hOLA6$expect)(this.railLocator.locator(`input[id="${propertyName}"]`)).toBeVisible();
742
783
  }
743
784
  async expectValueFromString(propertyName, propertyValue) {
744
785
  return await (0, $hOLA6$expect)(this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`)).toHaveText(propertyValue);
745
786
  }
787
+ async expectTo(value) {
788
+ return await (0, $hOLA6$expect)(this.railLocator.getByTestId(`dot-autocomplete-chip`)).toHaveText(value);
789
+ }
790
+ async expectSubjectToBe(value) {
791
+ return (0, $hOLA6$expect)(await this.page.locator("#notification-subject").getAttribute("value")).toContain(value);
792
+ }
793
+ async expectBodyToBe(value) {
794
+ return await (0, $hOLA6$expect)(this.page.locator(".notification-body-field p")).toHaveText(value);
795
+ }
746
796
  async setValueFromMap(propertyName, key, value) {
747
797
  await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.add-new-button`).click();
748
798
  await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] input[id="new-row-key-input"]`).fill(key);
@@ -803,8 +853,7 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
803
853
  }
804
854
  async getDependencyCount() {
805
855
  await (0, $hOLA6$expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
806
- const count = await this.railLocator.locator(".gate-task-dependencies .dependency").count();
807
- return count;
856
+ return await this.railLocator.locator(".gate-task-dependencies .dependency").count();
808
857
  }
809
858
  async addDependency() {
810
859
  await (0, $hOLA6$expect)(this.railLocator.locator(".add-dependency-btn")).toBeVisible();
@@ -831,21 +880,152 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
831
880
  }).click();
832
881
  }
833
882
  }
834
- async validateAutoCompleteOptions(descriptionName, expectedDescription, variableSelection) {
883
+ async validateAutoCompleteOptionsInDescription(descriptionName, expectedVariableCount, variableToSelection) {
835
884
  await this.page.getByLabel("Double-click to edit").waitFor({
836
885
  timeout: 10000
837
886
  });
838
887
  await this.page.getByLabel("Double-click to edit").hover();
839
888
  await this.page.locator(".markdown-viewer-actions").getByTestId("edit-button").click();
840
889
  await this.page.locator("#task-description-input").fill(descriptionName);
841
- await (0, $hOLA6$expect)(this.page.locator(".dot-popper-content-wrapper .option-name")).toHaveCount(6);
842
- await this.page.locator(".dot-popper-content-wrapper .option-name").filter({
843
- hasText: variableSelection
890
+ await (0, $hOLA6$expect)(this.page.locator(".dot-popper-content-wrapper .option-name")).toHaveCount(expectedVariableCount);
891
+ if (variableToSelection) await this.page.locator(".dot-popper-content-wrapper .option-name").filter({
892
+ hasText: variableToSelection
893
+ }).click();
894
+ await this.page.getByRole("button", {
895
+ name: "Save"
896
+ }).click();
897
+ }
898
+ // eslint-disable-next-line max-params
899
+ async validateAutoCompleteOptions(fieldLabel, value, expectedVariableCount, variableToSelect) {
900
+ await this.page.getByLabel(fieldLabel).click();
901
+ await this.page.getByLabel(fieldLabel).fill(value);
902
+ await (0, $hOLA6$expect)(this.page.getByRole("option")).toHaveCount(expectedVariableCount);
903
+ if (variableToSelect) await this.page.getByRole("option", {
904
+ name: variableToSelect
905
+ }).click();
906
+ }
907
+ async setReleaseTitle(releaseName) {
908
+ await this.page.getByLabel("Release title *").fill(releaseName);
909
+ }
910
+ async setFolder(folderName) {
911
+ await this.page.getByPlaceholder("Select a folder").click();
912
+ await this.page.getByPlaceholder("Search folder...").fill(folderName);
913
+ await this.page.getByRole("button", {
914
+ name: folderName
915
+ }).click();
916
+ }
917
+ async setTemplate(templateName) {
918
+ await this.page.getByLabel("Template").click();
919
+ await this.page.getByLabel("Template").fill(templateName);
920
+ await this.page.getByRole("option", {
921
+ name: templateName
922
+ }).click();
923
+ }
924
+ async clearTemplate() {
925
+ await this.page.locator("#templateId").click();
926
+ await this.page.locator("#templateId").clear();
927
+ }
928
+ async errorMsgVisible(errorMessage) {
929
+ await (0, $hOLA6$expect)(this.page.locator("#dialogTitle")).toContainText(errorMessage);
930
+ }
931
+ async isButtonVisible(buttonName, visible = true) {
932
+ (0, $hOLA6$expect)(await this.page.getByRole("button", {
933
+ name: buttonName
934
+ }).isVisible()).toBe(visible);
935
+ }
936
+ async cancelDialogWindow() {
937
+ await this.page.getByRole("button", {
938
+ name: "cancel"
939
+ }).click();
940
+ }
941
+ async acceptDialogWindow() {
942
+ await this.page.getByRole("button", {
943
+ name: "ok"
944
+ }).click();
945
+ }
946
+ async setRiskProfile(RiskProfile) {
947
+ await this.page.getByLabel("Risk profile").click();
948
+ await this.page.getByLabel("Risk profile").fill(RiskProfile);
949
+ await this.page.getByRole("option", {
950
+ name: RiskProfile
951
+ }).click();
952
+ }
953
+ async expectTemplate(template) {
954
+ const templateName = await this.page.locator("#templateId").getAttribute("value");
955
+ (0, $hOLA6$expect)(templateName).toEqual(template);
956
+ }
957
+ async setAutoCompletePassword(passwordValue) {
958
+ await this.page.getByTestId("password").getByLabel("Click to switch between").click();
959
+ await this.page.locator("#password").fill(passwordValue);
960
+ await this.page.getByRole("option", {
961
+ name: passwordValue
962
+ }).click();
963
+ }
964
+ async setAutoCompleteField(fieldLabel, value) {
965
+ await this.page.getByLabel(fieldLabel).click();
966
+ await this.page.getByLabel(fieldLabel).fill(value);
967
+ await this.page.getByRole("option", {
968
+ name: value
969
+ }).click();
970
+ }
971
+ async setNewAutoCompleteField(fieldLabel, value) {
972
+ await this.page.getByLabel(fieldLabel).click();
973
+ await this.page.getByLabel(fieldLabel).fill(value);
974
+ await this.page.getByTestId("dot-action-item-btn").click();
975
+ }
976
+ async setTextField(fieldID, value) {
977
+ await this.page.locator(`[data-test-id="${fieldID}"]`).nth(1).click();
978
+ await this.page.locator(`input[name='${fieldID}']`).fill(value);
979
+ }
980
+ async abortButtonVisibility(visible = true) {
981
+ (0, $hOLA6$expect)(await this.page.getByRole("button", {
982
+ name: "Abort"
983
+ }).isVisible()).toBe(visible);
984
+ }
985
+ async setPattern(patternName) {
986
+ await this.page.locator("#patternId").click();
987
+ await this.page.locator("#patternId").fill(patternName);
988
+ await this.page.getByRole("option", {
989
+ name: patternName
844
990
  }).click();
991
+ }
992
+ async setStartDate(date) {
993
+ await this.page.locator("#startDate").click();
994
+ await this.page.locator("#startDate").fill(date);
995
+ }
996
+ async setEndDate(date) {
997
+ await this.page.locator("#endDate").click();
998
+ await this.page.locator("#endDate").fill(date);
999
+ }
1000
+ async clickVariableButton(objectID, variableValue) {
1001
+ await this.page.locator(`div[data-testid="${objectID}"] .icon-variable`).click();
1002
+ await this.page.locator(`#${objectID}`).fill(variableValue);
1003
+ await this.page.getByRole("option", {
1004
+ name: variableValue
1005
+ }).click();
1006
+ }
1007
+ async enableFallback() {
1008
+ await this.page.getByLabel("Fallback").check();
1009
+ }
1010
+ async expectDescription(description) {
1011
+ await (0, $hOLA6$expect)(this.page.getByTestId("dot-accordion-details")).toHaveText(description);
1012
+ }
1013
+ async editDescription(description) {
1014
+ await this.page.getByLabel("Double-click to edit").waitFor({
1015
+ timeout: 10000
1016
+ });
1017
+ await this.page.getByLabel("Double-click to edit").hover();
1018
+ await this.page.locator(".markdown-viewer-actions").getByTestId("edit-button").click();
1019
+ await this.page.locator("#task-description-input").clear();
1020
+ await this.page.locator("#task-description-input").fill(description);
845
1021
  await this.page.getByRole("button", {
846
1022
  name: "Save"
847
1023
  }).click();
848
- await (0, $hOLA6$expect)(this.page.locator(".phase-link-container").locator(".variable").first()).toHaveText(expectedDescription);
1024
+ }
1025
+ async expectedGateConditionDisplayed(title) {
1026
+ await (0, $hOLA6$expect)(this.page.locator(".gate-task-condition-input").filter({
1027
+ hasText: title
1028
+ })).toBeVisible();
849
1029
  }
850
1030
  }
851
1031
  class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
@@ -858,18 +1038,15 @@ class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$ex
858
1038
  }
859
1039
  async getRelease() {
860
1040
  await this.release.isVisible();
861
- const releaseValue = await this.release.getAttribute("value");
862
- return releaseValue;
1041
+ return await this.release.getAttribute("value");
863
1042
  }
864
1043
  async getPhase() {
865
1044
  await this.phase.isVisible();
866
- const phaseValue = await this.phase.getAttribute("value");
867
- return phaseValue;
1045
+ return await this.phase.getAttribute("value");
868
1046
  }
869
1047
  async getTask() {
870
1048
  await this.task.isVisible();
871
- const taskValue = await this.task.getAttribute("value");
872
- return taskValue;
1049
+ return await this.task.getAttribute("value");
873
1050
  }
874
1051
  async setRelease(releaseTitle) {
875
1052
  await this.release.click();
@@ -913,8 +1090,8 @@ class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$ex
913
1090
  }
914
1091
  async expectVariableModeEnabled(mode) {
915
1092
  await (0, $hOLA6$expect)(this.dependencyLocator.getByLabel("input-variable")).toBeVisible();
916
- const variablemode = await this.dependencyLocator.getByLabel("input-variable").getAttribute("aria-pressed");
917
- (0, $hOLA6$expect)(variablemode).toBe("" + mode + "");
1093
+ const variableMode = await this.dependencyLocator.getByLabel("input-variable").getAttribute("aria-pressed");
1094
+ (0, $hOLA6$expect)(variableMode).toBe("" + mode + "");
918
1095
  }
919
1096
  async clickVariable() {
920
1097
  await this.dependencyLocator.getByLabel("input-variable").waitFor();
@@ -928,15 +1105,15 @@ class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$ex
928
1105
  (0, $hOLA6$expect)(options[i]).toContain(option);
929
1106
  }
930
1107
  }
931
- async enterNewVariable(variablename) {
1108
+ async enterNewVariable(variableName) {
932
1109
  await this.page.getByLabel("Please select a variable of").click();
933
- await this.page.getByLabel("Please select a variable of").fill(variablename);
1110
+ await this.page.getByLabel("Please select a variable of").fill(variableName);
934
1111
  await this.page.getByTestId("dot-action-item-btn").click();
935
1112
  }
936
- async selectVariable(variablename) {
1113
+ async selectVariable(variableName) {
937
1114
  await this.page.getByLabel("Please select a variable of").click();
938
1115
  await this.page.getByRole("option", {
939
- name: variablename
1116
+ name: variableName
940
1117
  }).click();
941
1118
  }
942
1119
  }
@@ -945,11 +1122,11 @@ class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$ex
945
1122
 
946
1123
 
947
1124
  class $69e86f559cdf2bd0$export$15d3f9b095bb5188 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
948
- async expectCommentToContain(text) {
949
- await (0, $hOLA6$expect)(this.page.locator(".task-comment .markdown-wrapper p")).toContainText(text);
1125
+ async expectCommentToContain(comment) {
1126
+ (0, $hOLA6$expect)(await this.page.locator(".markdown-wrapper").textContent()).toContain(comment);
950
1127
  }
951
1128
  async expectTaskIsCommentable(isCommentable) {
952
- (0, $hOLA6$expect)(await this.page.locator("#task-comment").count()).toBe(isCommentable ? 1 : 0);
1129
+ return (0, $hOLA6$expect)(await this.page.locator("#task-comment").count()).toBe(isCommentable ? 1 : 0);
953
1130
  }
954
1131
  }
955
1132
 
@@ -1005,6 +1182,88 @@ class $9c357602b6f466e7$export$aa59788fdecae2f2 extends (0, $9626bc9256ce31f7$ex
1005
1182
 
1006
1183
 
1007
1184
 
1185
+
1186
+
1187
+
1188
+
1189
+ class $499d3d8c8706756b$export$e3515314c13bc477 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1190
+ constructor(page){
1191
+ super(page);
1192
+ this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
1193
+ }
1194
+ async expectStartDateToBeDisplayed() {
1195
+ (0, $hOLA6$expect)(await this.page.locator(".flex-section.column").filter({
1196
+ hasText: "Start Date"
1197
+ }).locator(".task-date-view-content").isVisible()).toBe(true);
1198
+ }
1199
+ async expectEndDateToBeDisplayed() {
1200
+ (0, $hOLA6$expect)(await this.page.locator(".flex-section.column").filter({
1201
+ hasText: "End Date"
1202
+ }).locator(".task-date-view-content").isVisible()).toBe(true);
1203
+ }
1204
+ async switchWaitForScheduledDate() {
1205
+ await this.page.locator(".wait-for-start input").click();
1206
+ }
1207
+ async expectWaitForScheduledDateToBeChecked() {
1208
+ await (0, $hOLA6$expect)(this.page.locator(".wait-for-start input")).toBeChecked();
1209
+ }
1210
+ async expectWaitForScheduledDateToBeUnchecked() {
1211
+ await (0, $hOLA6$expect)(this.page.locator(".wait-for-start input")).not.toBeChecked();
1212
+ }
1213
+ async setDueTime(day, hour, minute) {
1214
+ await this.page.locator(".duration-view-content").click();
1215
+ if (day) {
1216
+ await this.page.locator("#days").clear();
1217
+ await this.page.locator("#days").fill(day);
1218
+ }
1219
+ if (hour) {
1220
+ await this.page.locator("#hours").clear();
1221
+ await this.page.locator("#hours").fill(hour);
1222
+ }
1223
+ if (minute) {
1224
+ await this.page.locator("#minutes").clear();
1225
+ await this.page.locator("#minutes").fill(minute);
1226
+ }
1227
+ await this.page.getByTestId("save-button").click();
1228
+ }
1229
+ async setStartDate(date, monthYear) {
1230
+ await this.page.locator(".flex-section.column").filter({
1231
+ hasText: "Start date"
1232
+ }).locator(".task-date").waitFor({
1233
+ timeout: 10000
1234
+ });
1235
+ await this.page.locator(".flex-section.column").filter({
1236
+ hasText: "Start date"
1237
+ }).locator(".task-date").click();
1238
+ await this.setDate(date, monthYear);
1239
+ }
1240
+ async setEndDate(date, monthYear) {
1241
+ await this.page.locator(".flex-section.column").filter({
1242
+ hasText: "End date"
1243
+ }).locator(".task-date").waitFor({
1244
+ timeout: 10000
1245
+ });
1246
+ await this.page.locator(".flex-section.column").filter({
1247
+ hasText: "End date"
1248
+ }).locator(".task-date").click();
1249
+ await this.setDate(date, monthYear);
1250
+ }
1251
+ async setDate(date, monthYear) {
1252
+ const prev = this.page.getByTestId("ArrowLeftIcon");
1253
+ const next = this.page.getByTestId("ArrowRightIcon");
1254
+ const monYear = this.page.locator(".MuiPickersCalendarHeader-label");
1255
+ const currentDate = await monYear.textContent();
1256
+ const thisMonth = (0, $hOLA6$moment)(monthYear, "MMMM YYYY").isBefore(currentDate);
1257
+ while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
1258
+ else await next.click();
1259
+ await this.page.getByRole("gridcell", {
1260
+ name: "" + date + "",
1261
+ exact: true
1262
+ }).first().click();
1263
+ }
1264
+ }
1265
+
1266
+
1008
1267
  class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1009
1268
  constructor(page){
1010
1269
  super(page);
@@ -1020,6 +1279,8 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
1020
1279
  this.config = new (0, $e44e9af564fb00f7$export$64c93bc7fb9ca44e)(page);
1021
1280
  this.condition = new (0, $3fa741329d8067d5$export$d4865631ba74f3e2)(page);
1022
1281
  this.overview = new (0, $90bb70a7e909e500$export$519356f6c50361f7)(page);
1282
+ this.scheduling = new (0, $499d3d8c8706756b$export$e3515314c13bc477)(page);
1283
+ this.startButton = this.page.getByTestId("single-action-button");
1023
1284
  this.skipMenu = this.page.getByRole("menuitem", {
1024
1285
  name: "Skip"
1025
1286
  });
@@ -1031,7 +1292,8 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
1031
1292
  exact: true
1032
1293
  });
1033
1294
  this.completeButton = this.page.getByRole("button", {
1034
- name: "Complete"
1295
+ name: "Complete",
1296
+ exact: true
1035
1297
  });
1036
1298
  }
1037
1299
  async openOverviewRail() {
@@ -1042,6 +1304,7 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
1042
1304
  }
1043
1305
  async openSchedulingRail() {
1044
1306
  await this.openRail("Scheduling");
1307
+ return new (0, $499d3d8c8706756b$export$e3515314c13bc477)(this.page);
1045
1308
  }
1046
1309
  async openConditionRail() {
1047
1310
  await this.openRail("Conditions");
@@ -1087,6 +1350,12 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
1087
1350
  async expectTaskTitle(taskTitle) {
1088
1351
  await (0, $hOLA6$expect)(this.page.locator(".task-drawer .task-title-input .dot-view-mode-typography")).toContainText(taskTitle);
1089
1352
  }
1353
+ async setTitle(title) {
1354
+ await this.page.getByTestId("task-title-input-view-mode-typography").click();
1355
+ await this.page.getByTestId("task-title-input-input").clear();
1356
+ await this.page.getByTestId("task-title-input-input").fill(title);
1357
+ await this.page.getByTestId("task-title-input-input").press("Enter");
1358
+ }
1090
1359
  async expectTypeToContain(taskType) {
1091
1360
  await (0, $hOLA6$expect)(this.page.locator(".task-drawer .task-type")).toContainText(taskType);
1092
1361
  }
@@ -1111,26 +1380,16 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
1111
1380
  name: username
1112
1381
  })).toBeVisible();
1113
1382
  }
1114
- async expectStartNowButtonToBeVisible() {
1115
- await (0, $hOLA6$expect)(this.page.getByTestId("single-action-button")).toBeVisible();
1116
- }
1117
- async startNow(comment) {
1118
- await this.page.getByTestId("single-action-button").click();
1119
- await this.page.getByTestId("task-action-comment").fill(comment);
1120
- await this.page.getByTestId("dot-button").click();
1121
- await (0, $hOLA6$expect)(this.page.getByTestId("single-action-button")).not.toBeVisible();
1122
- }
1123
- async expectCommentsToContain(text) {
1124
- await (0, $hOLA6$expect)(this.page.locator(".task-comment-body .markdown-wrapper p")).toContainText(text);
1125
- }
1126
- async switchWaitForScheduledDate() {
1127
- await this.page.locator(".wait-for-start input").click();
1128
- }
1129
- async expectWaitForScheduledDateToBeChecked() {
1130
- await (0, $hOLA6$expect)(this.page.locator(".wait-for-start input")).toBeChecked();
1383
+ async expectStartButtonToBeEnabled(isEnabled = true) {
1384
+ if (isEnabled) await (0, $hOLA6$expect)(this.startButton).toBeEnabled();
1385
+ else await (0, $hOLA6$expect)(this.startButton).not.toBeEnabled();
1131
1386
  }
1132
- async expectWaitForScheduledDateToBeUnchecked() {
1133
- await (0, $hOLA6$expect)(this.page.locator(".wait-for-start input")).not.toBeChecked();
1387
+ async startTask(comment) {
1388
+ await this.startButton.click();
1389
+ await this.completeButton.click();
1390
+ await this.commentBox.fill(comment);
1391
+ await this.completeButton.click();
1392
+ await (0, $hOLA6$expect)(this.startButton).not.toBeVisible();
1134
1393
  }
1135
1394
  // Other locators are flaky and it can be replaced if we get locator change in the frontend
1136
1395
  async clickOnStartDate() {
@@ -1190,10 +1449,12 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
1190
1449
 
1191
1450
 
1192
1451
 
1452
+
1193
1453
  class $a546aadb4e6fa16a$export$5a82be0a2a261cc6 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1194
1454
  constructor(page){
1195
1455
  super(page);
1196
1456
  this.releaseHeader = this.page.locator(".release-header");
1457
+ this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
1197
1458
  }
1198
1459
  async enableShowDates() {
1199
1460
  await this.page.locator("#toggleIsDatesColumnsShown").check();
@@ -1207,6 +1468,105 @@ class $a546aadb4e6fa16a$export$5a82be0a2a261cc6 extends (0, $9626bc9256ce31f7$ex
1207
1468
  async expectPlanningDateColumnsShown() {
1208
1469
  (0, $hOLA6$expect)(await this.page.locator(`#gantt .gantt_grid_data .gantt_row`).first().locator(`.gantt_cell`).count()).toEqual(4);
1209
1470
  }
1471
+ async expectReleaseOnBreadcrumb(title) {
1472
+ await (0, $hOLA6$expect)(this.page.getByRole("link", {
1473
+ name: title
1474
+ })).toBeVisible();
1475
+ }
1476
+ async expectPhaseDisplayed(phaseName) {
1477
+ await (0, $hOLA6$expect)(this.page.getByTitle(phaseName, {
1478
+ exact: true
1479
+ })).toBeVisible();
1480
+ }
1481
+ async expectTaskDisplayed(taskName, isDisplayed = true) {
1482
+ if (isDisplayed) await (0, $hOLA6$expect)(this.page.getByTitle(taskName)).toBeVisible();
1483
+ else await (0, $hOLA6$expect)(this.page.getByTitle(taskName)).not.toBeVisible();
1484
+ }
1485
+ async expandGanttTree(title) {
1486
+ return await this.page.locator(".gantt_cell").filter({
1487
+ hasText: title
1488
+ }).locator(".gantt_open").click();
1489
+ }
1490
+ async expectDifferentWidth(title1, title2) {
1491
+ const releaseWidth = await this.page.locator(`.gantt_task_content`).getByText(title1, {
1492
+ exact: true
1493
+ }).getAttribute("style");
1494
+ const PhaseWidth = await this.page.locator(`.gantt_task_content`).getByText(title2, {
1495
+ exact: true
1496
+ }).getAttribute("style");
1497
+ return (0, $hOLA6$expect)(releaseWidth).not.toEqual(PhaseWidth);
1498
+ }
1499
+ async expectSameWidth(title1, title2) {
1500
+ const releaseWidth = await this.page.locator(`.gantt_task_content`).getByText(title1, {
1501
+ exact: true
1502
+ }).getAttribute("style");
1503
+ const PhaseWidth = await this.page.locator(`.gantt_task_content`).getByText(title2, {
1504
+ exact: true
1505
+ }).getAttribute("style");
1506
+ return (0, $hOLA6$expect)(releaseWidth).toEqual(PhaseWidth);
1507
+ }
1508
+ async expectElementWithClasses(title, classes) {
1509
+ const eleNumber = await this.page.locator(`.${classes.join(".")}`).locator(`.gantt_task_content`).getByText(title, {
1510
+ exact: true
1511
+ }).count();
1512
+ return (0, $hOLA6$expect)(eleNumber).toBe(1);
1513
+ }
1514
+ async resizeToDayIndex(title, index) {
1515
+ await this.page.locator(`#gantt .gantt_container .gantt_task_line`).filter({
1516
+ hasText: title
1517
+ }).click();
1518
+ await this.page.locator(`.gantt_task_line`).filter({
1519
+ hasText: title
1520
+ }).locator(`.gantt_task_drag.task_right`).hover();
1521
+ const objId = await this.page.locator(`.gantt_task_line`).filter({
1522
+ hasText: title
1523
+ }).getAttribute("task_id");
1524
+ await this.page.mouse.down();
1525
+ await this.page.locator(`div[task_id='${objId}']`).locator(".gantt_task_cell").nth(index).hover();
1526
+ await this.page.mouse.up();
1527
+ }
1528
+ async expectLinksToBeDisplayed(countOfLinks) {
1529
+ (0, $hOLA6$expect)(await this.page.locator(".gantt_task_link").count()).toEqual(countOfLinks);
1530
+ }
1531
+ async expectLeftHandleVisibility(title, visible) {
1532
+ const objId = await this.page.locator(`.gantt_task_line`).filter({
1533
+ hasText: title
1534
+ }).getAttribute("task_id");
1535
+ if (visible) {
1536
+ await this.page.locator("#gantt .gantt_container .gantt_task_line").filter({
1537
+ hasText: title
1538
+ }).hover();
1539
+ await (0, $hOLA6$expect)(this.page.locator("#gantt .gantt_container ").locator(`div[task_id="${objId}"].gantt-no-left-handle`)).not.toBeVisible();
1540
+ } else {
1541
+ await this.page.locator("#gantt .gantt_container .gantt_task_line").filter({
1542
+ hasText: title
1543
+ }).hover();
1544
+ await (0, $hOLA6$expect)(this.page.locator("#gantt .gantt_container ").locator(`div[task_id="${objId}"].gantt-no-left-handle`)).toBeVisible();
1545
+ }
1546
+ }
1547
+ async expectRightHandleVisibility(title, visible) {
1548
+ const objId = await this.page.locator(`.gantt_task_line`).filter({
1549
+ hasText: title
1550
+ }).getAttribute("task_id");
1551
+ if (visible) {
1552
+ await this.page.locator("#gantt .gantt_container .gantt_task_line").filter({
1553
+ hasText: title
1554
+ }).hover();
1555
+ await (0, $hOLA6$expect)(this.page.locator("#gantt .gantt_container").locator(`div[task_id='${objId}'].gantt-no-right-handle`)).not.toBeVisible();
1556
+ } else {
1557
+ await this.page.locator("#gantt .gantt_container .gantt_task_line").filter({
1558
+ hasText: title
1559
+ }).hover();
1560
+ await (0, $hOLA6$expect)(this.page.locator("#gantt .gantt_container").locator(`div[task_id='${objId}'].gantt-no-right-handle`)).toBeVisible();
1561
+ }
1562
+ }
1563
+ async openTaskDrawer(title) {
1564
+ await this.page.getByTitle(title).dblclick();
1565
+ return this.taskDrawer;
1566
+ }
1567
+ async openPhaseDetails(phaseName) {
1568
+ await this.page.getByTitle(phaseName).dblclick();
1569
+ }
1210
1570
  getRow(phaseName) {
1211
1571
  return new $a546aadb4e6fa16a$var$GanttRow(this.page, phaseName);
1212
1572
  }
@@ -1240,20 +1600,20 @@ class $a546aadb4e6fa16a$var$GanttRow extends (0, $9626bc9256ce31f7$export$2b65d1
1240
1600
  await this.dateUtil.setDate(date, monthYear);
1241
1601
  }
1242
1602
  async expectStartDateToBe(date) {
1243
- const dateTimePicker = await this.getFirstDate();
1244
- this.dateUtil.expectDateToBe(dateTimePicker, date);
1603
+ const dateTimePicker = this.getFirstDate();
1604
+ await this.dateUtil.expectDateToBe(await dateTimePicker, date);
1245
1605
  }
1246
1606
  async expectEndDateToBe(date) {
1247
- const dateTimePicker = await this.getLastDate();
1248
- this.dateUtil.expectDateToBe(dateTimePicker, date);
1607
+ const dateTimePicker = this.getLastDate();
1608
+ await this.dateUtil.expectDateToBe(await dateTimePicker, date);
1249
1609
  }
1250
1610
  async removeStartDate() {
1251
1611
  const dateTimePicker = await this.getFirstDateEditor();
1252
1612
  await this.dateUtil.removeDate(dateTimePicker);
1253
1613
  }
1254
1614
  async removeEndDate() {
1255
- const dateTimePicker = await this.getLastDateEditor();
1256
- await this.dateUtil.removeDate(dateTimePicker);
1615
+ const dateTimePicker = this.getLastDateEditor();
1616
+ await this.dateUtil.removeDate(await dateTimePicker);
1257
1617
  }
1258
1618
  async expectStartDateToBeInferred() {
1259
1619
  const dateTimePicker = await this.getFirstDateEditor();
@@ -1299,6 +1659,7 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
1299
1659
  await this.page.locator("#release-form-title").fill(name);
1300
1660
  }
1301
1661
  async setDescription(description) {
1662
+ await this.page.locator(".task-description").hover();
1302
1663
  await this.page.locator(".display > .xl-icon").first().click();
1303
1664
  await this.page.locator("textarea").click();
1304
1665
  await this.page.locator("textarea").clear();
@@ -1471,6 +1832,35 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
1471
1832
  async expectDescriptionToBe(description) {
1472
1833
  (0, $hOLA6$expect)(await this.page.locator(".release-description p").textContent()).toContain(description);
1473
1834
  }
1835
+ async expectReleaseNameToBe(name) {
1836
+ await (0, $hOLA6$expect)(this.page.locator('form[name="releasePropertiesForm"]')).toContainText("Properties for " + name);
1837
+ }
1838
+ async expectStartDateReadonly() {
1839
+ await (0, $hOLA6$expect)(this.page.locator("#release-properties .form-group").filter({
1840
+ hasText: "Start date"
1841
+ }).locator(".date-editor.readonly")).toBeVisible();
1842
+ }
1843
+ async expectEndDateReadonly() {
1844
+ await (0, $hOLA6$expect)(this.page.locator("#release-properties .form-group").filter({
1845
+ hasText: "End date"
1846
+ }).locator(".date-editor.readonly")).toBeVisible();
1847
+ }
1848
+ async setOwner(user) {
1849
+ await this.page.locator(".release-owner").click();
1850
+ await this.page.locator(".release-owner input").clear();
1851
+ await this.page.locator(".release-owner input").fill(user);
1852
+ }
1853
+ async expectPageTitleToBeInBreadcrumbLink(releaseName) {
1854
+ (0, $hOLA6$expect)(await this.page.locator(".dot-breadcrumbs a").allTextContents()).toContain(releaseName);
1855
+ }
1856
+ async reloadPage() {
1857
+ await this.page.reload({
1858
+ timeout: 3000
1859
+ });
1860
+ }
1861
+ async expectOwnerToBe(user) {
1862
+ await (0, $hOLA6$expect)(this.page.locator(".release-owner")).toContainText(user);
1863
+ }
1474
1864
  }
1475
1865
 
1476
1866
 
@@ -1496,47 +1886,253 @@ class $96c6280ff1c47b81$export$3bc3e140e0dcb075 extends (0, $9626bc9256ce31f7$ex
1496
1886
 
1497
1887
 
1498
1888
 
1499
- class $87bbb6d35ad31a00$export$f8f26dd395d7e1bd extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1889
+ class $19b7e7e46cfe3be0$export$649fde34d823ece7 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1500
1890
  constructor(page){
1501
1891
  super(page);
1502
- this.tempDir = "";
1503
- this.content = "";
1504
- this.closeIcon = this.page.locator(".xl-icon.close-icon");
1892
+ this.commentBox = this.page.locator(`.input-block-level`);
1893
+ this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
1894
+ this.refreshButton = this.page.getByTestId("refresh-btn");
1895
+ this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
1505
1896
  }
1506
- async createTempFile(fileName, testInfo) {
1507
- const content = fileName.toString();
1508
- const tempDir = testInfo.outputPath(fileName.toString());
1509
- $hOLA6$promises.writeFile(tempDir, content, "utf8");
1897
+ async openContextMenuForTask(taskTitle) {
1898
+ await this.page.locator(".name-cell-wrapper").filter({
1899
+ hasText: taskTitle
1900
+ }).locator(".context-menu-button").click();
1510
1901
  }
1511
- async expandAllFolders() {
1512
- const icExpandTreeview1 = this.page.locator(".rstm-toggle-icon.xl-icon.arrow-right-icon");
1513
- for (const element of (await icExpandTreeview1.all())){
1514
- const blnVal = await element.isVisible();
1515
- if (blnVal) {
1516
- await element.click();
1517
- await this.expandAllFolders();
1518
- }
1902
+ // eslint-disable-next-line max-params
1903
+ async callMenuOptionsForTask(taskTitle, option, taskGroup, taskType) {
1904
+ await this.openContextMenuForTask(taskTitle);
1905
+ await this.page.locator(".dropdown-menu li").getByText(option).click();
1906
+ if (await this.commentBox.isVisible()) await this.commentBox.fill(" Automation Test Comment");
1907
+ else if (await this.page.getByRole("heading", {
1908
+ name: "Change task type"
1909
+ }).isVisible()) {
1910
+ await this.page.getByPlaceholder("Start typing to filter task").click();
1911
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1912
+ // @ts-ignore
1913
+ await this.page.locator("#task-selector").fill(taskGroup);
1914
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1915
+ // @ts-ignore
1916
+ await this.page.getByTestId(taskType).click();
1519
1917
  }
1520
- await (0, $hOLA6$expect)(icExpandTreeview1).not.toBeVisible();
1521
- }
1522
- async openSideNavMenu(menuItem) {
1523
- await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
1918
+ if (await this.page.getByRole("button", {
1919
+ name: option,
1524
1920
  exact: true
1525
- }).scrollIntoViewIfNeeded();
1526
- await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
1921
+ }).isVisible()) await this.page.getByRole("button", {
1922
+ name: option,
1527
1923
  exact: true
1528
1924
  }).click();
1529
1925
  }
1530
- async openNestedMenuItem(nestedMenuItem) {
1531
- await this.page.locator(".MuiList-root li").getByText(nestedMenuItem, {
1532
- exact: true
1533
- }).scrollIntoViewIfNeeded();
1534
- await this.page.locator(".MuiList-root li").getByText(nestedMenuItem, {
1535
- exact: true
1536
- }).click();
1926
+ async expectAssignToUser(taskTitle, username) {
1927
+ await this.refreshButton.click();
1928
+ (0, $hOLA6$expect)(await this.page.locator(".ui-grid-row").filter({
1929
+ hasText: taskTitle
1930
+ }).locator(`span[display-user="row.entity.planItem.owner"] span`).textContent()).toContain(username);
1537
1931
  }
1538
- async clickCloseIcon() {
1539
- await this.closeIcon.click();
1932
+ async expectToHasGateIcon(taskTitle) {
1933
+ await (0, $hOLA6$expect)(this.page.locator(".ui-grid-row").filter({
1934
+ hasText: taskTitle
1935
+ }).locator(".marker-check-icon")).toBeVisible();
1936
+ }
1937
+ async expectTaskRowCountToBe(title, expectedCount) {
1938
+ await this.refreshButton.click();
1939
+ (0, $hOLA6$expect)(await this.page.locator(".name-cell-title").filter({
1940
+ hasText: title
1941
+ }).count()).toBe(expectedCount);
1942
+ }
1943
+ async setHeaderFilter(columnTitle, valueToFilter) {
1944
+ const filter = this.page.locator(`.ui-grid-header-cell`).filter({
1945
+ hasText: columnTitle
1946
+ }).locator(`input`);
1947
+ await filter.clear();
1948
+ await filter.fill(valueToFilter);
1949
+ }
1950
+ async expectRowCountToBe(cellCount) {
1951
+ const cont = await this.page.locator(".ui-grid-canvas .name-cell").count();
1952
+ (0, $hOLA6$expect)(cont).toBe(cellCount);
1953
+ }
1954
+ async filterStartDate(date, monthYear) {
1955
+ await this.page.locator(`.ui-grid-header-cell`).filter({
1956
+ hasText: "Start Date"
1957
+ }).locator(`input`).click();
1958
+ await this.dateUtil.setDate(date, monthYear);
1959
+ }
1960
+ async filterEndDate(date, monthYear) {
1961
+ await this.page.locator(`.ui-grid-header-cell`).filter({
1962
+ hasText: "End Date"
1963
+ }).locator(`input`).click();
1964
+ await this.dateUtil.setDate(date, monthYear);
1965
+ }
1966
+ async openTaskDrawer(taskTitle) {
1967
+ await this.page.locator(".name-cell-title").filter({
1968
+ hasText: taskTitle
1969
+ }).click();
1970
+ return this.taskDrawer;
1971
+ }
1972
+ async collapseNthRowByIndex(Indexnumber) {
1973
+ await this.page.locator(".task-group-toggle .xl-icon.arrow-down-icon").nth(Indexnumber).click();
1974
+ }
1975
+ async closePhaseModal() {
1976
+ await this.page.locator("button[type='button'] i[class='xl-icon close-icon']").click();
1977
+ }
1978
+ async expectTaskToHaveStatus(taskTitle, status) {
1979
+ await this.refreshButton.click();
1980
+ (0, $hOLA6$expect)(await this.page.locator(".ui-grid-row").filter({
1981
+ hasText: taskTitle
1982
+ }).locator(".label ").textContent()).toContain(status);
1983
+ }
1984
+ async expectOverdueOnEndDate(taskTitle) {
1985
+ (0, $hOLA6$expect)(await this.page.locator(`.ui-grid-row`).filter({
1986
+ hasText: taskTitle
1987
+ }).locator(`i.xl-icon.delay-icon.overdue-icon`).isVisible()).toBe(true);
1988
+ }
1989
+ async selectTask(taskTitle) {
1990
+ await this.page.locator(`.ui-grid-cell-contents`).filter({
1991
+ hasText: taskTitle
1992
+ }).locator(`.item-selector`).click({
1993
+ force: true
1994
+ });
1995
+ }
1996
+ async expectSelectedTasksCounter(text) {
1997
+ await (0, $hOLA6$expect)(this.page.getByTestId("release-grid-selected-tasks")).toBeVisible();
1998
+ (0, $hOLA6$expect)(await this.page.getByTestId("release-grid-selected-tasks").textContent()).toContain(text);
1999
+ }
2000
+ async clearSelection() {
2001
+ await this.page.getByTestId("release-grid-unselect-btn").click();
2002
+ return this;
2003
+ }
2004
+ async assignSelectedTasks(owner, team) {
2005
+ await this.page.getByText("Assign to").click();
2006
+ if (owner) {
2007
+ const ownerSelector = this.page.locator(".task-owner");
2008
+ await ownerSelector.focus();
2009
+ await ownerSelector.click();
2010
+ await this.page.getByLabel("*").fill(owner);
2011
+ await this.page.locator("a").filter({
2012
+ hasText: owner
2013
+ }).click();
2014
+ }
2015
+ if (team) {
2016
+ const teamSelector = this.page.locator(".task-team > .display");
2017
+ await teamSelector.focus();
2018
+ await teamSelector.click();
2019
+ await this.page.getByLabel(team, {
2020
+ exact: true
2021
+ }).selectOption(team);
2022
+ }
2023
+ await this.page.getByRole("button", {
2024
+ name: "Assign"
2025
+ }).click();
2026
+ return this;
2027
+ }
2028
+ async expectSuccessMessage(successMessage) {
2029
+ await (0, $hOLA6$expect)(this.page.getByLabel("success")).toContainText(successMessage);
2030
+ return this;
2031
+ }
2032
+ async completeSelectedTasks(comment) {
2033
+ await this.page.getByTestId("release-grid-complete-btn").click();
2034
+ await this.page.getByPlaceholder("Give feedback or place a").fill(comment);
2035
+ await this.page.getByRole("button", {
2036
+ name: "Complete"
2037
+ }).click();
2038
+ return this;
2039
+ }
2040
+ async selectFromMoreActions(menuItem) {
2041
+ await this.page.getByTestId("release-grid-dropdown-btn").click();
2042
+ await this.page.getByRole("menuitem", {
2043
+ name: menuItem
2044
+ }).click();
2045
+ if (await this.commentBox.isVisible() == true) await this.commentBox.fill(" Automation Test Comment");
2046
+ if (await this.page.getByRole("button", {
2047
+ name: menuItem,
2048
+ exact: true
2049
+ }).isVisible() == true) await this.page.getByRole("button", {
2050
+ name: menuItem,
2051
+ exact: true
2052
+ }).click();
2053
+ return this;
2054
+ }
2055
+ async addCommentToSelectedTask(comment) {
2056
+ await this.page.getByTestId("release-grid-comment-btn").click();
2057
+ await this.page.getByPlaceholder("Give feedback or place a").click();
2058
+ await this.page.getByPlaceholder("Give feedback or place a").fill(comment);
2059
+ await this.page.getByRole("button", {
2060
+ name: "Comment"
2061
+ }).click();
2062
+ await (0, $hOLA6$expect)(this.page.getByLabel("success")).toBeVisible();
2063
+ return this;
2064
+ }
2065
+ async selectSubtasks(item) {
2066
+ await this.page.locator(`.ui-grid-cell-contents`).filter({
2067
+ hasText: item
2068
+ }).locator(`.tasks-group-select`).click({
2069
+ force: true
2070
+ });
2071
+ return this;
2072
+ }
2073
+ async shiftSelectFromTo(taskFrom, taskTo) {
2074
+ await this.page.locator(`.ui-grid-cell-contents`).filter({
2075
+ hasText: taskFrom
2076
+ }).locator(`.item-selector`).click({
2077
+ force: true
2078
+ });
2079
+ await this.page.keyboard.down("Shift");
2080
+ await this.page.locator(`.ui-grid-cell-contents`).filter({
2081
+ hasText: taskTo
2082
+ }).locator(`.item-selector`).click({
2083
+ force: true
2084
+ });
2085
+ await this.page.keyboard.up("Shift");
2086
+ return this;
2087
+ }
2088
+ }
2089
+
2090
+
2091
+
2092
+
2093
+
2094
+
2095
+ class $87bbb6d35ad31a00$export$f8f26dd395d7e1bd extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
2096
+ constructor(page){
2097
+ super(page);
2098
+ this.tempDir = "";
2099
+ this.content = "";
2100
+ this.closeIcon = this.page.locator(".xl-icon.close-icon");
2101
+ }
2102
+ async createTempFile(fileName, testInfo) {
2103
+ const content = fileName.toString();
2104
+ const tempDir = testInfo.outputPath(fileName.toString());
2105
+ $hOLA6$promises.writeFile(tempDir, content, "utf8");
2106
+ }
2107
+ async expandAllFolders() {
2108
+ const icExpandTreeview1 = this.page.locator(".rstm-toggle-icon.xl-icon.arrow-right-icon");
2109
+ for (const element of (await icExpandTreeview1.all())){
2110
+ const blnVal = await element.isVisible();
2111
+ if (blnVal) {
2112
+ await element.click();
2113
+ await this.expandAllFolders();
2114
+ }
2115
+ }
2116
+ await (0, $hOLA6$expect)(icExpandTreeview1).not.toBeVisible();
2117
+ }
2118
+ async openSideNavMenu(menuItem) {
2119
+ await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
2120
+ exact: true
2121
+ }).scrollIntoViewIfNeeded();
2122
+ await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
2123
+ exact: true
2124
+ }).click();
2125
+ }
2126
+ async openNestedMenuItem(nestedMenuItem) {
2127
+ await this.page.locator(".MuiList-root li").getByText(nestedMenuItem, {
2128
+ exact: true
2129
+ }).scrollIntoViewIfNeeded();
2130
+ await this.page.locator(".MuiList-root li").getByText(nestedMenuItem, {
2131
+ exact: true
2132
+ }).click();
2133
+ }
2134
+ async clickCloseIcon() {
2135
+ await this.closeIcon.click();
1540
2136
  }
1541
2137
  async clickOnStatusField() {
1542
2138
  await this.page.locator(".ci-filter-status.ng-isolate-scope").click();
@@ -1576,15 +2172,18 @@ class $87bbb6d35ad31a00$export$f8f26dd395d7e1bd extends (0, $9626bc9256ce31f7$ex
1576
2172
 
1577
2173
 
1578
2174
  class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
2175
+ defaultTimeout = 10000;
1579
2176
  constructor(page){
1580
2177
  super(page);
2178
+ this.addPhaseBtn = this.page.getByTestId("add-phase-btn");
1581
2179
  this.createPage = new (0, $05d91a1d3381a287$export$34addcca3f0ae43f)(page);
1582
2180
  this.ganttPage = new (0, $a546aadb4e6fa16a$export$5a82be0a2a261cc6)(page);
2181
+ this.tableView = new (0, $19b7e7e46cfe3be0$export$649fde34d823ece7)(page);
1583
2182
  this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
1584
2183
  this.teamsPermissions = new (0, $96c6280ff1c47b81$export$3bc3e140e0dcb075)(page);
1585
2184
  this.phaseTitle = this.page.locator(".phase .phase-title");
1586
2185
  this.properties = new (0, $c9bb587dd92143c3$export$d1077068a9cc9f17)(page);
1587
- this.variables = new (0, $f48771b486a3eb8f$export$a87f0ae8695e74be)(page);
2186
+ this.variables = new (0, $dfc4ce40cbd0eb71$export$f8e64fcf447db2bf)(page);
1588
2187
  this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
1589
2188
  }
1590
2189
  async openTriggers() {
@@ -1599,6 +2198,7 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
1599
2198
  await this.page.getByRole("button", {
1600
2199
  name: "Abort"
1601
2200
  }).click();
2201
+ await this.page.locator(".progress-status-and-percentage").waitFor();
1602
2202
  await (0, $hOLA6$expect)(this.page.locator(".progress-status-and-percentage")).toContainText("Aborted");
1603
2203
  }
1604
2204
  getPhase(phaseName) {
@@ -1622,75 +2222,87 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
1622
2222
  await this.page.getByRole("button", {
1623
2223
  name: "Start"
1624
2224
  }).click();
2225
+ await this.page.waitForSelector("#release");
1625
2226
  }
1626
- async waitForCompletion(timeout) {
2227
+ async waitForCompletion(timeout = this.defaultTimeout) {
1627
2228
  await this.page.locator("#release.completed").waitFor({
1628
2229
  timeout: timeout
1629
2230
  });
1630
2231
  }
1631
- async waitForTaskCompleted(taskTitle) {
2232
+ async waitForTaskCompleted(taskTitle, timeout = this.defaultTimeout) {
1632
2233
  await (0, $hOLA6$expect)(this.page.locator(".task.completed").getByText(taskTitle, {
1633
2234
  exact: true
2235
+ })).toBeVisible({
2236
+ timeout: timeout
2237
+ });
2238
+ }
2239
+ async waitForTaskNeedsInput(taskTitle) {
2240
+ await (0, $hOLA6$expect)(this.page.locator(".task.waiting_for_input").getByText(taskTitle, {
2241
+ exact: true
1634
2242
  })).toBeVisible({
1635
2243
  timeout: 10000
1636
2244
  });
1637
2245
  }
1638
- async waitForTaskCompletedInAdvance(taskTitle) {
2246
+ async waitForTaskCompletedInAdvance(taskTitle, timeout = this.defaultTimeout) {
1639
2247
  await (0, $hOLA6$expect)(this.page.locator(".task.completed_in_advance").getByText(taskTitle, {
1640
2248
  exact: true
1641
2249
  })).toBeVisible({
1642
- timeout: 10000
2250
+ timeout: timeout
1643
2251
  });
1644
2252
  }
1645
- async waitForTaskInProgress(taskTitle) {
2253
+ async waitForTaskInProgress(taskTitle, timeout = this.defaultTimeout) {
1646
2254
  await (0, $hOLA6$expect)(this.page.locator(".task.in_progress").getByText(taskTitle, {
1647
2255
  exact: true
1648
- })).toBeVisible();
2256
+ })).toBeVisible({
2257
+ timeout: timeout
2258
+ });
1649
2259
  }
1650
- async waitForTaskFailed(taskTitle) {
2260
+ async waitForTaskFailed(taskTitle, timeout = this.defaultTimeout) {
1651
2261
  await (0, $hOLA6$expect)(this.page.locator(".task.failed").getByText(taskTitle, {
1652
2262
  exact: true
1653
2263
  })).toBeVisible({
1654
- timeout: 10000
2264
+ timeout: timeout
1655
2265
  });
1656
2266
  }
1657
- async waitForTaskSkipped(taskTitle) {
2267
+ async waitForTaskSkipped(taskTitle, timeout = this.defaultTimeout) {
1658
2268
  await (0, $hOLA6$expect)(this.page.locator(".task.skipped").getByText(taskTitle, {
1659
2269
  exact: true
1660
2270
  })).toBeVisible({
1661
- timeout: 10000
2271
+ timeout: timeout
1662
2272
  });
1663
2273
  }
1664
- async waitForTaskSkippedInAdvance(taskTitle) {
2274
+ async waitForTaskSkippedInAdvance(taskTitle, timeout = this.defaultTimeout) {
1665
2275
  await (0, $hOLA6$expect)(this.page.locator(".task.skipped_in_advance").getByText(taskTitle, {
1666
2276
  exact: true
1667
2277
  })).toBeVisible({
1668
- timeout: 10000
2278
+ timeout: timeout
1669
2279
  });
1670
2280
  }
1671
- async waitForTaskAborted(taskTitle) {
2281
+ async waitForTaskAborted(taskTitle, timeout = this.defaultTimeout) {
1672
2282
  await (0, $hOLA6$expect)(this.page.locator(".task.aborted").getByText(taskTitle, {
1673
2283
  exact: true
1674
2284
  })).toBeVisible({
1675
- timeout: 10000
2285
+ timeout: timeout
1676
2286
  });
1677
2287
  }
1678
- async waitForStatusLine(statusLine) {
2288
+ async waitForStatusLine(statusLine, timeout = this.defaultTimeout) {
1679
2289
  await (0, $hOLA6$expect)(this.page.locator(".task .status-line").getByText(statusLine, {
1680
2290
  exact: true
1681
2291
  })).toBeVisible({
1682
- timeout: 10000
2292
+ timeout: timeout
1683
2293
  });
1684
2294
  }
1685
- async waitForTaskStarted(taskTitle) {
2295
+ async waitForTaskStarted(taskTitle, timeout = this.defaultTimeout) {
1686
2296
  await (0, $hOLA6$expect)(this.page.locator(".task.in_progress").getByTitle(taskTitle, {
1687
2297
  exact: true
1688
2298
  })).toBeVisible({
1689
- timeout: 10000
2299
+ timeout: timeout
1690
2300
  });
1691
2301
  }
1692
- async waitForTaskPlanned(title) {
1693
- await (0, $hOLA6$expect)(this.page.locator(`.task:has-text('${title}').planned`)).toBeVisible();
2302
+ async waitForTaskPlanned(title, timeout = this.defaultTimeout) {
2303
+ await (0, $hOLA6$expect)(this.page.locator(`.task:has-text('${title}').planned`)).toBeVisible({
2304
+ timeout: timeout
2305
+ });
1694
2306
  }
1695
2307
  async expectTaskCompletedInAdvance(taskTitle) {
1696
2308
  await (0, $hOLA6$expect)(this.page.locator("#release-content .completed_in_advance .task-title").filter({
@@ -1815,6 +2427,10 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
1815
2427
  });
1816
2428
  (0, $hOLA6$expect)(await this.page.locator(".progress-status-and-percentage").textContent()).toContain("Aborted");
1817
2429
  }
2430
+ async expectInProgressStatusToBePresent() {
2431
+ await this.page.getByTestId("refresh-btn").click();
2432
+ (0, $hOLA6$expect)(await this.page.locator(".progress-status-and-percentage").textContent()).toContain("In progress");
2433
+ }
1818
2434
  async openTableView() {
1819
2435
  await this.util.openSideNavMenu("Table");
1820
2436
  await (0, $hOLA6$expect)(this.page.locator(".release-grid-container")).toBeVisible();
@@ -1847,7 +2463,7 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
1847
2463
  })).toBeVisible();
1848
2464
  }
1849
2465
  async addNewPhase(phaseName) {
1850
- await this.page.getByTestId("add-phase-btn").click();
2466
+ await this.addPhaseBtn.click();
1851
2467
  if (phaseName) {
1852
2468
  await this.phaseTitle.getByText("New Phase").click();
1853
2469
  await this.phaseTitle.getByRole("textbox").clear();
@@ -1915,6 +2531,16 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
1915
2531
  async expectOnePhaseDisplayed() {
1916
2532
  (0, $hOLA6$expect)(await this.page.locator(".phase-content").count()).toBe(1);
1917
2533
  }
2534
+ async restartPhases() {
2535
+ await this.page.getByTestId("restart-btn").click();
2536
+ return new $43cbcdfccb6c2a76$var$RestartPhaseModel(this.page);
2537
+ }
2538
+ async expectAddPhaseNotVisible() {
2539
+ await (0, $hOLA6$expect)(this.addPhaseBtn).not.toBeVisible();
2540
+ }
2541
+ async expectAddTaskNotVisible() {
2542
+ await (0, $hOLA6$expect)(this.page.locator(".add-task.link")).not.toBeVisible();
2543
+ }
1918
2544
  }
1919
2545
  class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1920
2546
  constructor(page, phaseName){
@@ -2007,6 +2633,23 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
2007
2633
  exact: true
2008
2634
  }).click();
2009
2635
  }
2636
+ async completeFromContextMenu(taskTitle, comment) {
2637
+ await this.openContextMenuForTask(taskTitle);
2638
+ await this.page.locator(".dropdown-menu li").getByText("Complete").click();
2639
+ await this.commentBox.fill(comment);
2640
+ await this.page.getByRole("button", {
2641
+ name: "Complete",
2642
+ exact: true
2643
+ }).click();
2644
+ }
2645
+ async assignToMeFromContextMenu(taskTitle) {
2646
+ await this.openContextMenuForTask(taskTitle);
2647
+ await this.page.locator(".dropdown-menu li").getByText("Assign to me").click();
2648
+ }
2649
+ async duplicateFromContextMenu(taskTitle) {
2650
+ await this.openContextMenuForTask(taskTitle);
2651
+ await this.page.locator(".dropdown-menu li").getByText("Duplicate").click();
2652
+ }
2010
2653
  async expectTemplateLabelNotToBePresent() {
2011
2654
  await (0, $hOLA6$expect)(this.page.locator(".dot-chip").filter({
2012
2655
  hasText: "TEMPLATE"
@@ -2084,6 +2727,43 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
2084
2727
  hasText: phaseName
2085
2728
  })).not.toBeVisible();
2086
2729
  }
2730
+ async expectCompletedPhase() {
2731
+ await (0, $hOLA6$expect)(this.page.getByText("View all completed phases")).toBeVisible();
2732
+ }
2733
+ async clickViewAllCompletedPhase() {
2734
+ await this.page.getByText("View all completed phases").click();
2735
+ }
2736
+ async expectTaskToBePresent(taskName) {
2737
+ await (0, $hOLA6$expect)(this.phaseLocator.locator(".task").filter({
2738
+ hasText: taskName
2739
+ })).toBeVisible();
2740
+ }
2741
+ }
2742
+ class $43cbcdfccb6c2a76$var$RestartPhaseModel extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
2743
+ constructor(page){
2744
+ super(page);
2745
+ this.continueBtn = this.page.getByRole("button", {
2746
+ name: "Continue"
2747
+ });
2748
+ }
2749
+ async fromPhase(phase) {
2750
+ await this.page.locator('.modal select[data-test="fromPhase"]').selectOption(phase);
2751
+ }
2752
+ async fromTask(task) {
2753
+ await this.page.locator('.modal select[data-test="fromTask"]').selectOption(task);
2754
+ }
2755
+ async expectNoTaskSelectorVisible() {
2756
+ (0, $hOLA6$expect)(await this.page.locator('.modal select[data-test="fromTask"]').isVisible()).toHaveLength(0);
2757
+ }
2758
+ async continue() {
2759
+ await this.page.locator(".modal .continue").click();
2760
+ }
2761
+ async resumeNow() {
2762
+ await this.page.locator(".modal .resume-now").click();
2763
+ }
2764
+ async resumeLater() {
2765
+ await this.page.locator(".modal .resume-later").click();
2766
+ }
2087
2767
  }
2088
2768
 
2089
2769
 
@@ -2185,6 +2865,9 @@ class $4cdce1306be47ecd$export$eace2be4de1d3377 extends (0, $9626bc9256ce31f7$ex
2185
2865
  hasText: "Deleted release delivery successfully"
2186
2866
  })).toBeVisible();
2187
2867
  }
2868
+ async expectDeliveryDisplayed(deliveryName) {
2869
+ (0, $hOLA6$expect)(await this.page.locator(".fc-list-item-title").textContent()).toContain(deliveryName);
2870
+ }
2188
2871
  }
2189
2872
 
2190
2873
 
@@ -2561,6 +3244,7 @@ class $7e73332bf754777c$export$32284f8bcf0bc407 extends (0, $9626bc9256ce31f7$ex
2561
3244
 
2562
3245
 
2563
3246
 
3247
+
2564
3248
  class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
2565
3249
  constructor(page){
2566
3250
  super(page);
@@ -2572,6 +3256,7 @@ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$ex
2572
3256
  this.notificationPage = new (0, $7e73332bf754777c$export$32284f8bcf0bc407)(page);
2573
3257
  this.patternPage = new (0, $d13e78163af94d50$export$9b9454a7f137e99b)(page);
2574
3258
  this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
3259
+ this.variables = new (0, $dfc4ce40cbd0eb71$export$f8e64fcf447db2bf)(page);
2575
3260
  }
2576
3261
  async openFoldersPage() {
2577
3262
  await this.page.goto("./#/folders");
@@ -2713,6 +3398,30 @@ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$ex
2713
3398
  await this.util.openSideNavMenu("Templates");
2714
3399
  await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Templates")).toBeVisible();
2715
3400
  }
3401
+ async openRelease() {
3402
+ await this.util.openSideNavMenu("Releases");
3403
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Releases")).toBeVisible();
3404
+ }
3405
+ async expectReleaseStarted(releaseName) {
3406
+ await (0, $hOLA6$expect)(this.page.locator(".release").filter({
3407
+ hasText: releaseName
3408
+ }).locator(".release-status").filter({
3409
+ hasText: "In progress"
3410
+ })).toBeVisible();
3411
+ }
3412
+ async openVariables() {
3413
+ await this.util.openSideNavMenu("Variables");
3414
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Variables")).toBeVisible();
3415
+ return this.variables;
3416
+ }
3417
+ async openCustomDashboard() {
3418
+ await this.util.openSideNavMenu("Custom dashboards");
3419
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Custom dashboards")).toBeVisible();
3420
+ }
3421
+ async openReleaseByName(releaseName) {
3422
+ await this.page.getByTitle(releaseName).click();
3423
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Flow")).toBeVisible();
3424
+ }
2716
3425
  }
2717
3426
 
2718
3427
 
@@ -3681,173 +4390,496 @@ class $3a340a3f4fd8f04d$export$43682cddead1dd78 extends (0, $9626bc9256ce31f7$ex
3681
4390
  // Check if the release name present in redirected URL
3682
4391
  (0, $hOLA6$expect)(currentURL).toContain(releaseurl);
3683
4392
  }
3684
- async viewDependency(source_release, dest_release) {
3685
- const source_text = source_release + "dependencies";
3686
- await this.page.locator(".tl-header-navigation").getByRole("combobox").click();
3687
- await this.page.getByRole("option", {
3688
- name: "Day"
3689
- }).click();
3690
- await this.page.getByRole("button", {
3691
- name: "Today"
3692
- }).click();
3693
- await this.page.getByText(source_release).click();
3694
- await this.page.locator(".release-modal-container").locator(".xl-icon.cluster-dependencies-icon").click();
3695
- await (0, $hOLA6$expect)(this.page.locator(".tl-drawer-navigation-header")).toHaveText(source_text);
3696
- await (0, $hOLA6$expect)(this.page.locator(".tl-drawer-dependency-body-title-text")).toHaveText(dest_release);
4393
+ async viewDependency(source_release, dest_release) {
4394
+ const source_text = source_release + "dependencies";
4395
+ await this.page.locator(".tl-header-navigation").getByRole("combobox").click();
4396
+ await this.page.getByRole("option", {
4397
+ name: "Day"
4398
+ }).click();
4399
+ await this.page.getByRole("button", {
4400
+ name: "Today"
4401
+ }).click();
4402
+ await this.page.getByText(source_release).click();
4403
+ await this.page.locator(".release-modal-container").locator(".xl-icon.cluster-dependencies-icon").click();
4404
+ await (0, $hOLA6$expect)(this.page.locator(".tl-drawer-navigation-header")).toHaveText(source_text);
4405
+ await (0, $hOLA6$expect)(this.page.locator(".tl-drawer-dependency-body-title-text")).toHaveText(dest_release);
4406
+ }
4407
+ async downloadIcsCalendar(release_title) {
4408
+ let downloadCount = 0;
4409
+ // Listen to download events
4410
+ this.page.on("download", (_download)=>{
4411
+ downloadCount++;
4412
+ });
4413
+ await this.page.locator(".tl-header-navigation").getByRole("combobox").click();
4414
+ await this.page.getByRole("option", {
4415
+ name: "Day"
4416
+ }).click();
4417
+ await this.page.getByRole("button", {
4418
+ name: "Today"
4419
+ }).click();
4420
+ await this.page.getByText(release_title).click();
4421
+ await this.page.locator(".release-modal-container").locator(".xl-icon.calendar-icon").click();
4422
+ return downloadCount;
4423
+ }
4424
+ }
4425
+
4426
+
4427
+
4428
+
4429
+ class $cc2d15e53de5cef7$export$b6fbc3e67030138f extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
4430
+ async setStatus(status) {
4431
+ await this.page.locator(".react-tagsinput").click({
4432
+ force: true
4433
+ });
4434
+ await this.page.getByText("Clear all").click();
4435
+ await this.page.locator(".react-tagsinput").click({
4436
+ force: true
4437
+ });
4438
+ if (status === "Select all") await this.page.getByText(status).click();
4439
+ else await this.page.getByTitle(status).locator("i").first().click();
4440
+ }
4441
+ async openReleaseGroup(title) {
4442
+ await this.page.locator("xlr-release-group-row").filter({
4443
+ hasText: title
4444
+ }).getByRole("link").click();
4445
+ await this.page.getByTitle(title).click();
4446
+ await (0, $hOLA6$expect)(this.page).toHaveURL(/.*ReleaseGroup/);
4447
+ }
4448
+ async expectReleaseGroupStatus(status) {
4449
+ await (0, $hOLA6$expect)(this.page.locator(".release-status")).toContainText(status);
4450
+ }
4451
+ async expectReleaseGroupDisplayed(title) {
4452
+ await (0, $hOLA6$expect)(this.page.getByText(title, {
4453
+ exact: true
4454
+ })).toBeVisible();
4455
+ }
4456
+ async expectReleaseGroupNotDisplayed(title) {
4457
+ await (0, $hOLA6$expect)(this.page.getByText(title, {
4458
+ exact: true
4459
+ })).not.toBeVisible();
4460
+ }
4461
+ async searchReleaseGroupByTitle(title) {
4462
+ await this.page.getByPlaceholder("Search for groups...", {
4463
+ exact: true
4464
+ }).click();
4465
+ await this.page.getByPlaceholder("Search for groups...", {
4466
+ exact: true
4467
+ }).fill(title);
4468
+ await this.page.getByPlaceholder("Search for groups...", {
4469
+ exact: true
4470
+ }).press("Enter");
4471
+ }
4472
+ async deleteReleaseGroup(title) {
4473
+ await this.page.locator(".fc-list-item-line").filter({
4474
+ hasText: title
4475
+ }).locator(".fc-item-delete").click();
4476
+ await this.page.getByRole("button", {
4477
+ name: "Delete"
4478
+ }).click();
4479
+ }
4480
+ async clickReleaseGroupEdit(title) {
4481
+ await this.page.locator(".fc-list-item-line").filter({
4482
+ hasText: title
4483
+ }).locator(".fc-item-update").click();
4484
+ }
4485
+ async enterReleaseGroupDetails(new_title) {
4486
+ await this.page.locator(".modal-body").locator("#title").fill(new_title);
4487
+ }
4488
+ async clickSaveButton() {
4489
+ await this.page.locator(".modal-footer").getByRole("button", {
4490
+ name: "Save"
4491
+ }).click();
4492
+ }
4493
+ async clickCancelButton() {
4494
+ await this.page.locator(".modal-footer").getByRole("button", {
4495
+ name: "Cancel"
4496
+ }).click();
4497
+ }
4498
+ }
4499
+
4500
+
4501
+
4502
+
4503
+ class $cc231ea61b77c7a2$export$1a0994e9c202d529 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
4504
+ async expectReleaseDisplayed(title) {
4505
+ await (0, $hOLA6$expect)(this.page.getByText(title, {
4506
+ exact: true
4507
+ })).toBeVisible();
4508
+ }
4509
+ async expectReleaseNotDisplayed(title) {
4510
+ await (0, $hOLA6$expect)(this.page.getByText(title, {
4511
+ exact: true
4512
+ })).not.toBeVisible({
4513
+ timeout: 10000
4514
+ });
4515
+ }
4516
+ async expectPhaseDisplayed(title) {
4517
+ await (0, $hOLA6$expect)(this.page.getByText(title, {
4518
+ exact: true
4519
+ })).toBeVisible();
4520
+ }
4521
+ async openContextMenu(title) {
4522
+ await this.page.locator(".timeline-row-name").filter({
4523
+ hasText: title
4524
+ }).locator(".options-icon").click();
4525
+ }
4526
+ async removeFromReleaseGroup() {
4527
+ await this.page.getByRole("menuitem", {
4528
+ name: "Remove from group"
4529
+ }).locator("a").click();
4530
+ await this.page.getByRole("button", {
4531
+ name: "Remove"
4532
+ }).click();
4533
+ }
4534
+ async expectNumberOfReleases(num_of_release) {
4535
+ const elementCount = await this.page.locator(".timeline-row-name-release").count();
4536
+ (0, $hOLA6$expect)(elementCount).toBe(num_of_release);
4537
+ }
4538
+ async openAddReleaseList() {
4539
+ await this.page.getByRole("button", {
4540
+ name: "Add release"
4541
+ }).click();
4542
+ }
4543
+ async filterReleases(title) {
4544
+ await this.page.getByPlaceholder("Search for a release...").click();
4545
+ await this.page.getByPlaceholder("Search for a release...").fill(title);
4546
+ await this.page.waitForTimeout(5000);
4547
+ await this.page.getByPlaceholder("Search for a release...").press("Enter");
4548
+ }
4549
+ async expectNumberOfReleasesOnModal(num_of_release) {
4550
+ const elementCount = await this.page.locator(".release-modal-line").count();
4551
+ (0, $hOLA6$expect)(elementCount).toBe(num_of_release);
4552
+ }
4553
+ async selectAllReleaseCheckbox() {
4554
+ await this.page.getByLabel("Select all").check();
4555
+ }
4556
+ async addReleasesToGroup() {
4557
+ await this.page.getByRole("button", {
4558
+ name: "Add"
4559
+ }).click();
4560
+ }
4561
+ }
4562
+
4563
+
4564
+
4565
+
4566
+
4567
+
4568
+
4569
+ class $f48771b486a3eb8f$export$a87f0ae8695e74be extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
4570
+ constructor(page){
4571
+ super(page);
4572
+ this.addListValue = this.page.locator(".variable-selector .xl-components-input-full input");
4573
+ this.addVariableValue = this.page.locator(".variable-value .xl-components-input-full input");
4574
+ this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
4575
+ this.listAddButton = this.page.getByRole("button", {
4576
+ name: "Add"
4577
+ });
4578
+ }
4579
+ async openVariable(variableKey) {
4580
+ await this.page.locator(`.variables-list .variable`).getByText(variableKey).click();
4581
+ return new $f48771b486a3eb8f$var$ReleaseVariableModal(this.page);
4582
+ }
4583
+ async addNewVariable(variableName, labelname, description) {
4584
+ await this.page.locator("#action-toolbar").getByTestId("dot-button").click();
4585
+ await this.page.fill(`[name="fieldKey"]`, variableName);
4586
+ await this.page.locator(".variable-label input").fill(labelname);
4587
+ if (description) await this.page.locator(".variable-description input").fill(description);
4588
+ }
4589
+ async selectVariableTextType(valuename) {
4590
+ await this.page.getByRole("combobox").selectOption("StringVariable");
4591
+ await this.page.locator(".variable-value").type(valuename);
4592
+ }
4593
+ async selectVariableListboxType(possiblevalue, defaultValue, required) {
4594
+ await this.page.getByRole("combobox").selectOption("DropDownListBox");
4595
+ if (possiblevalue instanceof Array) for (const value of possiblevalue){
4596
+ await this.addListValue.fill(value);
4597
+ await this.listAddButton.click();
4598
+ }
4599
+ else {
4600
+ await this.addListValue.fill(possiblevalue);
4601
+ await this.listAddButton.click();
4602
+ }
4603
+ await this.page.locator(".variable-value select").type(defaultValue);
4604
+ if (required) await this.page.getByRole("checkbox").check();
4605
+ else await this.page.getByRole("checkbox").uncheck();
4606
+ }
4607
+ async selectVariablePasswordType(possiblevalue) {
4608
+ await this.page.getByRole("combobox").selectOption("PasswordStringVariable");
4609
+ await this.page.locator('input[type="password"]').type(possiblevalue);
4610
+ }
4611
+ async selectVariableCheckboxType() {
4612
+ await this.page.getByRole("combobox").selectOption("BooleanVariable");
4613
+ await this.page.getByRole("checkbox").check();
4614
+ }
4615
+ async selectVariableNumberType(possiblevalue) {
4616
+ await this.page.getByRole("combobox").selectOption("IntegerVariable");
4617
+ await this.page.locator('input[ng-model="var.value"]').fill(possiblevalue);
4618
+ }
4619
+ async selectVariableMultiListType(possiblevalue1, possiblevalue2) {
4620
+ await this.page.getByRole("combobox").selectOption("MultiSelectListBox");
4621
+ await this.addListValue.fill(possiblevalue1);
4622
+ await this.listAddButton.click();
4623
+ await this.addListValue.fill(possiblevalue2);
4624
+ await this.listAddButton.click();
4625
+ await this.page.locator(".react-tagsinput").click();
4626
+ await this.page.getByText("Select all", {
4627
+ exact: true
4628
+ }).click();
4629
+ }
4630
+ async addVariableDate() {
4631
+ await this.page.getByRole("combobox").selectOption("DateVariable");
4632
+ await this.page.getByText("Select date").click();
4633
+ }
4634
+ async setDate(date, monthYear) {
4635
+ await this.dateUtil.setDate(date, monthYear);
4636
+ }
4637
+ async addVariableKeyValueMap(keys1, values1) {
4638
+ await this.page.getByRole("combobox").selectOption("MapStringStringVariable");
4639
+ await this.page.getByPlaceholder("key").fill(keys1);
4640
+ await this.page.getByPlaceholder("Value").fill(values1);
4641
+ await this.listAddButton.click();
4642
+ await this.page.locator(".xl-map-string-string-div-buttons .search-icon").click();
4643
+ await this.page.getByRole("row", {
4644
+ name: "Search"
4645
+ }).getByRole("textbox").fill(keys1);
4646
+ const detail = await this.page.locator("table.table-condensed span").allInnerTexts();
4647
+ (0, $hOLA6$expect)(detail[0]).toEqual(keys1);
4648
+ (0, $hOLA6$expect)(detail[1]).toEqual(values1);
4649
+ }
4650
+ async addVariableSet(possiblevalue1) {
4651
+ await this.page.getByRole("combobox").selectOption("SetStringVariable");
4652
+ await this.page.locator(".dip-input input").fill(possiblevalue1);
4653
+ await this.listAddButton.click();
4654
+ }
4655
+ async submitTheVariable() {
4656
+ const createButton = this.page.locator(".modal-footer .save");
4657
+ await (0, $hOLA6$expect)(createButton).toBeEnabled();
4658
+ await createButton.scrollIntoViewIfNeeded();
4659
+ await createButton.click();
4660
+ // Expect is needed here to avoid flackiness on clicking create button
4661
+ await (0, $hOLA6$expect)(createButton).not.toBeVisible();
4662
+ }
4663
+ async expectVariableWithNameValueAndType(name, value, type) {
4664
+ const rowLocator = await this.page.locator(".variable .data-row").allTextContents();
4665
+ (0, $hOLA6$expect)(rowLocator.toString()).toContain(name);
4666
+ (0, $hOLA6$expect)(rowLocator.toString()).toContain(value);
4667
+ (0, $hOLA6$expect)(rowLocator.toString()).toContain(type);
4668
+ }
4669
+ async clickEditVariable(variableName) {
4670
+ await this.page.locator("[id='variables-filter']").fill(variableName);
4671
+ await this.page.getByText("Edit").first().click();
4672
+ return new $f48771b486a3eb8f$var$ReleaseVariableModal(this.page);
4673
+ }
4674
+ async clickDeleteVariable(variableName) {
4675
+ await this.page.locator("[id='variables-filter']").fill(variableName);
4676
+ await this.page.locator(".action .delete-icon").first().click();
4677
+ return new $f48771b486a3eb8f$var$DeleteVariableModel(this.page);
4678
+ }
4679
+ async expectVariablesCountToBe(count) {
4680
+ await (0, $hOLA6$expect)(this.page.locator(".variable .data-row")).toHaveCount(count);
4681
+ }
4682
+ async expectVariableNotPresent(variableName) {
4683
+ await (0, $hOLA6$expect)(this.page.locator(".variable").filter({
4684
+ hasText: variableName
4685
+ })).not.toBeVisible();
4686
+ }
4687
+ async clearSearch() {
4688
+ await this.page.locator("[id='variables-filter']").clear();
4689
+ }
4690
+ async switchPossibleValuesToVariable(variableName) {
4691
+ await this.page.locator(".variable-toggle button").click();
4692
+ await this.page.locator(".ui-autocomplete-input").fill(variableName);
4693
+ await this.page.locator(".ui-menu-item-wrapper").filter({
4694
+ hasText: `${variableName}`
4695
+ }).click();
4696
+ }
4697
+ async selectVariableListboxTypeWithVariable(variableName, defaultValue, required) {
4698
+ await this.page.getByRole("combobox").selectOption("DropDownListBox");
4699
+ await this.page.locator(".variable-toggle button").click();
4700
+ await this.page.locator(".ui-autocomplete-input").fill(variableName);
4701
+ await this.page.locator(".ui-menu-item-wrapper").filter({
4702
+ hasText: `${variableName}`
4703
+ }).click();
4704
+ await this.page.locator(".variable-value select").type(defaultValue);
4705
+ if (required) await this.page.getByRole("checkbox").check();
4706
+ else await this.page.getByRole("checkbox").uncheck();
4707
+ }
4708
+ }
4709
+ class $f48771b486a3eb8f$var$ReleaseVariableModal extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
4710
+ constructor(page){
4711
+ super(page);
4712
+ this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
4713
+ }
4714
+ async expectValue(locators, expectFn) {
4715
+ const [index, locator] = await (0, $251ce8153733e46f$export$a0f926f04148e5d2)(locators);
4716
+ expectFn[index](locator);
4717
+ }
4718
+ async expectValueToBe(value) {
4719
+ await this.expectValue([
4720
+ this.page.locator("#modal .variable-value input"),
4721
+ this.page.locator("#modal .variable-value .field-readonly"),
4722
+ this.page.locator("#modal .variable-value .xl-map-string-string"),
4723
+ this.page.locator("#modal .variable-value .xl-list-display-mode .text-container")
4724
+ ], [
4725
+ (l)=>(0, $hOLA6$expect)(l).toHaveValue(value),
4726
+ (l)=>(0, $hOLA6$expect)(l).toHaveText(value),
4727
+ (l)=>(0, $hOLA6$expect)(l).toHaveText(value),
4728
+ (l)=>(0, $hOLA6$expect)(l).toHaveText(value)
4729
+ ]);
4730
+ }
4731
+ async expectValueToContain(value) {
4732
+ await this.expectValue([
4733
+ this.page.locator("#modal .variable-value input"),
4734
+ this.page.locator("#modal .variable-value .field-readonly"),
4735
+ this.page.locator("#modal .variable-value .xl-map-string-string"),
4736
+ this.page.locator("#modal .variable-value .xl-list-display-mode")
4737
+ ], [
4738
+ (l)=>(0, $hOLA6$expect)(l.inputValue()).toContain(value),
4739
+ (l)=>(0, $hOLA6$expect)(l).toContainText(value),
4740
+ (l)=>(0, $hOLA6$expect)(l).toContainText(value),
4741
+ (l)=>(0, $hOLA6$expect)(l).toContainText(value)
4742
+ ]);
4743
+ }
4744
+ async close() {
4745
+ await this.page.locator("#modal .modal-header button.close").click();
4746
+ }
4747
+ async expectPossibleValues(possiblevalue) {
4748
+ const listLocator = await this.page.locator(".editor .xl-list-row").allInnerTexts();
4749
+ if (possiblevalue instanceof Array) for (const value of possiblevalue)(0, $hOLA6$expect)(listLocator).toContain(value);
4750
+ else (0, $hOLA6$expect)(listLocator).toContain(possiblevalue);
4751
+ }
4752
+ async expectPossibleVariableValues(possiblevariablevalue) {
4753
+ await (0, $hOLA6$expect)(this.page.locator(".variable-dropdown input")).toHaveValue(possiblevariablevalue);
4754
+ }
4755
+ async addPossibleValue(value) {
4756
+ if (value instanceof Array) for (const li of value){
4757
+ await this.page.locator(".xl-components-input-full input").fill(li);
4758
+ await this.page.getByRole("button", {
4759
+ name: "Add"
4760
+ }).click();
4761
+ }
4762
+ else {
4763
+ await this.page.locator(".xl-components-input-full input").fill(value);
4764
+ await this.page.getByRole("button", {
4765
+ name: "Add"
4766
+ }).click();
4767
+ }
4768
+ }
4769
+ async selectVariableValue(defaultValue) {
4770
+ await this.page.locator(".variable-value select").selectOption(defaultValue);
3697
4771
  }
3698
- async downloadIcsCalendar(release_title) {
3699
- let downloadCount = 0;
3700
- // Listen to download events
3701
- this.page.on("download", (_download)=>{
3702
- downloadCount++;
4772
+ async save() {
4773
+ const saveButton = this.page.locator("#modal .modal-footer .save");
4774
+ await saveButton.scrollIntoViewIfNeeded();
4775
+ await saveButton.click({
4776
+ delay: 2000
3703
4777
  });
3704
- await this.page.locator(".tl-header-navigation").getByRole("combobox").click();
3705
- await this.page.getByRole("option", {
3706
- name: "Day"
3707
- }).click();
3708
- await this.page.getByRole("button", {
3709
- name: "Today"
4778
+ // Expect is needed here to avoid flackiness on clicking save button on modal window
4779
+ await (0, $hOLA6$expect)(saveButton).not.toBeVisible();
4780
+ }
4781
+ async createPossibleValuesVariable(variableName) {
4782
+ await this.page.locator(".variable-toggle button").click();
4783
+ await this.page.locator(".ui-autocomplete-input").fill(variableName);
4784
+ await this.page.locator(".ui-menu-item-wrapper").filter({
4785
+ hasText: `${variableName}`
3710
4786
  }).click();
3711
- await this.page.getByText(release_title).click();
3712
- await this.page.locator(".release-modal-container").locator(".xl-icon.calendar-icon").click();
3713
- return downloadCount;
3714
4787
  }
3715
- }
3716
-
3717
-
3718
-
3719
-
3720
- class $cc2d15e53de5cef7$export$b6fbc3e67030138f extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
3721
- async setStatus(status) {
3722
- await this.page.locator(".react-tagsinput").click({
3723
- force: true
3724
- });
3725
- await this.page.getByText("Clear all").click();
3726
- await this.page.locator(".react-tagsinput").click({
3727
- force: true
3728
- });
3729
- if (status === "Select all") await this.page.getByText(status).click();
3730
- else await this.page.getByTitle(status).locator("i").first().click();
4788
+ async expectVariableValueToBe(value) {
4789
+ (0, $hOLA6$expect)(await this.page.locator('.variable-value select option[selected="selected"]').textContent()).toBe(value);
3731
4790
  }
3732
- async openReleaseGroup(title) {
3733
- await this.page.locator("xlr-release-group-row").filter({
3734
- hasText: title
3735
- }).getByRole("link").click();
3736
- await this.page.getByTitle(title).click();
3737
- await (0, $hOLA6$expect)(this.page).toHaveURL(/.*ReleaseGroup/);
4791
+ async expectNoVariablesInList() {
4792
+ await (0, $hOLA6$expect)(this.page.getByText("No variables defined.")).toBeVisible();
3738
4793
  }
3739
- async expectReleaseGroupStatus(status) {
3740
- await (0, $hOLA6$expect)(this.page.locator(".release-status")).toContainText(status);
4794
+ async expectNameInput(value) {
4795
+ await (0, $hOLA6$expect)(this.page.locator(`#modal .variable-name input`)).toHaveValue(value);
3741
4796
  }
3742
- async expectReleaseGroupDisplayed(title) {
3743
- await (0, $hOLA6$expect)(this.page.getByText(title, {
3744
- exact: true
3745
- })).toBeVisible();
4797
+ async expectLabel(value) {
4798
+ await (0, $hOLA6$expect)(this.page.locator("#modal .variable-label input")).toHaveValue(value);
3746
4799
  }
3747
- async expectReleaseGroupNotDisplayed(title) {
3748
- await (0, $hOLA6$expect)(this.page.getByText(title, {
3749
- exact: true
3750
- })).not.toBeVisible();
4800
+ async expectRequired(value) {
4801
+ if (value == true) await (0, $hOLA6$expect)(this.page.locator('.form-group input[ng-model="var.requiresValue"]')).toBeChecked();
4802
+ else await (0, $hOLA6$expect)(this.page.locator('.form-group input[ng-model="var.requiresValue"]')).not.toBeChecked();
3751
4803
  }
3752
- async searchReleaseGroupByTitle(title) {
3753
- await this.page.getByPlaceholder("Search for groups...", {
3754
- exact: true
3755
- }).click();
3756
- await this.page.getByPlaceholder("Search for groups...", {
3757
- exact: true
3758
- }).fill(title);
3759
- await this.page.getByPlaceholder("Search for groups...", {
3760
- exact: true
3761
- }).press("Enter");
4804
+ async setDescription(description) {
4805
+ await this.page.locator(".variable-description input").click();
4806
+ await this.page.locator(".variable-description input").clear();
4807
+ await this.page.locator(".variable-description input").fill(description);
3762
4808
  }
3763
- async deleteReleaseGroup(title) {
3764
- await this.page.locator(".fc-list-item-line").filter({
3765
- hasText: title
3766
- }).locator(".fc-item-delete").click();
4809
+ async setLabel(labelValue) {
4810
+ await this.page.locator(".variable-label input").fill(labelValue);
4811
+ }
4812
+ async setDate(date, monthYear) {
4813
+ await this.page.locator("#modal .date").click();
4814
+ await this.dateUtil.setDate(date, monthYear);
4815
+ }
4816
+ async setValue(value) {
4817
+ await this.page.locator(".variable-value input").fill(value);
4818
+ }
4819
+ }
4820
+ class $f48771b486a3eb8f$var$DeleteVariableModel extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
4821
+ constructor(page){
4822
+ super(page);
4823
+ this.model = new $f48771b486a3eb8f$var$ReleaseVariableModal(page);
4824
+ this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
4825
+ }
4826
+ async deleteVariable() {
4827
+ await (0, $hOLA6$expect)(this.page.getByRole("heading", {
4828
+ name: "Replace and delete"
4829
+ })).toBeVisible();
3767
4830
  await this.page.getByRole("button", {
3768
4831
  name: "Delete"
3769
4832
  }).click();
3770
4833
  }
3771
- async clickReleaseGroupEdit(title) {
3772
- await this.page.locator(".fc-list-item-line").filter({
3773
- hasText: title
3774
- }).locator(".fc-item-update").click();
4834
+ async replaceItWithVariable(variable) {
4835
+ await this.model.createPossibleValuesVariable(variable);
3775
4836
  }
3776
- async enterReleaseGroupDetails(new_title) {
3777
- await this.page.locator(".modal-body").locator("#title").fill(new_title);
4837
+ async replaceItwithValue(value) {
4838
+ await this.page.locator(".display").click();
4839
+ await this.page.getByLabel("*").fill(value);
3778
4840
  }
3779
- async clickSaveButton() {
3780
- await this.page.locator(".modal-footer").getByRole("button", {
3781
- name: "Save"
4841
+ async clickReplaceAndDelete() {
4842
+ await this.page.getByRole("button", {
4843
+ name: "Replace and delete"
3782
4844
  }).click();
3783
4845
  }
3784
- async clickCancelButton() {
3785
- await this.page.locator(".modal-footer").getByRole("button", {
3786
- name: "Cancel"
4846
+ async addValue(value) {
4847
+ await this.page.locator(".xl-components-input-full input").fill(value);
4848
+ await this.page.getByRole("button", {
4849
+ name: "Add"
3787
4850
  }).click();
3788
4851
  }
3789
- }
3790
-
3791
-
3792
-
3793
-
3794
- class $cc231ea61b77c7a2$export$1a0994e9c202d529 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
3795
- async expectReleaseDisplayed(title) {
3796
- await (0, $hOLA6$expect)(this.page.getByText(title, {
3797
- exact: true
3798
- })).toBeVisible();
3799
- }
3800
- async expectReleaseNotDisplayed(title) {
3801
- await (0, $hOLA6$expect)(this.page.getByText(title, {
3802
- exact: true
3803
- })).not.toBeVisible({
3804
- timeout: 10000
3805
- });
4852
+ async remove(value) {
4853
+ await this.page.locator("li").filter({
4854
+ hasText: value
4855
+ }).locator("i.close-icon").click();
3806
4856
  }
3807
- async expectPhaseDisplayed(title) {
3808
- await (0, $hOLA6$expect)(this.page.getByText(title, {
3809
- exact: true
4857
+ async expectReplacementPromptDisplayed() {
4858
+ await (0, $hOLA6$expect)(this.page.getByRole("heading", {
4859
+ name: "Replace and delete"
3810
4860
  })).toBeVisible();
3811
4861
  }
3812
- async openContextMenu(title) {
3813
- await this.page.locator(".timeline-row-name").filter({
3814
- hasText: title
3815
- }).locator(".options-icon").click();
3816
- }
3817
- async removeFromReleaseGroup() {
3818
- await this.page.getByRole("menuitem", {
3819
- name: "Remove from group"
3820
- }).locator("a").click();
3821
- await this.page.getByRole("button", {
3822
- name: "Remove"
3823
- }).click();
3824
- }
3825
- async expectNumberOfReleases(num_of_release) {
3826
- const elementCount = await this.page.locator(".timeline-row-name-release").count();
3827
- (0, $hOLA6$expect)(elementCount).toBe(num_of_release);
4862
+ async close() {
4863
+ await this.page.locator("#modal .modal-header button.close").click();
3828
4864
  }
3829
- async openAddReleaseList() {
3830
- await this.page.getByRole("button", {
3831
- name: "Add release"
3832
- }).click();
4865
+ async removeItemOnSet(value) {
4866
+ await this.page.locator("tr").filter({
4867
+ hasText: value
4868
+ }).locator("i.close-icon").click();
3833
4869
  }
3834
- async filterReleases(title) {
3835
- await this.page.getByPlaceholder("Search for a release...").click();
3836
- await this.page.getByPlaceholder("Search for a release...").fill(title);
3837
- await this.page.waitForTimeout(5000);
3838
- await this.page.getByPlaceholder("Search for a release...").press("Enter");
4870
+ async addValueForSet(key, value) {
4871
+ await this.page.locator(".input-key").fill(key);
4872
+ await this.page.locator(".input-value").fill(value);
3839
4873
  }
3840
- async expectNumberOfReleasesOnModal(num_of_release) {
3841
- const elementCount = await this.page.locator(".release-modal-line").count();
3842
- (0, $hOLA6$expect)(elementCount).toBe(num_of_release);
4874
+ async replaceWithIntegerValue(value) {
4875
+ await this.page.locator(".editable").fill(value);
3843
4876
  }
3844
- async selectAllReleaseCheckbox() {
3845
- await this.page.getByLabel("Select all").check();
4877
+ async replaceForBooleanValue() {
4878
+ await this.page.locator(".editor input").click();
3846
4879
  }
3847
- async addReleasesToGroup() {
3848
- await this.page.getByRole("button", {
3849
- name: "Add"
3850
- }).click();
4880
+ async deleteBySettingDate(date, monthYear) {
4881
+ await this.page.locator("#modal .date").click();
4882
+ await this.dateUtil.setDate(date, monthYear);
3851
4883
  }
3852
4884
  }
3853
4885
 
@@ -3855,8 +4887,6 @@ class $cc231ea61b77c7a2$export$1a0994e9c202d529 extends (0, $9626bc9256ce31f7$ex
3855
4887
 
3856
4888
 
3857
4889
 
3858
-
3859
-
3860
4890
  class $c37c93912f458e81$export$60c3bfa6385e2a10 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
3861
4891
  constructor(page){
3862
4892
  super(page);
@@ -3867,6 +4897,17 @@ class $c37c93912f458e81$export$60c3bfa6385e2a10 extends (0, $9626bc9256ce31f7$ex
3867
4897
  await this.filterTaskByTitle(taskName);
3868
4898
  await this.page.getByText(taskName).first().click();
3869
4899
  }
4900
+ async complete(taskName, comment) {
4901
+ await this.page.locator(`.row.task-inner`, {
4902
+ hasText: taskName
4903
+ }).locator("span.complete").click();
4904
+ await this.commentBox.click();
4905
+ await this.commentBox.fill(comment);
4906
+ await this.page.getByRole("button", {
4907
+ name: "Complete",
4908
+ exact: true
4909
+ }).click();
4910
+ }
3870
4911
  async skip(taskName, comment) {
3871
4912
  await this.page.locator(`.row.task-inner`, {
3872
4913
  hasText: taskName
@@ -4426,7 +5467,10 @@ class $0c4084f199d70d72$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
4426
5467
  await this.page.locator(".icon-close").click();
4427
5468
  await this.page.locator("#task-title").fill(taskTitle);
4428
5469
  await this.page.getByTestId("save-select-task-btn").click();
4429
- await (0, $hOLA6$expect)(this.phaseLocator.getByText(taskTitle)).toBeVisible();
5470
+ await this.page.locator("#release-header").click();
5471
+ await (0, $hOLA6$expect)(this.phaseLocator.locator(".task-title").filter({
5472
+ hasText: taskTitle
5473
+ })).toBeVisible();
4430
5474
  }
4431
5475
  async getNumberOfTasks() {
4432
5476
  return await this.phaseLocator.locator(".task").count();
@@ -4974,6 +6018,7 @@ class $2cbb78eec86d0a9f$export$2edf430132ca35d0 extends (0, $9626bc9256ce31f7$ex
4974
6018
  }
4975
6019
 
4976
6020
 
6021
+
4977
6022
  class $e72552cbf941ecfa$export$b8a61e5c71402559 {
4978
6023
  constructor(page){
4979
6024
  this.page = page;
@@ -4998,6 +6043,7 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
4998
6043
  this.releaseGroupPage = new (0, $cc2d15e53de5cef7$export$b6fbc3e67030138f)(page);
4999
6044
  this.releaseGroupTimelinePage = new (0, $cc231ea61b77c7a2$export$1a0994e9c202d529)(page);
5000
6045
  this.releaseListPage = new (0, $5359280e98d97ff9$export$a678525e79c4ccc4)(page);
6046
+ this.releaseGanttPage = new (0, $a546aadb4e6fa16a$export$5a82be0a2a261cc6)(page);
5001
6047
  this.rolesPage = new (0, $208f399edeb35aa2$export$7a5b979a220f477c)(page);
5002
6048
  this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
5003
6049
  this.workflowCatalogPage = new (0, $2c7e9876d54521fb$export$5628dfd1b9e94785)(page);
@@ -5018,6 +6064,10 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
5018
6064
  async openRelease(id) {
5019
6065
  return this.openReleaseOrTemplate(id, true);
5020
6066
  }
6067
+ async openPlannerView(releaseId) {
6068
+ await this.page.goto(`#/releases/${releaseId}/planner`);
6069
+ return new (0, $a546aadb4e6fa16a$export$5a82be0a2a261cc6)(this.page);
6070
+ }
5021
6071
  async openApplicationsPage() {
5022
6072
  return new (0, $c313b10398604df2$export$1533b625ec0c75e2)(this.page).goToApplicationsPage();
5023
6073
  }
@@ -5225,6 +6275,8 @@ const $f86fbaaa8b4e8c61$export$45f0aca2596a2bb3 = function() {
5225
6275
  processTasks(subTask, task, idx);
5226
6276
  });
5227
6277
  (0, $hOLA6$lodasheach)(task.templateVariables, function(variable, idx) {
6278
+ if (variable.value !== undefined) // eslint-disable-next-line @typescript-eslint/ban-ts-comment
6279
+ // @ts-ignore
5228
6280
  (0, $hOLA6$lodashdefaults)(variable, getVariableEntity(variable.value, variable.key, task.id, idx));
5229
6281
  });
5230
6282
  (0, $hOLA6$lodasheach)(task.attachments, function(attachment, idx) {
@@ -5296,6 +6348,8 @@ const $f86fbaaa8b4e8c61$export$45f0aca2596a2bb3 = function() {
5296
6348
  attachment.id = `${release.id}/Attachment${index}`;
5297
6349
  });
5298
6350
  (0, $hOLA6$lodashforEach)(release.variables, function(variable, index) {
6351
+ if (variable.value !== undefined) // eslint-disable-next-line @typescript-eslint/ban-ts-comment
6352
+ // @ts-ignore
5299
6353
  (0, $hOLA6$lodashdefaults)(variable, getVariableEntity(variable.value, variable.key, release.id, index));
5300
6354
  if (variable.valueProvider) (0, $hOLA6$lodashdefaults)(variable.valueProvider, getValueProviderConfigurationEntity(variable.id));
5301
6355
  });
@@ -5346,12 +6400,14 @@ const $80c3ae34677b4324$export$e0969da9b8fb378d = (0, $hOLA6$test).extend({
5346
6400
  class $80c3ae34677b4324$var$Fixtures {
5347
6401
  archivedReleaseIds = [];
5348
6402
  releaseIds = [];
6403
+ riskProfiles = [];
5349
6404
  triggerIds = [];
5350
6405
  configurationIds = [];
5351
6406
  globalVariableIds = [];
5352
6407
  folderIds = [];
5353
6408
  usernames = [];
5354
6409
  userProfiles = [];
6410
+ folderVariableIds = [];
5355
6411
  constructor(request, page){
5356
6412
  this.request = request;
5357
6413
  this.page = page;
@@ -5403,18 +6459,26 @@ class $80c3ae34677b4324$var$Fixtures {
5403
6459
  folder.type = "xlrelease.Folder";
5404
6460
  let teams = folder.teams;
5405
6461
  delete folder.teams;
5406
- //ToDo: Add Children
5407
- /* eslint-disable @typescript-eslint/no-unused-vars */ const children = folder.children || [];
6462
+ const children = folder.children || [];
5408
6463
  delete folder.children;
6464
+ const folderVariables = (folder.variables || []).map((variable)=>{
6465
+ variable.folderId = folder.id;
6466
+ return variable;
6467
+ });
6468
+ delete folder.variables;
5409
6469
  const response = await this.doPost(`api/v1/folders/${parentId}`, folder);
5410
6470
  // Add the folder ID to the list
5411
6471
  this.folderIds.push(folder.id);
5412
6472
  // If teams are provided, send a request to add teams to the folder
5413
6473
  if (teams) {
5414
6474
  teams = this.addSystemTeams(teams);
5415
- const newresponse = await this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
5416
- return newresponse;
6475
+ return await this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
5417
6476
  }
6477
+ if (children && children.length > 0) {
6478
+ await this.folderVariable(folderVariables);
6479
+ return await this.folder(children[0]);
6480
+ }
6481
+ if (folderVariables && folderVariables.length > 0) return await this.folderVariable(folderVariables);
5418
6482
  return response;
5419
6483
  }
5420
6484
  createFolder(folderJson) {
@@ -5423,6 +6487,18 @@ class $80c3ae34677b4324$var$Fixtures {
5423
6487
  folderJson
5424
6488
  ]);
5425
6489
  }
6490
+ async folderVariable(variable) {
6491
+ // Flatten and process the variables
6492
+ const variables = [].concat(variable).flat()// eslint-disable-next-line @typescript-eslint/no-shadow
6493
+ .map((variable)=>{
6494
+ variable.id = null;
6495
+ variable.type = variable.type || "xlrelease.StringVariable";
6496
+ variable.requiresValue = false;
6497
+ variable.showOnReleaseStart = false;
6498
+ return variable;
6499
+ });
6500
+ return await this.doPost("fixtures/folders/variables", variables);
6501
+ }
5426
6502
  trigger(trigger) {
5427
6503
  this.triggerIds.push(trigger.id);
5428
6504
  return this.doPost("fixtures/trigger", trigger);
@@ -5436,6 +6512,9 @@ class $80c3ae34677b4324$var$Fixtures {
5436
6512
  globalRoles(rolePrincipals) {
5437
6513
  return this.doPost(`api/v1/roles/${rolePrincipals.name}`, rolePrincipals);
5438
6514
  }
6515
+ dashboard(dashboard) {
6516
+ return this.doPost("fixtures/dashboard", dashboard);
6517
+ }
5439
6518
  deleteGlobalRole(roleName) {
5440
6519
  return this.doDelete(`api/v1/roles/${roleName}`);
5441
6520
  }
@@ -5489,6 +6568,40 @@ class $80c3ae34677b4324$var$Fixtures {
5489
6568
  variable.showOnReleaseStart = false;
5490
6569
  return this.doPost("api/v1/config/Configuration/variables/global", variable);
5491
6570
  }
6571
+ addDefaultSmtpServer() {
6572
+ const defaultSmtpServer = [
6573
+ {
6574
+ type: "xlrelease.SmtpServer",
6575
+ id: "Configuration/mail/SmtpServer",
6576
+ host: "localhost",
6577
+ port: "25",
6578
+ fromAddress: "foo@bar.com",
6579
+ authentication: {
6580
+ id: "Configuration/mail/SmtpServer/authentication",
6581
+ type: "xlrelease.NoSmtpAuthentication"
6582
+ }
6583
+ }
6584
+ ];
6585
+ return this.doPost("fixtures/", defaultSmtpServer);
6586
+ }
6587
+ riskProfile(riskProfile) {
6588
+ this.riskProfiles.push(riskProfile.id);
6589
+ return this.doPost("fixtures/riskProfiles", riskProfile);
6590
+ }
6591
+ deleteRiskProfile(riskProfileId) {
6592
+ return this.doDelete(`fixtures/riskProfiles/${riskProfileId}`);
6593
+ }
6594
+ // Release delivery pattern
6595
+ createDeliveryPattern(delivery, shouldResetPattern = true) {
6596
+ return this.doPost(`fixtures/deliveries/patterns/${shouldResetPattern}`, delivery);
6597
+ }
6598
+ // Release deliveries
6599
+ createDelivery(delivery) {
6600
+ return this.doPost("fixtures/deliveries", delivery);
6601
+ }
6602
+ deleteDelivery(delivery) {
6603
+ return this.doDelete(`fixtures/deliveries/${delivery}`);
6604
+ }
5492
6605
  async cleanAll() {
5493
6606
  for (const username of this.usernames)await this.deleteUser(username);
5494
6607
  for (const userProfile of this.userProfiles)await this.deleteUserProfile(userProfile);