@digital-ai/devops-page-object-release 0.0.26 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/main.js +1114 -210
- package/dist/main.js.map +1 -1
- package/dist/module.js +1114 -210
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +262 -54
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -310,9 +310,12 @@ class $dfc4ce40cbd0eb71$export$f8e64fcf447db2bf extends (0, $9626bc9256ce31f7$ex
|
|
|
310
310
|
await this.page.locator(".variable-label input").fill(labelname);
|
|
311
311
|
if (description) await this.page.locator(".variable-description input").fill(description);
|
|
312
312
|
}
|
|
313
|
-
async selectVariableTextType(
|
|
313
|
+
async selectVariableTextType(valueName, multiline) {
|
|
314
314
|
await this.page.getByRole("combobox").selectOption("StringVariable");
|
|
315
|
-
|
|
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);
|
|
316
319
|
}
|
|
317
320
|
async selectVariableListboxType(possiblevalue, defaultValue, required) {
|
|
318
321
|
await this.page.getByRole("combobox").selectOption("DropDownListBox");
|
|
@@ -326,7 +329,6 @@ class $dfc4ce40cbd0eb71$export$f8e64fcf447db2bf extends (0, $9626bc9256ce31f7$ex
|
|
|
326
329
|
}
|
|
327
330
|
await this.page.locator(".variable-value select").type(defaultValue);
|
|
328
331
|
if (required) await this.page.getByRole("checkbox").check();
|
|
329
|
-
else await this.page.getByRole("checkbox").uncheck();
|
|
330
332
|
}
|
|
331
333
|
async selectVariablePasswordType(possiblevalue) {
|
|
332
334
|
await this.page.getByRole("combobox").selectOption("PasswordStringVariable");
|
|
@@ -351,9 +353,10 @@ class $dfc4ce40cbd0eb71$export$f8e64fcf447db2bf extends (0, $9626bc9256ce31f7$ex
|
|
|
351
353
|
exact: true
|
|
352
354
|
}).click();
|
|
353
355
|
}
|
|
354
|
-
async
|
|
356
|
+
async selectVariableByDate(date, monthYear) {
|
|
355
357
|
await this.page.getByRole("combobox").selectOption("DateVariable");
|
|
356
358
|
await this.page.getByText("Select date").click();
|
|
359
|
+
await this.setDate(date, monthYear);
|
|
357
360
|
}
|
|
358
361
|
async setDate(date, monthYear) {
|
|
359
362
|
await this.dateUtil.setDate(date, monthYear);
|
|
@@ -431,12 +434,21 @@ class $dfc4ce40cbd0eb71$export$f8e64fcf447db2bf extends (0, $9626bc9256ce31f7$ex
|
|
|
431
434
|
if (required) await this.page.getByRole("checkbox").check();
|
|
432
435
|
else await this.page.getByRole("checkbox").uncheck();
|
|
433
436
|
}
|
|
437
|
+
async clickMultiline() {
|
|
438
|
+
await this.page.locator("#multiline").click();
|
|
439
|
+
}
|
|
434
440
|
async searchFolderVariable(variableName) {
|
|
435
441
|
await this.page.locator(".searchFilter").fill(variableName);
|
|
436
442
|
}
|
|
437
443
|
async clearFolderVarSearch() {
|
|
438
444
|
await this.page.locator(".searchFilter").clear();
|
|
439
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
|
+
}
|
|
440
452
|
}
|
|
441
453
|
class $dfc4ce40cbd0eb71$var$VariableModal extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
442
454
|
constructor(page){
|
|
@@ -548,6 +560,9 @@ class $dfc4ce40cbd0eb71$var$VariableModal extends (0, $9626bc9256ce31f7$export$2
|
|
|
548
560
|
async setValue(value) {
|
|
549
561
|
await this.page.locator(".variable-value input").fill(value);
|
|
550
562
|
}
|
|
563
|
+
async clearValue() {
|
|
564
|
+
await this.page.locator(".variable-value input").clear();
|
|
565
|
+
}
|
|
551
566
|
async clickMultiline() {
|
|
552
567
|
await this.page.locator("#multiline").click();
|
|
553
568
|
}
|
|
@@ -624,6 +639,123 @@ class $dfc4ce40cbd0eb71$var$DeleteVariableModel extends (0, $9626bc9256ce31f7$ex
|
|
|
624
639
|
|
|
625
640
|
|
|
626
641
|
|
|
642
|
+
class $69e86f559cdf2bd0$export$15d3f9b095bb5188 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
643
|
+
async expectCommentToContain(comment) {
|
|
644
|
+
(0, $hOLA6$expect)(await this.page.locator(".markdown-wrapper").textContent()).toContain(comment);
|
|
645
|
+
}
|
|
646
|
+
async expectTaskIsCommentable(isCommentable) {
|
|
647
|
+
return (0, $hOLA6$expect)(await this.page.locator("#task-comment").count()).toBe(isCommentable ? 1 : 0);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
class $9c357602b6f466e7$export$aa59788fdecae2f2 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
655
|
+
async expectWithAttachment(filename) {
|
|
656
|
+
const test = this.page.locator(".task-attachments-grid .file-item-text");
|
|
657
|
+
await test.isVisible();
|
|
658
|
+
await (0, $hOLA6$expect)(test).toContainText(filename);
|
|
659
|
+
}
|
|
660
|
+
async getAttachmentsListCount() {
|
|
661
|
+
return await this.page.locator(".file-upload-list div").count();
|
|
662
|
+
}
|
|
663
|
+
async uploadFile(filePath) {
|
|
664
|
+
const fileChooserPromise = this.page.waitForEvent("filechooser");
|
|
665
|
+
await this.page.getByRole("button", {
|
|
666
|
+
name: "Select file(s)"
|
|
667
|
+
}).click();
|
|
668
|
+
const fileChooser = await fileChooserPromise;
|
|
669
|
+
await fileChooser.setFiles(filePath);
|
|
670
|
+
}
|
|
671
|
+
async downloadFile(filename) {
|
|
672
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
673
|
+
this.page.on("download", ()=>{});
|
|
674
|
+
const downloadPromise = this.page.waitForEvent("download");
|
|
675
|
+
await this.page.locator("li").filter({
|
|
676
|
+
hasText: "" + filename + ""
|
|
677
|
+
}).click();
|
|
678
|
+
await downloadPromise;
|
|
679
|
+
}
|
|
680
|
+
async deleteAttachment(fileName) {
|
|
681
|
+
await this.page.locator("li").filter({
|
|
682
|
+
hasText: fileName
|
|
683
|
+
}).click();
|
|
684
|
+
await this.page.getByLabel("delete file").click();
|
|
685
|
+
await this.page.getByRole("button", {
|
|
686
|
+
name: "Delete"
|
|
687
|
+
}).waitFor({
|
|
688
|
+
state: "visible"
|
|
689
|
+
});
|
|
690
|
+
await this.page.getByRole("button", {
|
|
691
|
+
name: "Delete"
|
|
692
|
+
}).click();
|
|
693
|
+
}
|
|
694
|
+
async expectWithNoAttachment(tempFile) {
|
|
695
|
+
const test = await this.page.locator(".task-attachments-grid .file-item-text").count();
|
|
696
|
+
if (test > 0) await (0, $hOLA6$expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toContainText(tempFile);
|
|
697
|
+
else await (0, $hOLA6$expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toBeVisible();
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
class $115d1e40e2564777$export$a87b4660f21fba58 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
705
|
+
constructor(page){
|
|
706
|
+
super(page);
|
|
707
|
+
}
|
|
708
|
+
async clickAddAttribute() {
|
|
709
|
+
await this.page.getByTestId("add-btn").click();
|
|
710
|
+
}
|
|
711
|
+
async expectAttributeEditable() {
|
|
712
|
+
await (0, $hOLA6$expect)(this.page.locator("#facet-type")).not.toHaveAttribute("readonly", "");
|
|
713
|
+
}
|
|
714
|
+
async addTag(tagName) {
|
|
715
|
+
await this.page.locator("#task-tags").click();
|
|
716
|
+
await this.page.locator("#task-tags").fill(tagName);
|
|
717
|
+
await this.page.locator("#task-tags").press("Enter");
|
|
718
|
+
}
|
|
719
|
+
async expectContainsTag(tagName) {
|
|
720
|
+
if (Array.isArray(tagName)) for (const tag of tagName)await (0, $hOLA6$expect)(this.page.locator(".task-tags-wrapper .dot-chip").filter({
|
|
721
|
+
hasText: tag
|
|
722
|
+
})).toBeVisible();
|
|
723
|
+
else await (0, $hOLA6$expect)(this.page.locator(".task-tags-wrapper .dot-chip").filter({
|
|
724
|
+
hasText: tagName
|
|
725
|
+
})).toBeVisible();
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
class $3fa741329d8067d5$export$d4865631ba74f3e2 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
733
|
+
constructor(page){
|
|
734
|
+
super(page);
|
|
735
|
+
this.railLocator = this.page.locator("task-drawer .dot-drawer .task-conditions");
|
|
736
|
+
this.preconditionToggle = page.getByLabel("Enable precondition");
|
|
737
|
+
this.textEditor = page.getByRole("textbox");
|
|
738
|
+
this.saveButton = page.getByTestId("save-btn");
|
|
739
|
+
}
|
|
740
|
+
async enablePrecondition() {
|
|
741
|
+
(0, $hOLA6$expect)(await this.preconditionToggle.isChecked()).toBe(false);
|
|
742
|
+
await this.preconditionToggle.check();
|
|
743
|
+
}
|
|
744
|
+
async disablePrecondition() {
|
|
745
|
+
(0, $hOLA6$expect)(await this.preconditionToggle.isChecked()).toBe(true);
|
|
746
|
+
await this.preconditionToggle.uncheck();
|
|
747
|
+
}
|
|
748
|
+
async setPrecondition(script) {
|
|
749
|
+
await this.enablePrecondition();
|
|
750
|
+
await this.textEditor.fill(script);
|
|
751
|
+
await this.saveButton.dblclick();
|
|
752
|
+
await this.page.waitForTimeout(1000);
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
|
|
627
759
|
class $e44e9af564fb00f7$export$64c93bc7fb9ca44e extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
628
760
|
constructor(page){
|
|
629
761
|
super(page);
|
|
@@ -683,39 +815,12 @@ class $e44e9af564fb00f7$export$64c93bc7fb9ca44e extends (0, $9626bc9256ce31f7$ex
|
|
|
683
815
|
|
|
684
816
|
|
|
685
817
|
|
|
686
|
-
|
|
687
|
-
class $3fa741329d8067d5$export$d4865631ba74f3e2 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
688
|
-
constructor(page){
|
|
689
|
-
super(page);
|
|
690
|
-
this.railLocator = this.page.locator("task-drawer .dot-drawer .task-conditions");
|
|
691
|
-
this.preconditionToggle = page.getByLabel("Enable precondition");
|
|
692
|
-
this.textEditor = page.getByRole("textbox");
|
|
693
|
-
this.saveButton = page.getByTestId("save-btn");
|
|
694
|
-
}
|
|
695
|
-
async enablePrecondition() {
|
|
696
|
-
(0, $hOLA6$expect)(await this.preconditionToggle.isChecked()).toBe(false);
|
|
697
|
-
await this.preconditionToggle.check();
|
|
698
|
-
}
|
|
699
|
-
async disablePrecondition() {
|
|
700
|
-
(0, $hOLA6$expect)(await this.preconditionToggle.isChecked()).toBe(true);
|
|
701
|
-
await this.preconditionToggle.uncheck();
|
|
702
|
-
}
|
|
703
|
-
async setPrecondition(script) {
|
|
704
|
-
await this.enablePrecondition();
|
|
705
|
-
await this.textEditor.fill(script);
|
|
706
|
-
await this.saveButton.dblclick();
|
|
707
|
-
await this.page.waitForTimeout(1000);
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
818
|
class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
715
819
|
constructor(page){
|
|
716
820
|
super(page);
|
|
717
|
-
this.railLocator = this.page.locator("task-drawer .dot-drawer .task-drawer-content");
|
|
718
821
|
this.dependency = new $90bb70a7e909e500$export$fbbf45eff21470e3(page);
|
|
822
|
+
this.railLocator = this.page.locator("task-drawer .dot-drawer .task-drawer-content");
|
|
823
|
+
this.scriptTextArea = this.page.locator(".code-editor textarea.ace_text-input");
|
|
719
824
|
}
|
|
720
825
|
async openInputProperties() {
|
|
721
826
|
await this.railLocator.locator(".task-config-header").getByText("Input properties").click();
|
|
@@ -763,9 +868,26 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
|
|
|
763
868
|
async setVariable(propertyName, variableName) {
|
|
764
869
|
await this.railLocator.locator(`input[id="${propertyName}"]`).fill(variableName);
|
|
765
870
|
}
|
|
871
|
+
async expectVariable(propertyName) {
|
|
872
|
+
await (0, $hOLA6$expect)(this.railLocator.locator(`input[id="${propertyName}"]`)).toBeVisible();
|
|
873
|
+
}
|
|
766
874
|
async expectValueFromString(propertyName, propertyValue) {
|
|
767
875
|
return await (0, $hOLA6$expect)(this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`)).toHaveText(propertyValue);
|
|
768
876
|
}
|
|
877
|
+
async expectTo(value) {
|
|
878
|
+
return await (0, $hOLA6$expect)(this.railLocator.getByTestId(`dot-autocomplete-chip`)).toHaveText(value);
|
|
879
|
+
}
|
|
880
|
+
async expectSubjectToBe(value) {
|
|
881
|
+
return (0, $hOLA6$expect)(await this.page.locator("#notification-subject").getAttribute("value")).toContain(value);
|
|
882
|
+
}
|
|
883
|
+
async expectBodyToBe(value) {
|
|
884
|
+
return await (0, $hOLA6$expect)(this.page.locator(".notification-body-field p")).toHaveText(value);
|
|
885
|
+
}
|
|
886
|
+
async setBody(value) {
|
|
887
|
+
await this.page.locator(".notification-body-field p").dblclick();
|
|
888
|
+
await this.page.locator(".notification-body-field #notification-body").fill(value);
|
|
889
|
+
await this.page.getByTestId(`save-button`).click();
|
|
890
|
+
}
|
|
769
891
|
async setValueFromMap(propertyName, key, value) {
|
|
770
892
|
await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.add-new-button`).click();
|
|
771
893
|
await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] input[id="new-row-key-input"]`).fill(key);
|
|
@@ -773,29 +895,29 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
|
|
|
773
895
|
await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.map-row-save-button`).click();
|
|
774
896
|
}
|
|
775
897
|
async setScript(script) {
|
|
776
|
-
await this.
|
|
777
|
-
await this.
|
|
898
|
+
await this.scriptTextArea.clear();
|
|
899
|
+
await this.scriptTextArea.fill(script);
|
|
778
900
|
await this.page.locator('.code-editor .header button:has-text("Save")').click();
|
|
779
901
|
}
|
|
780
902
|
async expectScriptToContain(script) {
|
|
781
903
|
await (0, $hOLA6$expect)(this.page.locator(".code-editor .ace_content")).toContainText(script);
|
|
782
904
|
}
|
|
783
905
|
async enterScriptForAutoComplete(script) {
|
|
784
|
-
await this.
|
|
785
|
-
await this.
|
|
786
|
-
await this.
|
|
906
|
+
await this.scriptTextArea.clear();
|
|
907
|
+
await this.scriptTextArea.fill(script);
|
|
908
|
+
await this.scriptTextArea.press(".");
|
|
787
909
|
}
|
|
788
910
|
async openScriptEditorInSeparateWindow() {
|
|
789
911
|
await this.page.getByTestId("fullscreen-enter-btn").click();
|
|
790
|
-
(0, $hOLA6$expect)(this.page.locator("#dialogTitle")).toBeVisible();
|
|
912
|
+
await (0, $hOLA6$expect)(this.page.locator("#dialogTitle")).toBeVisible();
|
|
791
913
|
}
|
|
792
914
|
async closeFullscreenScriptWindowWithESC() {
|
|
793
915
|
await this.page.locator("#dialogTitle").press("Escape");
|
|
794
|
-
(0, $hOLA6$expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
|
|
916
|
+
await (0, $hOLA6$expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
|
|
795
917
|
}
|
|
796
918
|
async closeFullscreenScriptWindow() {
|
|
797
919
|
await this.page.getByTestId("fullscreen-exit-btn").click();
|
|
798
|
-
(0, $hOLA6$expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
|
|
920
|
+
await (0, $hOLA6$expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
|
|
799
921
|
}
|
|
800
922
|
async abort(comment) {
|
|
801
923
|
await this.page.getByTestId("single-action-button").click();
|
|
@@ -832,6 +954,10 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
|
|
|
832
954
|
await (0, $hOLA6$expect)(this.railLocator.locator(".add-dependency-btn")).toBeVisible();
|
|
833
955
|
await this.railLocator.locator(".add-dependency-btn").click();
|
|
834
956
|
}
|
|
957
|
+
async addCondition() {
|
|
958
|
+
await (0, $hOLA6$expect)(this.railLocator.getByTestId("add-condition")).toBeVisible();
|
|
959
|
+
await this.railLocator.getByTestId("add-condition").click();
|
|
960
|
+
}
|
|
835
961
|
async expectDependencyText(dependencies) {
|
|
836
962
|
await (0, $hOLA6$expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
|
|
837
963
|
await (0, $hOLA6$expect)(this.page.locator(`.gate-task-dependencies`).getByLabel(dependencies).first()).toBeVisible();
|
|
@@ -853,21 +979,29 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
|
|
|
853
979
|
}).click();
|
|
854
980
|
}
|
|
855
981
|
}
|
|
856
|
-
async
|
|
982
|
+
async validateAutoCompleteOptionsInDescription(descriptionName, expectedVariableCount, variableToSelection) {
|
|
857
983
|
await this.page.getByLabel("Double-click to edit").waitFor({
|
|
858
984
|
timeout: 10000
|
|
859
985
|
});
|
|
860
986
|
await this.page.getByLabel("Double-click to edit").hover();
|
|
861
987
|
await this.page.locator(".markdown-viewer-actions").getByTestId("edit-button").click();
|
|
862
988
|
await this.page.locator("#task-description-input").fill(descriptionName);
|
|
863
|
-
await (0, $hOLA6$expect)(this.page.locator(".dot-popper-content-wrapper .option-name")).toHaveCount(
|
|
864
|
-
await this.page.locator(".dot-popper-content-wrapper .option-name").filter({
|
|
865
|
-
hasText:
|
|
989
|
+
await (0, $hOLA6$expect)(this.page.locator(".dot-popper-content-wrapper .option-name")).toHaveCount(expectedVariableCount);
|
|
990
|
+
if (variableToSelection) await this.page.locator(".dot-popper-content-wrapper .option-name").filter({
|
|
991
|
+
hasText: variableToSelection
|
|
866
992
|
}).click();
|
|
867
993
|
await this.page.getByRole("button", {
|
|
868
994
|
name: "Save"
|
|
869
995
|
}).click();
|
|
870
|
-
|
|
996
|
+
}
|
|
997
|
+
// eslint-disable-next-line max-params
|
|
998
|
+
async validateAutoCompleteOptions(fieldLabel, value, expectedVariableCount, variableToSelect) {
|
|
999
|
+
await this.page.getByLabel(fieldLabel).click();
|
|
1000
|
+
await this.page.getByLabel(fieldLabel).fill(value);
|
|
1001
|
+
await (0, $hOLA6$expect)(this.page.getByRole("option")).toHaveCount(expectedVariableCount);
|
|
1002
|
+
if (variableToSelect) await this.page.getByRole("option", {
|
|
1003
|
+
name: variableToSelect
|
|
1004
|
+
}).click();
|
|
871
1005
|
}
|
|
872
1006
|
async setReleaseTitle(releaseName) {
|
|
873
1007
|
await this.page.getByLabel("Release title *").fill(releaseName);
|
|
@@ -947,6 +1081,73 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
|
|
|
947
1081
|
name: "Abort"
|
|
948
1082
|
}).isVisible()).toBe(visible);
|
|
949
1083
|
}
|
|
1084
|
+
async setPattern(patternName) {
|
|
1085
|
+
await this.page.locator("#patternId").click();
|
|
1086
|
+
await this.page.locator("#patternId").fill(patternName);
|
|
1087
|
+
await this.page.getByRole("option", {
|
|
1088
|
+
name: patternName
|
|
1089
|
+
}).click();
|
|
1090
|
+
}
|
|
1091
|
+
async setStartDate(date) {
|
|
1092
|
+
await this.page.locator("#startDate").click();
|
|
1093
|
+
await this.page.locator("#startDate").fill(date);
|
|
1094
|
+
}
|
|
1095
|
+
async setEndDate(date) {
|
|
1096
|
+
await this.page.locator("#endDate").click();
|
|
1097
|
+
await this.page.locator("#endDate").fill(date);
|
|
1098
|
+
}
|
|
1099
|
+
async clickVariableButton(objectID, variableValue) {
|
|
1100
|
+
await this.page.locator(`div[data-testid="${objectID}"] .icon-variable`).click();
|
|
1101
|
+
await this.page.locator(`#${objectID}`).fill(variableValue);
|
|
1102
|
+
await this.page.getByRole("option", {
|
|
1103
|
+
name: variableValue
|
|
1104
|
+
}).click();
|
|
1105
|
+
}
|
|
1106
|
+
async enableFallback() {
|
|
1107
|
+
await this.page.getByLabel("Fallback").check();
|
|
1108
|
+
}
|
|
1109
|
+
async expectDescription(description) {
|
|
1110
|
+
await (0, $hOLA6$expect)(this.page.getByTestId("dot-accordion-details")).toHaveText(description);
|
|
1111
|
+
}
|
|
1112
|
+
async editDescription(description) {
|
|
1113
|
+
await this.page.getByLabel("Double-click to edit").waitFor({
|
|
1114
|
+
timeout: 10000
|
|
1115
|
+
});
|
|
1116
|
+
await this.page.getByLabel("Double-click to edit").hover();
|
|
1117
|
+
await this.page.locator(".markdown-viewer-actions").getByTestId("edit-button").click();
|
|
1118
|
+
await this.page.locator("#task-description-input").clear();
|
|
1119
|
+
await this.page.locator("#task-description-input").fill(description);
|
|
1120
|
+
await this.page.getByRole("button", {
|
|
1121
|
+
name: "Save"
|
|
1122
|
+
}).click();
|
|
1123
|
+
}
|
|
1124
|
+
async expectedGateConditionDisplayed(title) {
|
|
1125
|
+
await (0, $hOLA6$expect)(this.page.locator(".gate-task-condition-input").filter({
|
|
1126
|
+
hasText: title
|
|
1127
|
+
})).toBeVisible();
|
|
1128
|
+
}
|
|
1129
|
+
async expectScriptEditable() {
|
|
1130
|
+
await this.page.locator("div.ace_content").click();
|
|
1131
|
+
await (0, $hOLA6$expect)(this.scriptTextArea).not.toHaveAttribute("disabled", "");
|
|
1132
|
+
await (0, $hOLA6$expect)(this.scriptTextArea).not.toHaveAttribute("readonly", "");
|
|
1133
|
+
}
|
|
1134
|
+
async expectInputPropertiesEditable(propertyName) {
|
|
1135
|
+
if (typeof propertyName !== "string") for (const pName of propertyName){
|
|
1136
|
+
await (0, $hOLA6$expect)(this.railLocator.locator(`input[id="${pName}"]`)).not.toHaveAttribute("disabled", "");
|
|
1137
|
+
await (0, $hOLA6$expect)(this.railLocator.locator(`input[id="${pName}"]`)).not.toHaveAttribute("readonly", "");
|
|
1138
|
+
}
|
|
1139
|
+
else {
|
|
1140
|
+
await (0, $hOLA6$expect)(this.railLocator.locator(`input[id="${propertyName}"]`)).not.toHaveAttribute("disabled", "");
|
|
1141
|
+
await (0, $hOLA6$expect)(this.railLocator.locator(`input[id="${propertyName}"]`)).not.toHaveAttribute("readonly", "");
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
async setSelectField(fieldName, fieldValue) {
|
|
1145
|
+
await this.page.getByTestId(`${fieldName}-input`).click();
|
|
1146
|
+
const closeIcon = this.page.getByTestId(`CloseIcon`);
|
|
1147
|
+
if (await closeIcon.isVisible()) await closeIcon.click();
|
|
1148
|
+
await this.page.getByTestId(`${fieldName}-input`).fill(fieldValue);
|
|
1149
|
+
await this.page.getByText(fieldValue).click();
|
|
1150
|
+
}
|
|
950
1151
|
}
|
|
951
1152
|
class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
952
1153
|
constructor(page){
|
|
@@ -958,18 +1159,15 @@ class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$ex
|
|
|
958
1159
|
}
|
|
959
1160
|
async getRelease() {
|
|
960
1161
|
await this.release.isVisible();
|
|
961
|
-
|
|
962
|
-
return releaseValue;
|
|
1162
|
+
return await this.release.getAttribute("value");
|
|
963
1163
|
}
|
|
964
1164
|
async getPhase() {
|
|
965
1165
|
await this.phase.isVisible();
|
|
966
|
-
|
|
967
|
-
return phaseValue;
|
|
1166
|
+
return await this.phase.getAttribute("value");
|
|
968
1167
|
}
|
|
969
1168
|
async getTask() {
|
|
970
1169
|
await this.task.isVisible();
|
|
971
|
-
|
|
972
|
-
return taskValue;
|
|
1170
|
+
return await this.task.getAttribute("value");
|
|
973
1171
|
}
|
|
974
1172
|
async setRelease(releaseTitle) {
|
|
975
1173
|
await this.release.click();
|
|
@@ -1013,8 +1211,8 @@ class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$ex
|
|
|
1013
1211
|
}
|
|
1014
1212
|
async expectVariableModeEnabled(mode) {
|
|
1015
1213
|
await (0, $hOLA6$expect)(this.dependencyLocator.getByLabel("input-variable")).toBeVisible();
|
|
1016
|
-
const
|
|
1017
|
-
(0, $hOLA6$expect)(
|
|
1214
|
+
const variableMode = await this.dependencyLocator.getByLabel("input-variable").getAttribute("aria-pressed");
|
|
1215
|
+
(0, $hOLA6$expect)(variableMode).toBe("" + mode + "");
|
|
1018
1216
|
}
|
|
1019
1217
|
async clickVariable() {
|
|
1020
1218
|
await this.dependencyLocator.getByLabel("input-variable").waitFor();
|
|
@@ -1028,15 +1226,15 @@ class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$ex
|
|
|
1028
1226
|
(0, $hOLA6$expect)(options[i]).toContain(option);
|
|
1029
1227
|
}
|
|
1030
1228
|
}
|
|
1031
|
-
async enterNewVariable(
|
|
1229
|
+
async enterNewVariable(variableName) {
|
|
1032
1230
|
await this.page.getByLabel("Please select a variable of").click();
|
|
1033
|
-
await this.page.getByLabel("Please select a variable of").fill(
|
|
1231
|
+
await this.page.getByLabel("Please select a variable of").fill(variableName);
|
|
1034
1232
|
await this.page.getByTestId("dot-action-item-btn").click();
|
|
1035
1233
|
}
|
|
1036
|
-
async selectVariable(
|
|
1234
|
+
async selectVariable(variableName) {
|
|
1037
1235
|
await this.page.getByLabel("Please select a variable of").click();
|
|
1038
1236
|
await this.page.getByRole("option", {
|
|
1039
|
-
name:
|
|
1237
|
+
name: variableName
|
|
1040
1238
|
}).click();
|
|
1041
1239
|
}
|
|
1042
1240
|
}
|
|
@@ -1044,72 +1242,13 @@ class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$ex
|
|
|
1044
1242
|
|
|
1045
1243
|
|
|
1046
1244
|
|
|
1047
|
-
class $69e86f559cdf2bd0$export$15d3f9b095bb5188 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
1048
|
-
async expectCommentToContain(text) {
|
|
1049
|
-
await (0, $hOLA6$expect)(this.page.locator(".task-comment .markdown-wrapper p")).toContainText(text);
|
|
1050
|
-
}
|
|
1051
|
-
async expectTaskIsCommentable(isCommentable) {
|
|
1052
|
-
(0, $hOLA6$expect)(await this.page.locator("#task-comment").count()).toBe(isCommentable ? 1 : 0);
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
class $9c357602b6f466e7$export$aa59788fdecae2f2 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
1060
|
-
async expectWithAttachment(filename) {
|
|
1061
|
-
const test = this.page.locator(".task-attachments-grid .file-item-text");
|
|
1062
|
-
await test.isVisible();
|
|
1063
|
-
await (0, $hOLA6$expect)(test).toContainText(filename);
|
|
1064
|
-
}
|
|
1065
|
-
async getAttachmentsListCount() {
|
|
1066
|
-
return await this.page.locator(".file-upload-list div").count();
|
|
1067
|
-
}
|
|
1068
|
-
async uploadFile(filePath) {
|
|
1069
|
-
const fileChooserPromise = this.page.waitForEvent("filechooser");
|
|
1070
|
-
await this.page.getByRole("button", {
|
|
1071
|
-
name: "Select file(s)"
|
|
1072
|
-
}).click();
|
|
1073
|
-
const fileChooser = await fileChooserPromise;
|
|
1074
|
-
await fileChooser.setFiles(filePath);
|
|
1075
|
-
}
|
|
1076
|
-
async downloadFile(filename) {
|
|
1077
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1078
|
-
this.page.on("download", ()=>{});
|
|
1079
|
-
const downloadPromise = this.page.waitForEvent("download");
|
|
1080
|
-
await this.page.locator("li").filter({
|
|
1081
|
-
hasText: "" + filename + ""
|
|
1082
|
-
}).click();
|
|
1083
|
-
await downloadPromise;
|
|
1084
|
-
}
|
|
1085
|
-
async deleteAttachment(fileName) {
|
|
1086
|
-
await this.page.locator("li").filter({
|
|
1087
|
-
hasText: fileName
|
|
1088
|
-
}).click();
|
|
1089
|
-
await this.page.getByLabel("delete file").click();
|
|
1090
|
-
await this.page.getByRole("button", {
|
|
1091
|
-
name: "Delete"
|
|
1092
|
-
}).waitFor({
|
|
1093
|
-
state: "visible"
|
|
1094
|
-
});
|
|
1095
|
-
await this.page.getByRole("button", {
|
|
1096
|
-
name: "Delete"
|
|
1097
|
-
}).click();
|
|
1098
|
-
}
|
|
1099
|
-
async expectWithNoAttachment(tempFile) {
|
|
1100
|
-
const test = await this.page.locator(".task-attachments-grid .file-item-text").count();
|
|
1101
|
-
if (test > 0) await (0, $hOLA6$expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toContainText(tempFile);
|
|
1102
|
-
else await (0, $hOLA6$expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toBeVisible();
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
1245
|
|
|
1108
1246
|
|
|
1109
1247
|
|
|
1110
|
-
class $499d3d8c8706756b$export$
|
|
1248
|
+
class $499d3d8c8706756b$export$e3515314c13bc477 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
1111
1249
|
constructor(page){
|
|
1112
1250
|
super(page);
|
|
1251
|
+
this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
|
|
1113
1252
|
}
|
|
1114
1253
|
async expectStartDateToBeDisplayed() {
|
|
1115
1254
|
(0, $hOLA6$expect)(await this.page.locator(".flex-section.column").filter({
|
|
@@ -1121,26 +1260,84 @@ class $499d3d8c8706756b$export$b7be47b40aa877fc extends (0, $9626bc9256ce31f7$ex
|
|
|
1121
1260
|
hasText: "End Date"
|
|
1122
1261
|
}).locator(".task-date-view-content").isVisible()).toBe(true);
|
|
1123
1262
|
}
|
|
1263
|
+
async switchWaitForScheduledDate() {
|
|
1264
|
+
await this.page.locator(".wait-for-start input").click();
|
|
1265
|
+
}
|
|
1266
|
+
async expectWaitForScheduledDateToBeChecked() {
|
|
1267
|
+
await (0, $hOLA6$expect)(this.page.locator(".wait-for-start input")).toBeChecked();
|
|
1268
|
+
}
|
|
1269
|
+
async expectWaitForScheduledDateToBeUnchecked() {
|
|
1270
|
+
await (0, $hOLA6$expect)(this.page.locator(".wait-for-start input")).not.toBeChecked();
|
|
1271
|
+
}
|
|
1272
|
+
async setDueTime(day, hour, minute) {
|
|
1273
|
+
await this.page.locator(".duration-view-content").click();
|
|
1274
|
+
if (day) {
|
|
1275
|
+
await this.page.locator("#days").clear();
|
|
1276
|
+
await this.page.locator("#days").fill(day);
|
|
1277
|
+
}
|
|
1278
|
+
if (hour) {
|
|
1279
|
+
await this.page.locator("#hours").clear();
|
|
1280
|
+
await this.page.locator("#hours").fill(hour);
|
|
1281
|
+
}
|
|
1282
|
+
if (minute) {
|
|
1283
|
+
await this.page.locator("#minutes").clear();
|
|
1284
|
+
await this.page.locator("#minutes").fill(minute);
|
|
1285
|
+
}
|
|
1286
|
+
await this.page.getByTestId("save-button").click();
|
|
1287
|
+
}
|
|
1288
|
+
async setStartDate(date, monthYear) {
|
|
1289
|
+
await this.page.locator(".flex-section.column").filter({
|
|
1290
|
+
hasText: "Start date"
|
|
1291
|
+
}).locator(".task-date").waitFor({
|
|
1292
|
+
timeout: 10000
|
|
1293
|
+
});
|
|
1294
|
+
await this.page.locator(".flex-section.column").filter({
|
|
1295
|
+
hasText: "Start date"
|
|
1296
|
+
}).locator(".task-date").click();
|
|
1297
|
+
await this.setDate(date, monthYear);
|
|
1298
|
+
}
|
|
1299
|
+
async setEndDate(date, monthYear) {
|
|
1300
|
+
await this.page.locator(".flex-section.column").filter({
|
|
1301
|
+
hasText: "End date"
|
|
1302
|
+
}).locator(".task-date").waitFor({
|
|
1303
|
+
timeout: 10000
|
|
1304
|
+
});
|
|
1305
|
+
await this.page.locator(".flex-section.column").filter({
|
|
1306
|
+
hasText: "End date"
|
|
1307
|
+
}).locator(".task-date").click();
|
|
1308
|
+
await this.setDate(date, monthYear);
|
|
1309
|
+
}
|
|
1310
|
+
async setDate(date, monthYear) {
|
|
1311
|
+
const prev = this.page.getByTestId("ArrowLeftIcon");
|
|
1312
|
+
const next = this.page.getByTestId("ArrowRightIcon");
|
|
1313
|
+
const monYear = this.page.locator(".MuiPickersCalendarHeader-label");
|
|
1314
|
+
const currentDate = await monYear.textContent();
|
|
1315
|
+
const thisMonth = (0, $hOLA6$moment)(monthYear, "MMMM YYYY").isBefore(currentDate);
|
|
1316
|
+
while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
|
|
1317
|
+
else await next.click();
|
|
1318
|
+
await this.page.getByRole("gridcell", {
|
|
1319
|
+
name: "" + date + "",
|
|
1320
|
+
exact: true
|
|
1321
|
+
}).first().click();
|
|
1322
|
+
}
|
|
1124
1323
|
}
|
|
1125
1324
|
|
|
1126
1325
|
|
|
1326
|
+
|
|
1127
1327
|
class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
1128
1328
|
constructor(page){
|
|
1129
1329
|
super(page);
|
|
1130
|
-
this.
|
|
1131
|
-
this.
|
|
1132
|
-
|
|
1133
|
-
});
|
|
1330
|
+
this.activity = new (0, $69e86f559cdf2bd0$export$15d3f9b095bb5188)(page);
|
|
1331
|
+
this.attachment = new (0, $9c357602b6f466e7$export$aa59788fdecae2f2)(page);
|
|
1332
|
+
this.attribute = new (0, $115d1e40e2564777$export$a87b4660f21fba58)(page);
|
|
1134
1333
|
this.cancelButton = this.page.getByTestId("task-action-cancel");
|
|
1135
1334
|
this.commentBox = this.page.getByTestId("task-action-comment");
|
|
1136
1335
|
this.confirm = this.page.locator(".popper-action-buttons").getByTestId("dot-button");
|
|
1137
|
-
this.activity = new (0, $69e86f559cdf2bd0$export$15d3f9b095bb5188)(page);
|
|
1138
|
-
this.attachment = new (0, $9c357602b6f466e7$export$aa59788fdecae2f2)(page);
|
|
1139
1336
|
this.config = new (0, $e44e9af564fb00f7$export$64c93bc7fb9ca44e)(page);
|
|
1140
1337
|
this.condition = new (0, $3fa741329d8067d5$export$d4865631ba74f3e2)(page);
|
|
1141
|
-
this.
|
|
1142
|
-
|
|
1143
|
-
|
|
1338
|
+
this.completeButton = this.page.getByRole("button", {
|
|
1339
|
+
name: "Complete",
|
|
1340
|
+
exact: true
|
|
1144
1341
|
});
|
|
1145
1342
|
this.failMenu = this.page.getByRole("menuitem", {
|
|
1146
1343
|
name: "Fail"
|
|
@@ -1149,10 +1346,16 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
|
|
|
1149
1346
|
name: "arrow-down icon",
|
|
1150
1347
|
exact: true
|
|
1151
1348
|
});
|
|
1152
|
-
this.
|
|
1153
|
-
|
|
1154
|
-
|
|
1349
|
+
this.overview = new (0, $90bb70a7e909e500$export$519356f6c50361f7)(page);
|
|
1350
|
+
this.retryButton = this.page.getByRole("button", {
|
|
1351
|
+
name: "Retry"
|
|
1155
1352
|
});
|
|
1353
|
+
this.scheduling = new (0, $499d3d8c8706756b$export$e3515314c13bc477)(page);
|
|
1354
|
+
this.startButton = this.page.getByTestId("single-action-button");
|
|
1355
|
+
this.skipMenu = this.page.getByRole("menuitem", {
|
|
1356
|
+
name: "Skip"
|
|
1357
|
+
});
|
|
1358
|
+
this.taskDrawerLocator = this.page.locator("task-drawer .dot-drawer");
|
|
1156
1359
|
}
|
|
1157
1360
|
async openOverviewRail() {
|
|
1158
1361
|
await this.openRail("Overview");
|
|
@@ -1162,7 +1365,7 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
|
|
|
1162
1365
|
}
|
|
1163
1366
|
async openSchedulingRail() {
|
|
1164
1367
|
await this.openRail("Scheduling");
|
|
1165
|
-
return new (0, $499d3d8c8706756b$export$
|
|
1368
|
+
return new (0, $499d3d8c8706756b$export$e3515314c13bc477)(this.page);
|
|
1166
1369
|
}
|
|
1167
1370
|
async openConditionRail() {
|
|
1168
1371
|
await this.openRail("Conditions");
|
|
@@ -1205,9 +1408,21 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
|
|
|
1205
1408
|
await this.commentBox.fill(comment);
|
|
1206
1409
|
await this.confirm.click();
|
|
1207
1410
|
}
|
|
1411
|
+
async startNow(comment) {
|
|
1412
|
+
await this.startButton.click();
|
|
1413
|
+
await this.commentBox.fill(comment);
|
|
1414
|
+
await this.page.getByTestId("dot-button").click();
|
|
1415
|
+
await (0, $hOLA6$expect)(this.startButton).not.toBeVisible();
|
|
1416
|
+
}
|
|
1208
1417
|
async expectTaskTitle(taskTitle) {
|
|
1209
1418
|
await (0, $hOLA6$expect)(this.page.locator(".task-drawer .task-title-input .dot-view-mode-typography")).toContainText(taskTitle);
|
|
1210
1419
|
}
|
|
1420
|
+
async setTitle(title) {
|
|
1421
|
+
await this.page.getByTestId("task-title-input-view-mode-typography").click();
|
|
1422
|
+
await this.page.getByTestId("task-title-input-input").clear();
|
|
1423
|
+
await this.page.getByTestId("task-title-input-input").fill(title);
|
|
1424
|
+
await this.page.getByTestId("task-title-input-input").press("Enter");
|
|
1425
|
+
}
|
|
1211
1426
|
async expectTypeToContain(taskType) {
|
|
1212
1427
|
await (0, $hOLA6$expect)(this.page.locator(".task-drawer .task-type")).toContainText(taskType);
|
|
1213
1428
|
}
|
|
@@ -1232,26 +1447,16 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
|
|
|
1232
1447
|
name: username
|
|
1233
1448
|
})).toBeVisible();
|
|
1234
1449
|
}
|
|
1235
|
-
async
|
|
1236
|
-
await (0, $hOLA6$expect)(this.
|
|
1237
|
-
|
|
1238
|
-
async startNow(comment) {
|
|
1239
|
-
await this.page.getByTestId("single-action-button").click();
|
|
1240
|
-
await this.page.getByTestId("task-action-comment").fill(comment);
|
|
1241
|
-
await this.page.getByTestId("dot-button").click();
|
|
1242
|
-
await (0, $hOLA6$expect)(this.page.getByTestId("single-action-button")).not.toBeVisible();
|
|
1243
|
-
}
|
|
1244
|
-
async expectCommentsToContain(text) {
|
|
1245
|
-
await (0, $hOLA6$expect)(this.page.locator(".task-comment-body .markdown-wrapper p")).toContainText(text);
|
|
1246
|
-
}
|
|
1247
|
-
async switchWaitForScheduledDate() {
|
|
1248
|
-
await this.page.locator(".wait-for-start input").click();
|
|
1249
|
-
}
|
|
1250
|
-
async expectWaitForScheduledDateToBeChecked() {
|
|
1251
|
-
await (0, $hOLA6$expect)(this.page.locator(".wait-for-start input")).toBeChecked();
|
|
1450
|
+
async expectStartButtonToBeEnabled(isEnabled = true) {
|
|
1451
|
+
if (isEnabled) await (0, $hOLA6$expect)(this.startButton).toBeEnabled();
|
|
1452
|
+
else await (0, $hOLA6$expect)(this.startButton).not.toBeEnabled();
|
|
1252
1453
|
}
|
|
1253
|
-
async
|
|
1254
|
-
await
|
|
1454
|
+
async startTask(comment) {
|
|
1455
|
+
await this.startButton.click();
|
|
1456
|
+
await this.completeButton.click();
|
|
1457
|
+
await this.commentBox.fill(comment);
|
|
1458
|
+
await this.completeButton.click();
|
|
1459
|
+
await (0, $hOLA6$expect)(this.startButton).not.toBeVisible();
|
|
1255
1460
|
}
|
|
1256
1461
|
// Other locators are flaky and it can be replaced if we get locator change in the frontend
|
|
1257
1462
|
async clickOnStartDate() {
|
|
@@ -1311,10 +1516,12 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
|
|
|
1311
1516
|
|
|
1312
1517
|
|
|
1313
1518
|
|
|
1519
|
+
|
|
1314
1520
|
class $a546aadb4e6fa16a$export$5a82be0a2a261cc6 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
1315
1521
|
constructor(page){
|
|
1316
1522
|
super(page);
|
|
1317
1523
|
this.releaseHeader = this.page.locator(".release-header");
|
|
1524
|
+
this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
|
|
1318
1525
|
}
|
|
1319
1526
|
async enableShowDates() {
|
|
1320
1527
|
await this.page.locator("#toggleIsDatesColumnsShown").check();
|
|
@@ -1328,6 +1535,105 @@ class $a546aadb4e6fa16a$export$5a82be0a2a261cc6 extends (0, $9626bc9256ce31f7$ex
|
|
|
1328
1535
|
async expectPlanningDateColumnsShown() {
|
|
1329
1536
|
(0, $hOLA6$expect)(await this.page.locator(`#gantt .gantt_grid_data .gantt_row`).first().locator(`.gantt_cell`).count()).toEqual(4);
|
|
1330
1537
|
}
|
|
1538
|
+
async expectReleaseOnBreadcrumb(title) {
|
|
1539
|
+
await (0, $hOLA6$expect)(this.page.getByRole("link", {
|
|
1540
|
+
name: title
|
|
1541
|
+
})).toBeVisible();
|
|
1542
|
+
}
|
|
1543
|
+
async expectPhaseDisplayed(phaseName) {
|
|
1544
|
+
await (0, $hOLA6$expect)(this.page.getByTitle(phaseName, {
|
|
1545
|
+
exact: true
|
|
1546
|
+
})).toBeVisible();
|
|
1547
|
+
}
|
|
1548
|
+
async expectTaskDisplayed(taskName, isDisplayed = true) {
|
|
1549
|
+
if (isDisplayed) await (0, $hOLA6$expect)(this.page.getByTitle(taskName)).toBeVisible();
|
|
1550
|
+
else await (0, $hOLA6$expect)(this.page.getByTitle(taskName)).not.toBeVisible();
|
|
1551
|
+
}
|
|
1552
|
+
async expandGanttTree(title) {
|
|
1553
|
+
return await this.page.locator(".gantt_cell").filter({
|
|
1554
|
+
hasText: title
|
|
1555
|
+
}).locator(".gantt_open").click();
|
|
1556
|
+
}
|
|
1557
|
+
async expectDifferentWidth(title1, title2) {
|
|
1558
|
+
const releaseWidth = await this.page.locator(`.gantt_task_content`).getByText(title1, {
|
|
1559
|
+
exact: true
|
|
1560
|
+
}).getAttribute("style");
|
|
1561
|
+
const PhaseWidth = await this.page.locator(`.gantt_task_content`).getByText(title2, {
|
|
1562
|
+
exact: true
|
|
1563
|
+
}).getAttribute("style");
|
|
1564
|
+
return (0, $hOLA6$expect)(releaseWidth).not.toEqual(PhaseWidth);
|
|
1565
|
+
}
|
|
1566
|
+
async expectSameWidth(title1, title2) {
|
|
1567
|
+
const releaseWidth = await this.page.locator(`.gantt_task_content`).getByText(title1, {
|
|
1568
|
+
exact: true
|
|
1569
|
+
}).getAttribute("style");
|
|
1570
|
+
const PhaseWidth = await this.page.locator(`.gantt_task_content`).getByText(title2, {
|
|
1571
|
+
exact: true
|
|
1572
|
+
}).getAttribute("style");
|
|
1573
|
+
return (0, $hOLA6$expect)(releaseWidth).toEqual(PhaseWidth);
|
|
1574
|
+
}
|
|
1575
|
+
async expectElementWithClasses(title, classes) {
|
|
1576
|
+
const eleNumber = await this.page.locator(`.${classes.join(".")}`).locator(`.gantt_task_content`).getByText(title, {
|
|
1577
|
+
exact: true
|
|
1578
|
+
}).count();
|
|
1579
|
+
return (0, $hOLA6$expect)(eleNumber).toBe(1);
|
|
1580
|
+
}
|
|
1581
|
+
async resizeToDayIndex(title, index) {
|
|
1582
|
+
await this.page.locator(`#gantt .gantt_container .gantt_task_line`).filter({
|
|
1583
|
+
hasText: title
|
|
1584
|
+
}).click();
|
|
1585
|
+
await this.page.locator(`.gantt_task_line`).filter({
|
|
1586
|
+
hasText: title
|
|
1587
|
+
}).locator(`.gantt_task_drag.task_right`).hover();
|
|
1588
|
+
const objId = await this.page.locator(`.gantt_task_line`).filter({
|
|
1589
|
+
hasText: title
|
|
1590
|
+
}).getAttribute("task_id");
|
|
1591
|
+
await this.page.mouse.down();
|
|
1592
|
+
await this.page.locator(`div[task_id='${objId}']`).locator(".gantt_task_cell").nth(index).hover();
|
|
1593
|
+
await this.page.mouse.up();
|
|
1594
|
+
}
|
|
1595
|
+
async expectLinksToBeDisplayed(countOfLinks) {
|
|
1596
|
+
(0, $hOLA6$expect)(await this.page.locator(".gantt_task_link").count()).toEqual(countOfLinks);
|
|
1597
|
+
}
|
|
1598
|
+
async expectLeftHandleVisibility(title, visible) {
|
|
1599
|
+
const objId = await this.page.locator(`.gantt_task_line`).filter({
|
|
1600
|
+
hasText: title
|
|
1601
|
+
}).getAttribute("task_id");
|
|
1602
|
+
if (visible) {
|
|
1603
|
+
await this.page.locator("#gantt .gantt_container .gantt_task_line").filter({
|
|
1604
|
+
hasText: title
|
|
1605
|
+
}).hover();
|
|
1606
|
+
await (0, $hOLA6$expect)(this.page.locator("#gantt .gantt_container ").locator(`div[task_id="${objId}"].gantt-no-left-handle`)).not.toBeVisible();
|
|
1607
|
+
} else {
|
|
1608
|
+
await this.page.locator("#gantt .gantt_container .gantt_task_line").filter({
|
|
1609
|
+
hasText: title
|
|
1610
|
+
}).hover();
|
|
1611
|
+
await (0, $hOLA6$expect)(this.page.locator("#gantt .gantt_container ").locator(`div[task_id="${objId}"].gantt-no-left-handle`)).toBeVisible();
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
async expectRightHandleVisibility(title, visible) {
|
|
1615
|
+
const objId = await this.page.locator(`.gantt_task_line`).filter({
|
|
1616
|
+
hasText: title
|
|
1617
|
+
}).getAttribute("task_id");
|
|
1618
|
+
if (visible) {
|
|
1619
|
+
await this.page.locator("#gantt .gantt_container .gantt_task_line").filter({
|
|
1620
|
+
hasText: title
|
|
1621
|
+
}).hover();
|
|
1622
|
+
await (0, $hOLA6$expect)(this.page.locator("#gantt .gantt_container").locator(`div[task_id='${objId}'].gantt-no-right-handle`)).not.toBeVisible();
|
|
1623
|
+
} else {
|
|
1624
|
+
await this.page.locator("#gantt .gantt_container .gantt_task_line").filter({
|
|
1625
|
+
hasText: title
|
|
1626
|
+
}).hover();
|
|
1627
|
+
await (0, $hOLA6$expect)(this.page.locator("#gantt .gantt_container").locator(`div[task_id='${objId}'].gantt-no-right-handle`)).toBeVisible();
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
async openTaskDrawer(title) {
|
|
1631
|
+
await this.page.getByTitle(title).dblclick();
|
|
1632
|
+
return this.taskDrawer;
|
|
1633
|
+
}
|
|
1634
|
+
async openPhaseDetails(phaseName) {
|
|
1635
|
+
await this.page.getByTitle(phaseName).dblclick();
|
|
1636
|
+
}
|
|
1331
1637
|
getRow(phaseName) {
|
|
1332
1638
|
return new $a546aadb4e6fa16a$var$GanttRow(this.page, phaseName);
|
|
1333
1639
|
}
|
|
@@ -1361,20 +1667,20 @@ class $a546aadb4e6fa16a$var$GanttRow extends (0, $9626bc9256ce31f7$export$2b65d1
|
|
|
1361
1667
|
await this.dateUtil.setDate(date, monthYear);
|
|
1362
1668
|
}
|
|
1363
1669
|
async expectStartDateToBe(date) {
|
|
1364
|
-
const dateTimePicker =
|
|
1365
|
-
this.dateUtil.expectDateToBe(dateTimePicker, date);
|
|
1670
|
+
const dateTimePicker = this.getFirstDate();
|
|
1671
|
+
await this.dateUtil.expectDateToBe(await dateTimePicker, date);
|
|
1366
1672
|
}
|
|
1367
1673
|
async expectEndDateToBe(date) {
|
|
1368
|
-
const dateTimePicker =
|
|
1369
|
-
this.dateUtil.expectDateToBe(dateTimePicker, date);
|
|
1674
|
+
const dateTimePicker = this.getLastDate();
|
|
1675
|
+
await this.dateUtil.expectDateToBe(await dateTimePicker, date);
|
|
1370
1676
|
}
|
|
1371
1677
|
async removeStartDate() {
|
|
1372
1678
|
const dateTimePicker = await this.getFirstDateEditor();
|
|
1373
1679
|
await this.dateUtil.removeDate(dateTimePicker);
|
|
1374
1680
|
}
|
|
1375
1681
|
async removeEndDate() {
|
|
1376
|
-
const dateTimePicker =
|
|
1377
|
-
await this.dateUtil.removeDate(dateTimePicker);
|
|
1682
|
+
const dateTimePicker = this.getLastDateEditor();
|
|
1683
|
+
await this.dateUtil.removeDate(await dateTimePicker);
|
|
1378
1684
|
}
|
|
1379
1685
|
async expectStartDateToBeInferred() {
|
|
1380
1686
|
const dateTimePicker = await this.getFirstDateEditor();
|
|
@@ -1420,6 +1726,7 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
|
|
|
1420
1726
|
await this.page.locator("#release-form-title").fill(name);
|
|
1421
1727
|
}
|
|
1422
1728
|
async setDescription(description) {
|
|
1729
|
+
await this.page.locator(".task-description").hover();
|
|
1423
1730
|
await this.page.locator(".display > .xl-icon").first().click();
|
|
1424
1731
|
await this.page.locator("textarea").click();
|
|
1425
1732
|
await this.page.locator("textarea").clear();
|
|
@@ -1554,61 +1861,296 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
|
|
|
1554
1861
|
async expectScheduledStartDateToBe(date) {
|
|
1555
1862
|
(0, $hOLA6$expect)(await this.page.locator(`.scheduled-start-date .date input`).getAttribute("value")).toContain(date);
|
|
1556
1863
|
}
|
|
1557
|
-
async expectScheduledStartTimeToBe(date) {
|
|
1558
|
-
(0, $hOLA6$expect)(await this.page.locator(`.scheduled-start-date .time input`).getAttribute("value")).toContain(date);
|
|
1864
|
+
async expectScheduledStartTimeToBe(date) {
|
|
1865
|
+
(0, $hOLA6$expect)(await this.page.locator(`.scheduled-start-date .time input`).getAttribute("value")).toContain(date);
|
|
1866
|
+
}
|
|
1867
|
+
async expectDueDateToBe(date) {
|
|
1868
|
+
(0, $hOLA6$expect)(await this.page.locator(".due-date .date input").getAttribute("value")).toContain(date);
|
|
1869
|
+
}
|
|
1870
|
+
async expectedDueDateTime(time) {
|
|
1871
|
+
(0, $hOLA6$expect)(await this.page.locator(".due-date .time input").getAttribute("value")).toContain(time);
|
|
1872
|
+
}
|
|
1873
|
+
async expectDurationToBe(duration) {
|
|
1874
|
+
(0, $hOLA6$expect)(await this.page.locator(".duration-editor").textContent()).toBe(duration);
|
|
1875
|
+
}
|
|
1876
|
+
async setDueDate(hrs, min, meridian) {
|
|
1877
|
+
await this.page.locator(".due-date .time-picker-holder").click();
|
|
1878
|
+
if (typeof hrs !== "undefined") {
|
|
1879
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-hour").click();
|
|
1880
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-hour").clear();
|
|
1881
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-hour").fill(hrs);
|
|
1882
|
+
}
|
|
1883
|
+
if (typeof min !== "undefined") {
|
|
1884
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-minute").click();
|
|
1885
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-minute").clear();
|
|
1886
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-minute").fill(min);
|
|
1887
|
+
}
|
|
1888
|
+
if (typeof meridian !== "undefined") {
|
|
1889
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-meridian").click();
|
|
1890
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-meridian").clear();
|
|
1891
|
+
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-meridian").fill(meridian);
|
|
1892
|
+
}
|
|
1893
|
+
await this.page.keyboard.press("Escape");
|
|
1894
|
+
}
|
|
1895
|
+
async checkAbortOnFailure() {
|
|
1896
|
+
await this.page.locator("#release-form-abort-on-failure").check();
|
|
1897
|
+
await (0, $hOLA6$expect)(this.page.locator("#release-form-abort-on-failure")).toBeChecked();
|
|
1898
|
+
}
|
|
1899
|
+
async expectDescriptionToBe(description) {
|
|
1900
|
+
(0, $hOLA6$expect)(await this.page.locator(".release-description p").textContent()).toContain(description);
|
|
1901
|
+
}
|
|
1902
|
+
async expectReleaseNameToBe(name) {
|
|
1903
|
+
await (0, $hOLA6$expect)(this.page.locator('form[name="releasePropertiesForm"]')).toContainText("Properties for " + name);
|
|
1904
|
+
}
|
|
1905
|
+
async expectStartDateReadonly() {
|
|
1906
|
+
await (0, $hOLA6$expect)(this.page.locator("#release-properties .form-group").filter({
|
|
1907
|
+
hasText: "Start date"
|
|
1908
|
+
}).locator(".date-editor.readonly")).toBeVisible();
|
|
1909
|
+
}
|
|
1910
|
+
async expectEndDateReadonly() {
|
|
1911
|
+
await (0, $hOLA6$expect)(this.page.locator("#release-properties .form-group").filter({
|
|
1912
|
+
hasText: "End date"
|
|
1913
|
+
}).locator(".date-editor.readonly")).toBeVisible();
|
|
1914
|
+
}
|
|
1915
|
+
async setOwner(user) {
|
|
1916
|
+
await this.page.locator(".release-owner").click();
|
|
1917
|
+
await this.page.locator(".release-owner input").clear();
|
|
1918
|
+
await this.page.locator(".release-owner input").fill(user);
|
|
1919
|
+
}
|
|
1920
|
+
async expectPageTitleToBeInBreadcrumbLink(releaseName) {
|
|
1921
|
+
(0, $hOLA6$expect)(await this.page.locator(".dot-breadcrumbs a").allTextContents()).toContain(releaseName);
|
|
1922
|
+
}
|
|
1923
|
+
async reloadPage() {
|
|
1924
|
+
await this.page.reload({
|
|
1925
|
+
timeout: 3000
|
|
1926
|
+
});
|
|
1927
|
+
}
|
|
1928
|
+
async expectOwnerToBe(user) {
|
|
1929
|
+
await (0, $hOLA6$expect)(this.page.locator(".release-owner")).toContainText(user);
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
|
|
1934
|
+
|
|
1935
|
+
|
|
1936
|
+
class $96c6280ff1c47b81$export$3bc3e140e0dcb075 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
1937
|
+
constructor(page){
|
|
1938
|
+
super(page);
|
|
1939
|
+
this.resetButton = this.page.getByRole("button", {
|
|
1940
|
+
name: "Reset"
|
|
1941
|
+
});
|
|
1942
|
+
this.saveButton = this.page.getByRole("button", {
|
|
1943
|
+
name: "Save"
|
|
1944
|
+
});
|
|
1945
|
+
}
|
|
1946
|
+
async expectSaveButtonDisabled() {
|
|
1947
|
+
(0, $hOLA6$expect)(this.saveButton).toBeDisabled();
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
|
|
1952
|
+
|
|
1953
|
+
|
|
1954
|
+
|
|
1955
|
+
|
|
1956
|
+
class $19b7e7e46cfe3be0$export$649fde34d823ece7 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
1957
|
+
constructor(page){
|
|
1958
|
+
super(page);
|
|
1959
|
+
this.commentBox = this.page.locator(`.input-block-level`);
|
|
1960
|
+
this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
|
|
1961
|
+
this.refreshButton = this.page.getByTestId("refresh-btn");
|
|
1962
|
+
this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
|
|
1963
|
+
}
|
|
1964
|
+
async openContextMenuForTask(taskTitle) {
|
|
1965
|
+
await this.page.locator(".name-cell-wrapper").filter({
|
|
1966
|
+
hasText: taskTitle
|
|
1967
|
+
}).locator(".context-menu-button").click();
|
|
1968
|
+
}
|
|
1969
|
+
// eslint-disable-next-line max-params
|
|
1970
|
+
async callMenuOptionsForTask(taskTitle, option, taskGroup, taskType) {
|
|
1971
|
+
await this.openContextMenuForTask(taskTitle);
|
|
1972
|
+
await this.page.locator(".dropdown-menu li").getByText(option).click();
|
|
1973
|
+
if (await this.commentBox.isVisible()) await this.commentBox.fill(" Automation Test Comment");
|
|
1974
|
+
else if (await this.page.getByRole("heading", {
|
|
1975
|
+
name: "Change task type"
|
|
1976
|
+
}).isVisible()) {
|
|
1977
|
+
await this.page.getByPlaceholder("Start typing to filter task").click();
|
|
1978
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1979
|
+
// @ts-ignore
|
|
1980
|
+
await this.page.locator("#task-selector").fill(taskGroup);
|
|
1981
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1982
|
+
// @ts-ignore
|
|
1983
|
+
await this.page.getByTestId(taskType).click();
|
|
1984
|
+
}
|
|
1985
|
+
if (await this.page.getByRole("button", {
|
|
1986
|
+
name: option,
|
|
1987
|
+
exact: true
|
|
1988
|
+
}).isVisible()) await this.page.getByRole("button", {
|
|
1989
|
+
name: option,
|
|
1990
|
+
exact: true
|
|
1991
|
+
}).click();
|
|
1992
|
+
}
|
|
1993
|
+
async expectAssignToUser(taskTitle, username) {
|
|
1994
|
+
await this.refreshButton.click();
|
|
1995
|
+
(0, $hOLA6$expect)(await this.page.locator(".ui-grid-row").filter({
|
|
1996
|
+
hasText: taskTitle
|
|
1997
|
+
}).locator(`span[display-user="row.entity.planItem.owner"] span`).textContent()).toContain(username);
|
|
1998
|
+
}
|
|
1999
|
+
async expectToHasGateIcon(taskTitle) {
|
|
2000
|
+
await (0, $hOLA6$expect)(this.page.locator(".ui-grid-row").filter({
|
|
2001
|
+
hasText: taskTitle
|
|
2002
|
+
}).locator(".marker-check-icon")).toBeVisible();
|
|
2003
|
+
}
|
|
2004
|
+
async expectTaskRowCountToBe(title, expectedCount) {
|
|
2005
|
+
await this.refreshButton.click();
|
|
2006
|
+
(0, $hOLA6$expect)(await this.page.locator(".name-cell-title").filter({
|
|
2007
|
+
hasText: title
|
|
2008
|
+
}).count()).toBe(expectedCount);
|
|
2009
|
+
}
|
|
2010
|
+
async setHeaderFilter(columnTitle, valueToFilter) {
|
|
2011
|
+
const filter = this.page.locator(`.ui-grid-header-cell`).filter({
|
|
2012
|
+
hasText: columnTitle
|
|
2013
|
+
}).locator(`input`);
|
|
2014
|
+
await filter.clear();
|
|
2015
|
+
await filter.fill(valueToFilter);
|
|
2016
|
+
}
|
|
2017
|
+
async expectRowCountToBe(cellCount) {
|
|
2018
|
+
const cont = await this.page.locator(".ui-grid-canvas .name-cell").count();
|
|
2019
|
+
(0, $hOLA6$expect)(cont).toBe(cellCount);
|
|
2020
|
+
}
|
|
2021
|
+
async filterStartDate(date, monthYear) {
|
|
2022
|
+
await this.page.locator(`.ui-grid-header-cell`).filter({
|
|
2023
|
+
hasText: "Start Date"
|
|
2024
|
+
}).locator(`input`).click();
|
|
2025
|
+
await this.dateUtil.setDate(date, monthYear);
|
|
2026
|
+
}
|
|
2027
|
+
async filterEndDate(date, monthYear) {
|
|
2028
|
+
await this.page.locator(`.ui-grid-header-cell`).filter({
|
|
2029
|
+
hasText: "End Date"
|
|
2030
|
+
}).locator(`input`).click();
|
|
2031
|
+
await this.dateUtil.setDate(date, monthYear);
|
|
2032
|
+
}
|
|
2033
|
+
async openTaskDrawer(taskTitle) {
|
|
2034
|
+
await this.page.locator(".name-cell-title").filter({
|
|
2035
|
+
hasText: taskTitle
|
|
2036
|
+
}).click();
|
|
2037
|
+
return this.taskDrawer;
|
|
2038
|
+
}
|
|
2039
|
+
async collapseNthRowByIndex(Indexnumber) {
|
|
2040
|
+
await this.page.locator(".task-group-toggle .xl-icon.arrow-down-icon").nth(Indexnumber).click();
|
|
2041
|
+
}
|
|
2042
|
+
async closePhaseModal() {
|
|
2043
|
+
await this.page.locator("button[type='button'] i[class='xl-icon close-icon']").click();
|
|
2044
|
+
}
|
|
2045
|
+
async expectTaskToHaveStatus(taskTitle, status) {
|
|
2046
|
+
await this.refreshButton.click();
|
|
2047
|
+
(0, $hOLA6$expect)(await this.page.locator(".ui-grid-row").filter({
|
|
2048
|
+
hasText: taskTitle
|
|
2049
|
+
}).locator(".label ").textContent()).toContain(status);
|
|
2050
|
+
}
|
|
2051
|
+
async expectOverdueOnEndDate(taskTitle) {
|
|
2052
|
+
(0, $hOLA6$expect)(await this.page.locator(`.ui-grid-row`).filter({
|
|
2053
|
+
hasText: taskTitle
|
|
2054
|
+
}).locator(`i.xl-icon.delay-icon.overdue-icon`).isVisible()).toBe(true);
|
|
1559
2055
|
}
|
|
1560
|
-
async
|
|
1561
|
-
|
|
2056
|
+
async selectTask(taskTitle) {
|
|
2057
|
+
await this.page.locator(`.ui-grid-cell-contents`).filter({
|
|
2058
|
+
hasText: taskTitle
|
|
2059
|
+
}).locator(`.item-selector`).click({
|
|
2060
|
+
force: true
|
|
2061
|
+
});
|
|
1562
2062
|
}
|
|
1563
|
-
async
|
|
1564
|
-
(0, $hOLA6$expect)(
|
|
2063
|
+
async expectSelectedTasksCounter(text) {
|
|
2064
|
+
await (0, $hOLA6$expect)(this.page.getByTestId("release-grid-selected-tasks")).toBeVisible();
|
|
2065
|
+
(0, $hOLA6$expect)(await this.page.getByTestId("release-grid-selected-tasks").textContent()).toContain(text);
|
|
1565
2066
|
}
|
|
1566
|
-
async
|
|
1567
|
-
|
|
2067
|
+
async clearSelection() {
|
|
2068
|
+
await this.page.getByTestId("release-grid-unselect-btn").click();
|
|
2069
|
+
return this;
|
|
1568
2070
|
}
|
|
1569
|
-
async
|
|
1570
|
-
await this.page.
|
|
1571
|
-
if (
|
|
1572
|
-
|
|
1573
|
-
await
|
|
1574
|
-
await
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
await this.page.locator(".bootstrap-timepicker-widget .bootstrap-timepicker-minute").fill(min);
|
|
2071
|
+
async assignSelectedTasks(owner, team) {
|
|
2072
|
+
await this.page.getByText("Assign to").click();
|
|
2073
|
+
if (owner) {
|
|
2074
|
+
const ownerSelector = this.page.locator(".task-owner");
|
|
2075
|
+
await ownerSelector.focus();
|
|
2076
|
+
await ownerSelector.click();
|
|
2077
|
+
await this.page.getByLabel("*").fill(owner);
|
|
2078
|
+
await this.page.locator("a").filter({
|
|
2079
|
+
hasText: owner
|
|
2080
|
+
}).click();
|
|
1580
2081
|
}
|
|
1581
|
-
if (
|
|
1582
|
-
|
|
1583
|
-
await
|
|
1584
|
-
await
|
|
2082
|
+
if (team) {
|
|
2083
|
+
const teamSelector = this.page.locator(".task-team > .display");
|
|
2084
|
+
await teamSelector.focus();
|
|
2085
|
+
await teamSelector.click();
|
|
2086
|
+
await this.page.getByLabel(team, {
|
|
2087
|
+
exact: true
|
|
2088
|
+
}).selectOption(team);
|
|
1585
2089
|
}
|
|
1586
|
-
await this.page.
|
|
2090
|
+
await this.page.getByRole("button", {
|
|
2091
|
+
name: "Assign"
|
|
2092
|
+
}).click();
|
|
2093
|
+
return this;
|
|
1587
2094
|
}
|
|
1588
|
-
async
|
|
1589
|
-
await this.page.
|
|
1590
|
-
|
|
2095
|
+
async expectSuccessMessage(successMessage) {
|
|
2096
|
+
await (0, $hOLA6$expect)(this.page.getByLabel("success")).toContainText(successMessage);
|
|
2097
|
+
return this;
|
|
1591
2098
|
}
|
|
1592
|
-
async
|
|
1593
|
-
|
|
2099
|
+
async completeSelectedTasks(comment) {
|
|
2100
|
+
await this.page.getByTestId("release-grid-complete-btn").click();
|
|
2101
|
+
await this.page.getByPlaceholder("Give feedback or place a").fill(comment);
|
|
2102
|
+
await this.page.getByRole("button", {
|
|
2103
|
+
name: "Complete"
|
|
2104
|
+
}).click();
|
|
2105
|
+
return this;
|
|
1594
2106
|
}
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
2107
|
+
async selectFromMoreActions(menuItem) {
|
|
2108
|
+
await this.page.getByTestId("release-grid-dropdown-btn").click();
|
|
2109
|
+
await this.page.getByRole("menuitem", {
|
|
2110
|
+
name: menuItem
|
|
2111
|
+
}).click();
|
|
2112
|
+
if (await this.commentBox.isVisible() == true) await this.commentBox.fill(" Automation Test Comment");
|
|
2113
|
+
if (await this.page.getByRole("button", {
|
|
2114
|
+
name: menuItem,
|
|
2115
|
+
exact: true
|
|
2116
|
+
}).isVisible() == true) await this.page.getByRole("button", {
|
|
2117
|
+
name: menuItem,
|
|
2118
|
+
exact: true
|
|
2119
|
+
}).click();
|
|
2120
|
+
return this;
|
|
2121
|
+
}
|
|
2122
|
+
async addCommentToSelectedTask(comment) {
|
|
2123
|
+
await this.page.getByTestId("release-grid-comment-btn").click();
|
|
2124
|
+
await this.page.getByPlaceholder("Give feedback or place a").click();
|
|
2125
|
+
await this.page.getByPlaceholder("Give feedback or place a").fill(comment);
|
|
2126
|
+
await this.page.getByRole("button", {
|
|
2127
|
+
name: "Comment"
|
|
2128
|
+
}).click();
|
|
2129
|
+
await (0, $hOLA6$expect)(this.page.getByLabel("success")).toBeVisible();
|
|
2130
|
+
return this;
|
|
2131
|
+
}
|
|
2132
|
+
async selectSubtasks(item) {
|
|
2133
|
+
await this.page.locator(`.ui-grid-cell-contents`).filter({
|
|
2134
|
+
hasText: item
|
|
2135
|
+
}).locator(`.tasks-group-select`).click({
|
|
2136
|
+
force: true
|
|
1608
2137
|
});
|
|
2138
|
+
return this;
|
|
1609
2139
|
}
|
|
1610
|
-
async
|
|
1611
|
-
|
|
2140
|
+
async shiftSelectFromTo(taskFrom, taskTo) {
|
|
2141
|
+
await this.page.locator(`.ui-grid-cell-contents`).filter({
|
|
2142
|
+
hasText: taskFrom
|
|
2143
|
+
}).locator(`.item-selector`).click({
|
|
2144
|
+
force: true
|
|
2145
|
+
});
|
|
2146
|
+
await this.page.keyboard.down("Shift");
|
|
2147
|
+
await this.page.locator(`.ui-grid-cell-contents`).filter({
|
|
2148
|
+
hasText: taskTo
|
|
2149
|
+
}).locator(`.item-selector`).click({
|
|
2150
|
+
force: true
|
|
2151
|
+
});
|
|
2152
|
+
await this.page.keyboard.up("Shift");
|
|
2153
|
+
return this;
|
|
1612
2154
|
}
|
|
1613
2155
|
}
|
|
1614
2156
|
|
|
@@ -1693,6 +2235,15 @@ class $87bbb6d35ad31a00$export$f8f26dd395d7e1bd extends (0, $9626bc9256ce31f7$ex
|
|
|
1693
2235
|
async clearSearchFilter() {
|
|
1694
2236
|
await this.page.locator(".searchFilter").clear();
|
|
1695
2237
|
}
|
|
2238
|
+
async leaveWithoutSaving() {
|
|
2239
|
+
await (0, $hOLA6$expect)(this.page.getByRole("heading", {
|
|
2240
|
+
name: "Confirm leave"
|
|
2241
|
+
})).toBeVisible();
|
|
2242
|
+
await (0, $hOLA6$expect)(this.page.getByRole("paragraph")).toContainText("You have unsaved changes that will be lost.");
|
|
2243
|
+
await this.page.getByRole("button", {
|
|
2244
|
+
name: "Leave without saving"
|
|
2245
|
+
}).click();
|
|
2246
|
+
}
|
|
1696
2247
|
}
|
|
1697
2248
|
|
|
1698
2249
|
|
|
@@ -1700,8 +2251,10 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
1700
2251
|
defaultTimeout = 10000;
|
|
1701
2252
|
constructor(page){
|
|
1702
2253
|
super(page);
|
|
2254
|
+
this.addPhaseBtn = this.page.getByTestId("add-phase-btn");
|
|
1703
2255
|
this.createPage = new (0, $05d91a1d3381a287$export$34addcca3f0ae43f)(page);
|
|
1704
2256
|
this.ganttPage = new (0, $a546aadb4e6fa16a$export$5a82be0a2a261cc6)(page);
|
|
2257
|
+
this.tableView = new (0, $19b7e7e46cfe3be0$export$649fde34d823ece7)(page);
|
|
1705
2258
|
this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
|
|
1706
2259
|
this.teamsPermissions = new (0, $96c6280ff1c47b81$export$3bc3e140e0dcb075)(page);
|
|
1707
2260
|
this.phaseTitle = this.page.locator(".phase .phase-title");
|
|
@@ -1721,6 +2274,7 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
1721
2274
|
await this.page.getByRole("button", {
|
|
1722
2275
|
name: "Abort"
|
|
1723
2276
|
}).click();
|
|
2277
|
+
await this.page.locator(".progress-status-and-percentage").waitFor();
|
|
1724
2278
|
await (0, $hOLA6$expect)(this.page.locator(".progress-status-and-percentage")).toContainText("Aborted");
|
|
1725
2279
|
}
|
|
1726
2280
|
getPhase(phaseName) {
|
|
@@ -1744,6 +2298,7 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
1744
2298
|
await this.page.getByRole("button", {
|
|
1745
2299
|
name: "Start"
|
|
1746
2300
|
}).click();
|
|
2301
|
+
await this.page.waitForSelector("#release");
|
|
1747
2302
|
}
|
|
1748
2303
|
async waitForCompletion(timeout = this.defaultTimeout) {
|
|
1749
2304
|
await this.page.locator("#release.completed").waitFor({
|
|
@@ -1757,6 +2312,13 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
1757
2312
|
timeout: timeout
|
|
1758
2313
|
});
|
|
1759
2314
|
}
|
|
2315
|
+
async waitForTaskNeedsInput(taskTitle) {
|
|
2316
|
+
await (0, $hOLA6$expect)(this.page.locator(".task.waiting_for_input").getByText(taskTitle, {
|
|
2317
|
+
exact: true
|
|
2318
|
+
})).toBeVisible({
|
|
2319
|
+
timeout: 10000
|
|
2320
|
+
});
|
|
2321
|
+
}
|
|
1760
2322
|
async waitForTaskCompletedInAdvance(taskTitle, timeout = this.defaultTimeout) {
|
|
1761
2323
|
await (0, $hOLA6$expect)(this.page.locator(".task.completed_in_advance").getByText(taskTitle, {
|
|
1762
2324
|
exact: true
|
|
@@ -1941,6 +2503,10 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
1941
2503
|
});
|
|
1942
2504
|
(0, $hOLA6$expect)(await this.page.locator(".progress-status-and-percentage").textContent()).toContain("Aborted");
|
|
1943
2505
|
}
|
|
2506
|
+
async expectInProgressStatusToBePresent() {
|
|
2507
|
+
await this.page.getByTestId("refresh-btn").click();
|
|
2508
|
+
(0, $hOLA6$expect)(await this.page.locator(".progress-status-and-percentage").textContent()).toContain("In progress");
|
|
2509
|
+
}
|
|
1944
2510
|
async openTableView() {
|
|
1945
2511
|
await this.util.openSideNavMenu("Table");
|
|
1946
2512
|
await (0, $hOLA6$expect)(this.page.locator(".release-grid-container")).toBeVisible();
|
|
@@ -1973,7 +2539,7 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
1973
2539
|
})).toBeVisible();
|
|
1974
2540
|
}
|
|
1975
2541
|
async addNewPhase(phaseName) {
|
|
1976
|
-
await this.
|
|
2542
|
+
await this.addPhaseBtn.click();
|
|
1977
2543
|
if (phaseName) {
|
|
1978
2544
|
await this.phaseTitle.getByText("New Phase").click();
|
|
1979
2545
|
await this.phaseTitle.getByRole("textbox").clear();
|
|
@@ -2045,6 +2611,12 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
2045
2611
|
await this.page.getByTestId("restart-btn").click();
|
|
2046
2612
|
return new $43cbcdfccb6c2a76$var$RestartPhaseModel(this.page);
|
|
2047
2613
|
}
|
|
2614
|
+
async expectAddPhaseNotVisible() {
|
|
2615
|
+
await (0, $hOLA6$expect)(this.addPhaseBtn).not.toBeVisible();
|
|
2616
|
+
}
|
|
2617
|
+
async expectAddTaskNotVisible() {
|
|
2618
|
+
await (0, $hOLA6$expect)(this.page.locator(".add-task.link")).not.toBeVisible();
|
|
2619
|
+
}
|
|
2048
2620
|
}
|
|
2049
2621
|
class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
2050
2622
|
constructor(page, phaseName){
|
|
@@ -2112,7 +2684,10 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
|
|
|
2112
2684
|
await this.page.locator(".icon-close").click();
|
|
2113
2685
|
await this.page.locator("#task-title").fill(taskTitle);
|
|
2114
2686
|
await this.page.getByTestId("save-select-task-btn").click();
|
|
2115
|
-
await
|
|
2687
|
+
await this.page.locator("#release-header").click();
|
|
2688
|
+
await (0, $hOLA6$expect)(this.phaseLocator.locator(".task-title").filter({
|
|
2689
|
+
hasText: taskTitle
|
|
2690
|
+
})).toBeVisible();
|
|
2116
2691
|
}
|
|
2117
2692
|
async getNumberOfTasks() {
|
|
2118
2693
|
return await this.phaseLocator.locator(".task").count();
|
|
@@ -2137,6 +2712,23 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
|
|
|
2137
2712
|
exact: true
|
|
2138
2713
|
}).click();
|
|
2139
2714
|
}
|
|
2715
|
+
async completeFromContextMenu(taskTitle, comment) {
|
|
2716
|
+
await this.openContextMenuForTask(taskTitle);
|
|
2717
|
+
await this.page.locator(".dropdown-menu li").getByText("Complete").click();
|
|
2718
|
+
await this.commentBox.fill(comment);
|
|
2719
|
+
await this.page.getByRole("button", {
|
|
2720
|
+
name: "Complete",
|
|
2721
|
+
exact: true
|
|
2722
|
+
}).click();
|
|
2723
|
+
}
|
|
2724
|
+
async assignToMeFromContextMenu(taskTitle) {
|
|
2725
|
+
await this.openContextMenuForTask(taskTitle);
|
|
2726
|
+
await this.page.locator(".dropdown-menu li").getByText("Assign to me").click();
|
|
2727
|
+
}
|
|
2728
|
+
async duplicateFromContextMenu(taskTitle) {
|
|
2729
|
+
await this.openContextMenuForTask(taskTitle);
|
|
2730
|
+
await this.page.locator(".dropdown-menu li").getByText("Duplicate").click();
|
|
2731
|
+
}
|
|
2140
2732
|
async expectTemplateLabelNotToBePresent() {
|
|
2141
2733
|
await (0, $hOLA6$expect)(this.page.locator(".dot-chip").filter({
|
|
2142
2734
|
hasText: "TEMPLATE"
|
|
@@ -2215,7 +2807,15 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
|
|
|
2215
2807
|
})).not.toBeVisible();
|
|
2216
2808
|
}
|
|
2217
2809
|
async expectCompletedPhase() {
|
|
2218
|
-
await (0, $hOLA6$expect)(this.
|
|
2810
|
+
await (0, $hOLA6$expect)(this.page.getByText("View all completed phases")).toBeVisible();
|
|
2811
|
+
}
|
|
2812
|
+
async clickViewAllCompletedPhase() {
|
|
2813
|
+
await this.page.getByText("View all completed phases").click();
|
|
2814
|
+
}
|
|
2815
|
+
async expectTaskToBePresent(taskName) {
|
|
2816
|
+
await (0, $hOLA6$expect)(this.phaseLocator.locator(".task").filter({
|
|
2817
|
+
hasText: taskName
|
|
2818
|
+
})).toBeVisible();
|
|
2219
2819
|
}
|
|
2220
2820
|
}
|
|
2221
2821
|
class $43cbcdfccb6c2a76$var$RestartPhaseModel extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
@@ -2344,6 +2944,9 @@ class $4cdce1306be47ecd$export$eace2be4de1d3377 extends (0, $9626bc9256ce31f7$ex
|
|
|
2344
2944
|
hasText: "Deleted release delivery successfully"
|
|
2345
2945
|
})).toBeVisible();
|
|
2346
2946
|
}
|
|
2947
|
+
async expectDeliveryDisplayed(deliveryName) {
|
|
2948
|
+
(0, $hOLA6$expect)(await this.page.locator(".fc-list-item-title").textContent()).toContain(deliveryName);
|
|
2949
|
+
}
|
|
2347
2950
|
}
|
|
2348
2951
|
|
|
2349
2952
|
|
|
@@ -2890,6 +3493,14 @@ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$ex
|
|
|
2890
3493
|
await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Variables")).toBeVisible();
|
|
2891
3494
|
return this.variables;
|
|
2892
3495
|
}
|
|
3496
|
+
async openCustomDashboard() {
|
|
3497
|
+
await this.util.openSideNavMenu("Custom dashboards");
|
|
3498
|
+
await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Custom dashboards")).toBeVisible();
|
|
3499
|
+
}
|
|
3500
|
+
async openReleaseByName(releaseName) {
|
|
3501
|
+
await this.page.getByTitle(releaseName).click();
|
|
3502
|
+
await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Flow")).toBeVisible();
|
|
3503
|
+
}
|
|
2893
3504
|
}
|
|
2894
3505
|
|
|
2895
3506
|
|
|
@@ -5486,9 +6097,234 @@ class $2cbb78eec86d0a9f$export$2edf430132ca35d0 extends (0, $9626bc9256ce31f7$ex
|
|
|
5486
6097
|
}
|
|
5487
6098
|
|
|
5488
6099
|
|
|
6100
|
+
|
|
6101
|
+
|
|
6102
|
+
|
|
6103
|
+
class $6c0f5b52769b32c3$export$9823ddf5e80770e7 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
6104
|
+
constructor(page){
|
|
6105
|
+
super(page);
|
|
6106
|
+
}
|
|
6107
|
+
async addNewInstance(typeName) {
|
|
6108
|
+
await this.page.locator(`.configuration-type`).filter({
|
|
6109
|
+
hasText: typeName
|
|
6110
|
+
}).locator(`.new-instance .button`).click({
|
|
6111
|
+
force: true
|
|
6112
|
+
});
|
|
6113
|
+
return new $6c0f5b52769b32c3$var$ConfigurationInstancePage(this.page);
|
|
6114
|
+
}
|
|
6115
|
+
async expectInstanceDisplayed(instanceName) {
|
|
6116
|
+
await this.page.locator("#configuration").waitFor({
|
|
6117
|
+
state: "visible",
|
|
6118
|
+
timeout: 200000
|
|
6119
|
+
});
|
|
6120
|
+
(0, $hOLA6$expect)(await this.page.locator(`.configuration-instance`).filter({
|
|
6121
|
+
hasText: instanceName
|
|
6122
|
+
}).isVisible()).toBe(true);
|
|
6123
|
+
return this;
|
|
6124
|
+
}
|
|
6125
|
+
async expectInstanceNotDisplayed(instanceName) {
|
|
6126
|
+
await this.page.locator("#configuration").waitFor({
|
|
6127
|
+
state: "visible"
|
|
6128
|
+
});
|
|
6129
|
+
(0, $hOLA6$expect)(await this.page.locator(`.configuration-instance`).filter({
|
|
6130
|
+
hasText: instanceName
|
|
6131
|
+
}).isVisible()).toBe(false);
|
|
6132
|
+
return this;
|
|
6133
|
+
}
|
|
6134
|
+
async openInstance(instanceName) {
|
|
6135
|
+
await this.page.locator(`.configuration-instance`).filter({
|
|
6136
|
+
hasText: instanceName
|
|
6137
|
+
}).locator(`.edit-instance`).click({
|
|
6138
|
+
force: true
|
|
6139
|
+
});
|
|
6140
|
+
return new $6c0f5b52769b32c3$var$ConfigurationInstancePage(this.page);
|
|
6141
|
+
}
|
|
6142
|
+
async deleteInstance(instanceName) {
|
|
6143
|
+
await this.page.locator(`.configuration-instance`).filter({
|
|
6144
|
+
hasText: instanceName
|
|
6145
|
+
}).locator(`.delete-instance`).click({
|
|
6146
|
+
force: true
|
|
6147
|
+
});
|
|
6148
|
+
return this;
|
|
6149
|
+
}
|
|
6150
|
+
async expectSuccessMsgToBeDisplayed(text) {
|
|
6151
|
+
await (0, $hOLA6$expect)(this.page.locator(".success")).toBeVisible();
|
|
6152
|
+
(0, $hOLA6$expect)(await this.page.locator(".success").textContent()).toContain(text);
|
|
6153
|
+
return this;
|
|
6154
|
+
}
|
|
6155
|
+
async clearFilter() {
|
|
6156
|
+
await this.page.locator(".search-input-filter input").clear({
|
|
6157
|
+
force: true
|
|
6158
|
+
});
|
|
6159
|
+
return this;
|
|
6160
|
+
}
|
|
6161
|
+
async searchInstances(instanceName) {
|
|
6162
|
+
await this.page.getByPlaceholder("Search...").click();
|
|
6163
|
+
await this.page.getByPlaceholder("Search...").fill(instanceName);
|
|
6164
|
+
return this;
|
|
6165
|
+
}
|
|
6166
|
+
async expectErrorDisplayed() {
|
|
6167
|
+
await (0, $hOLA6$expect)(this.page.locator(".modal-header h4")).toContainText("Error");
|
|
6168
|
+
await this.page.locator(".modal-header .xl-icon.close-icon").click();
|
|
6169
|
+
}
|
|
6170
|
+
}
|
|
6171
|
+
class $6c0f5b52769b32c3$var$ConfigurationInstancePage extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
6172
|
+
constructor(page){
|
|
6173
|
+
super(page);
|
|
6174
|
+
}
|
|
6175
|
+
async setTextField(fieldName, fieldValue) {
|
|
6176
|
+
await this.page.locator(`input[name=${fieldName}]`).clear({
|
|
6177
|
+
force: true
|
|
6178
|
+
});
|
|
6179
|
+
await this.page.locator(`input[name=${fieldName}]`).fill(fieldValue, {
|
|
6180
|
+
force: true
|
|
6181
|
+
});
|
|
6182
|
+
return this;
|
|
6183
|
+
}
|
|
6184
|
+
async setNumberField(fieldName, fieldValue) {
|
|
6185
|
+
await this.page.locator(`#${fieldName}`).clear({
|
|
6186
|
+
force: true
|
|
6187
|
+
});
|
|
6188
|
+
await this.page.locator(`#${fieldName}`).fill(fieldValue.toString(), {
|
|
6189
|
+
force: true
|
|
6190
|
+
});
|
|
6191
|
+
return this;
|
|
6192
|
+
}
|
|
6193
|
+
async selectFromDropdown(fieldName, element) {
|
|
6194
|
+
await this.page.getByLabel(fieldName).click();
|
|
6195
|
+
await this.page.getByRole("option", {
|
|
6196
|
+
name: element
|
|
6197
|
+
}).click();
|
|
6198
|
+
return this;
|
|
6199
|
+
}
|
|
6200
|
+
async save() {
|
|
6201
|
+
await this.page.getByRole("button", {
|
|
6202
|
+
name: "Save"
|
|
6203
|
+
}).click();
|
|
6204
|
+
await (0, $hOLA6$expect)(this.page.getByLabel("success")).toBeVisible();
|
|
6205
|
+
return this;
|
|
6206
|
+
}
|
|
6207
|
+
async test() {
|
|
6208
|
+
await this.page.getByRole("button", {
|
|
6209
|
+
name: "Test"
|
|
6210
|
+
}).click();
|
|
6211
|
+
return this;
|
|
6212
|
+
}
|
|
6213
|
+
async cancel() {
|
|
6214
|
+
await this.page.getByRole("button", {
|
|
6215
|
+
name: "Cancel"
|
|
6216
|
+
}).click();
|
|
6217
|
+
return this;
|
|
6218
|
+
}
|
|
6219
|
+
async expectResultBanner(message) {
|
|
6220
|
+
await (0, $hOLA6$expect)(this.page.locator(".configuration-result-banner")).toBeVisible();
|
|
6221
|
+
await (0, $hOLA6$expect)(this.page.locator(".configuration-result-banner")).toContainText(message);
|
|
6222
|
+
return this;
|
|
6223
|
+
}
|
|
6224
|
+
async expectDropdownToBe(fieldName, fieldValue) {
|
|
6225
|
+
const value = await this.page.locator(`#${fieldName}`).getAttribute("value");
|
|
6226
|
+
(0, $hOLA6$expect)(value).toBe(fieldValue);
|
|
6227
|
+
return this;
|
|
6228
|
+
}
|
|
6229
|
+
async clearDropdown(fieldName) {
|
|
6230
|
+
await this.page.locator(`input[id=${fieldName}]`).click({
|
|
6231
|
+
force: true
|
|
6232
|
+
});
|
|
6233
|
+
await this.page.getByRole(`button`, {
|
|
6234
|
+
name: "Clear"
|
|
6235
|
+
}).click();
|
|
6236
|
+
return this;
|
|
6237
|
+
}
|
|
6238
|
+
async clickField(fieldName) {
|
|
6239
|
+
await this.page.getByLabel(fieldName).click();
|
|
6240
|
+
return this;
|
|
6241
|
+
}
|
|
6242
|
+
async expectTextFieldToBe(fieldName, fieldValue) {
|
|
6243
|
+
(0, $hOLA6$expect)(await this.page.locator(`input[name=${fieldName}]`).getAttribute("value")).toContain(fieldValue);
|
|
6244
|
+
return this;
|
|
6245
|
+
}
|
|
6246
|
+
async setStringList(value) {
|
|
6247
|
+
await this.page.locator(".input-list input#stringList").click();
|
|
6248
|
+
if (value instanceof Array) for (const val of value){
|
|
6249
|
+
await this.page.locator(".input-list input#stringList").fill(val);
|
|
6250
|
+
await this.page.locator('[data-test-id="stringList"]').getByLabel("add icon button").click();
|
|
6251
|
+
}
|
|
6252
|
+
else await this.page.locator(".input-list input#stringList").fill(value);
|
|
6253
|
+
return this;
|
|
6254
|
+
}
|
|
6255
|
+
async expectStringListCountToBe(count) {
|
|
6256
|
+
(0, $hOLA6$expect)(await this.page.locator(`[data-test-id="stringList"] .list`).count()).toBe(count);
|
|
6257
|
+
return this;
|
|
6258
|
+
}
|
|
6259
|
+
async removeString(value) {
|
|
6260
|
+
await this.page.locator("li").filter({
|
|
6261
|
+
hasText: value
|
|
6262
|
+
}).getByLabel("close icon button").click();
|
|
6263
|
+
return this;
|
|
6264
|
+
}
|
|
6265
|
+
async setStringSet(value) {
|
|
6266
|
+
await this.page.locator(".input-list input#stringSet").click();
|
|
6267
|
+
if (value instanceof Array) for (const val of value){
|
|
6268
|
+
await this.page.locator(".input-list input#stringSet").fill(val);
|
|
6269
|
+
await this.page.locator('[data-test-id="stringSet"]').getByLabel("add icon button").click();
|
|
6270
|
+
}
|
|
6271
|
+
else await this.page.locator(".input-list input#stringSet").fill(value);
|
|
6272
|
+
return this;
|
|
6273
|
+
}
|
|
6274
|
+
async expectStringSetCountToBe(count) {
|
|
6275
|
+
(0, $hOLA6$expect)(await this.page.locator(`[data-test-id="stringSet"] .list`).count()).toBe(count);
|
|
6276
|
+
return this;
|
|
6277
|
+
}
|
|
6278
|
+
async setStringMap(pairs) {
|
|
6279
|
+
await this.page.locator('[data-test-id="stringMap"]').getByTestId("icon-button-tooltip").getByLabel("Add key-value pair").click();
|
|
6280
|
+
await this.page.locator("#new-row-key-input").fill(pairs.key);
|
|
6281
|
+
await this.page.locator("#new-row-value-input").fill(pairs.value);
|
|
6282
|
+
await this.page.getByRole("button", {
|
|
6283
|
+
name: "check-line icon"
|
|
6284
|
+
}).click();
|
|
6285
|
+
}
|
|
6286
|
+
async expectStringMapCountToBe(count) {
|
|
6287
|
+
(0, $hOLA6$expect)(await this.page.locator(`[data-test-id="stringMap"] .map-data-row`).count()).toBe(count);
|
|
6288
|
+
return this;
|
|
6289
|
+
}
|
|
6290
|
+
async expectTestButtonToBeDisabled() {
|
|
6291
|
+
await (0, $hOLA6$expect)(this.page.locator("action-toolbar button").filter({
|
|
6292
|
+
hasText: "Test"
|
|
6293
|
+
})).toBeDisabled();
|
|
6294
|
+
return this;
|
|
6295
|
+
}
|
|
6296
|
+
async togglePasswordFieldVariable(fieldName) {
|
|
6297
|
+
await this.page.locator(`.input-with-variables[data-test-id="${fieldName}"] button`).click({
|
|
6298
|
+
force: true
|
|
6299
|
+
});
|
|
6300
|
+
return this;
|
|
6301
|
+
}
|
|
6302
|
+
async setPasswordFieldVariable(fieldName, fieldValue) {
|
|
6303
|
+
await this.page.locator(`.input-with-variables[data-test-id="${fieldName}"] input`).click({
|
|
6304
|
+
force: true
|
|
6305
|
+
});
|
|
6306
|
+
await this.page.locator(`.input-with-variables[data-test-id="${fieldName}"] li`).filter({
|
|
6307
|
+
hasText: fieldValue
|
|
6308
|
+
}).click();
|
|
6309
|
+
return this;
|
|
6310
|
+
}
|
|
6311
|
+
async expectFieldsToNotBeVisible(fieldNames) {
|
|
6312
|
+
if (typeof fieldNames !== "string") for (const fName of fieldNames)await (0, $hOLA6$expect)(this.page.locator(`#${fName}`)).not.toBeVisible();
|
|
6313
|
+
else await (0, $hOLA6$expect)(this.page.locator(`#${fieldNames}`)).not.toBeVisible();
|
|
6314
|
+
return this;
|
|
6315
|
+
}
|
|
6316
|
+
async expectFieldsToBeVisible(fieldNames) {
|
|
6317
|
+
if (typeof fieldNames !== "string") for (const fName of fieldNames)await (0, $hOLA6$expect)(this.page.locator(`input[name=${fName}]`)).toBeVisible();
|
|
6318
|
+
else await (0, $hOLA6$expect)(this.page.locator(`input[name=${fieldNames}]`)).toBeVisible();
|
|
6319
|
+
return this;
|
|
6320
|
+
}
|
|
6321
|
+
}
|
|
6322
|
+
|
|
6323
|
+
|
|
5489
6324
|
class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
5490
6325
|
constructor(page){
|
|
5491
6326
|
this.page = page;
|
|
6327
|
+
this.connections = new (0, $6c0f5b52769b32c3$export$9823ddf5e80770e7)(page);
|
|
5492
6328
|
this.dataRandomGenerator = new (0, $b14c3492cf934ea2$export$e40b5d3c74b04c89)();
|
|
5493
6329
|
this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
|
|
5494
6330
|
this.folderPage = new (0, $50c91328c9110668$export$b453f08936c58edb)(page);
|
|
@@ -5510,6 +6346,7 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
|
5510
6346
|
this.releaseGroupPage = new (0, $cc2d15e53de5cef7$export$b6fbc3e67030138f)(page);
|
|
5511
6347
|
this.releaseGroupTimelinePage = new (0, $cc231ea61b77c7a2$export$1a0994e9c202d529)(page);
|
|
5512
6348
|
this.releaseListPage = new (0, $5359280e98d97ff9$export$a678525e79c4ccc4)(page);
|
|
6349
|
+
this.releaseGanttPage = new (0, $a546aadb4e6fa16a$export$5a82be0a2a261cc6)(page);
|
|
5513
6350
|
this.rolesPage = new (0, $208f399edeb35aa2$export$7a5b979a220f477c)(page);
|
|
5514
6351
|
this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
|
|
5515
6352
|
this.workflowCatalogPage = new (0, $2c7e9876d54521fb$export$5628dfd1b9e94785)(page);
|
|
@@ -5530,6 +6367,10 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
|
5530
6367
|
async openRelease(id) {
|
|
5531
6368
|
return this.openReleaseOrTemplate(id, true);
|
|
5532
6369
|
}
|
|
6370
|
+
async openPlannerView(releaseId) {
|
|
6371
|
+
await this.page.goto(`#/releases/${releaseId}/planner`);
|
|
6372
|
+
return new (0, $a546aadb4e6fa16a$export$5a82be0a2a261cc6)(this.page);
|
|
6373
|
+
}
|
|
5533
6374
|
async openApplicationsPage() {
|
|
5534
6375
|
return new (0, $c313b10398604df2$export$1533b625ec0c75e2)(this.page).goToApplicationsPage();
|
|
5535
6376
|
}
|
|
@@ -5620,6 +6461,7 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
|
5620
6461
|
await this.page.locator("ul.side-nav li").getByLabel("Connections", {
|
|
5621
6462
|
exact: true
|
|
5622
6463
|
}).click();
|
|
6464
|
+
await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Connections")).toBeVisible();
|
|
5623
6465
|
}
|
|
5624
6466
|
async openReleaseOrTemplate(id, release) {
|
|
5625
6467
|
const url = release ? "releases" : "templates";
|
|
@@ -5638,6 +6480,10 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
|
5638
6480
|
async openRisksProfile() {
|
|
5639
6481
|
await this.page.goto("./#/risks");
|
|
5640
6482
|
}
|
|
6483
|
+
async openConnection() {
|
|
6484
|
+
await this.page.goto("./#/configuration");
|
|
6485
|
+
await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Connections")).toBeVisible();
|
|
6486
|
+
}
|
|
5641
6487
|
}
|
|
5642
6488
|
|
|
5643
6489
|
|
|
@@ -5737,7 +6583,9 @@ const $f86fbaaa8b4e8c61$export$45f0aca2596a2bb3 = function() {
|
|
|
5737
6583
|
processTasks(subTask, task, idx);
|
|
5738
6584
|
});
|
|
5739
6585
|
(0, $hOLA6$lodasheach)(task.templateVariables, function(variable, idx) {
|
|
5740
|
-
if (variable.value !== undefined)
|
|
6586
|
+
if (variable.value !== undefined) // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
6587
|
+
// @ts-ignore
|
|
6588
|
+
(0, $hOLA6$lodashdefaults)(variable, getVariableEntity(variable.value, variable.key, task.id, idx));
|
|
5741
6589
|
});
|
|
5742
6590
|
(0, $hOLA6$lodasheach)(task.attachments, function(attachment, idx) {
|
|
5743
6591
|
attachment.type = ATTACHMENT_TYPE;
|
|
@@ -5808,7 +6656,9 @@ const $f86fbaaa8b4e8c61$export$45f0aca2596a2bb3 = function() {
|
|
|
5808
6656
|
attachment.id = `${release.id}/Attachment${index}`;
|
|
5809
6657
|
});
|
|
5810
6658
|
(0, $hOLA6$lodashforEach)(release.variables, function(variable, index) {
|
|
5811
|
-
if (variable.value !== undefined)
|
|
6659
|
+
if (variable.value !== undefined) // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
6660
|
+
// @ts-ignore
|
|
6661
|
+
(0, $hOLA6$lodashdefaults)(variable, getVariableEntity(variable.value, variable.key, release.id, index));
|
|
5812
6662
|
if (variable.valueProvider) (0, $hOLA6$lodashdefaults)(variable.valueProvider, getValueProviderConfigurationEntity(variable.id));
|
|
5813
6663
|
});
|
|
5814
6664
|
(0, $hOLA6$lodashforEach)((0, $hOLA6$lodashtoPairs)(release.variableValues), function(keyValue, index) {
|
|
@@ -5865,6 +6715,7 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
5865
6715
|
folderIds = [];
|
|
5866
6716
|
usernames = [];
|
|
5867
6717
|
userProfiles = [];
|
|
6718
|
+
folderVariableIds = [];
|
|
5868
6719
|
constructor(request, page){
|
|
5869
6720
|
this.request = request;
|
|
5870
6721
|
this.page = page;
|
|
@@ -5916,18 +6767,26 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
5916
6767
|
folder.type = "xlrelease.Folder";
|
|
5917
6768
|
let teams = folder.teams;
|
|
5918
6769
|
delete folder.teams;
|
|
5919
|
-
|
|
5920
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */ const children = folder.children || [];
|
|
6770
|
+
const children = folder.children || [];
|
|
5921
6771
|
delete folder.children;
|
|
6772
|
+
const folderVariables = (folder.variables || []).map((variable)=>{
|
|
6773
|
+
variable.folderId = folder.id;
|
|
6774
|
+
return variable;
|
|
6775
|
+
});
|
|
6776
|
+
delete folder.variables;
|
|
5922
6777
|
const response = await this.doPost(`api/v1/folders/${parentId}`, folder);
|
|
5923
6778
|
// Add the folder ID to the list
|
|
5924
6779
|
this.folderIds.push(folder.id);
|
|
5925
6780
|
// If teams are provided, send a request to add teams to the folder
|
|
5926
6781
|
if (teams) {
|
|
5927
6782
|
teams = this.addSystemTeams(teams);
|
|
5928
|
-
|
|
5929
|
-
return newresponse;
|
|
6783
|
+
return await this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
|
|
5930
6784
|
}
|
|
6785
|
+
if (children && children.length > 0) {
|
|
6786
|
+
await this.folderVariable(folderVariables);
|
|
6787
|
+
return await this.folder(children[0]);
|
|
6788
|
+
}
|
|
6789
|
+
if (folderVariables && folderVariables.length > 0) return await this.folderVariable(folderVariables);
|
|
5931
6790
|
return response;
|
|
5932
6791
|
}
|
|
5933
6792
|
createFolder(folderJson) {
|
|
@@ -5936,6 +6795,18 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
5936
6795
|
folderJson
|
|
5937
6796
|
]);
|
|
5938
6797
|
}
|
|
6798
|
+
async folderVariable(variable) {
|
|
6799
|
+
// Flatten and process the variables
|
|
6800
|
+
const variables = [].concat(variable).flat()// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
6801
|
+
.map((variable)=>{
|
|
6802
|
+
variable.id = null;
|
|
6803
|
+
variable.type = variable.type || "xlrelease.StringVariable";
|
|
6804
|
+
variable.requiresValue = false;
|
|
6805
|
+
variable.showOnReleaseStart = false;
|
|
6806
|
+
return variable;
|
|
6807
|
+
});
|
|
6808
|
+
return await this.doPost("fixtures/folders/variables", variables);
|
|
6809
|
+
}
|
|
5939
6810
|
trigger(trigger) {
|
|
5940
6811
|
this.triggerIds.push(trigger.id);
|
|
5941
6812
|
return this.doPost("fixtures/trigger", trigger);
|
|
@@ -5949,6 +6820,9 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
5949
6820
|
globalRoles(rolePrincipals) {
|
|
5950
6821
|
return this.doPost(`api/v1/roles/${rolePrincipals.name}`, rolePrincipals);
|
|
5951
6822
|
}
|
|
6823
|
+
dashboard(dashboard) {
|
|
6824
|
+
return this.doPost("fixtures/dashboard", dashboard);
|
|
6825
|
+
}
|
|
5952
6826
|
deleteGlobalRole(roleName) {
|
|
5953
6827
|
return this.doDelete(`api/v1/roles/${roleName}`);
|
|
5954
6828
|
}
|
|
@@ -6025,6 +6899,17 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
6025
6899
|
deleteRiskProfile(riskProfileId) {
|
|
6026
6900
|
return this.doDelete(`fixtures/riskProfiles/${riskProfileId}`);
|
|
6027
6901
|
}
|
|
6902
|
+
// Release delivery pattern
|
|
6903
|
+
createDeliveryPattern(delivery, shouldResetPattern = true) {
|
|
6904
|
+
return this.doPost(`fixtures/deliveries/patterns/${shouldResetPattern}`, delivery);
|
|
6905
|
+
}
|
|
6906
|
+
// Release deliveries
|
|
6907
|
+
createDelivery(delivery) {
|
|
6908
|
+
return this.doPost("fixtures/deliveries", delivery);
|
|
6909
|
+
}
|
|
6910
|
+
deleteDelivery(delivery) {
|
|
6911
|
+
return this.doDelete(`fixtures/deliveries/${delivery}`);
|
|
6912
|
+
}
|
|
6028
6913
|
async cleanAll() {
|
|
6029
6914
|
for (const username of this.usernames)await this.deleteUser(username);
|
|
6030
6915
|
for (const userProfile of this.userProfiles)await this.deleteUserProfile(userProfile);
|
|
@@ -6078,6 +6963,25 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
6078
6963
|
this.userProfiles.push(profile.canonicalId);
|
|
6079
6964
|
await this.doPost("fixtures/userProfile", profile);
|
|
6080
6965
|
}
|
|
6966
|
+
async resetUserProfile(username, fullName) {
|
|
6967
|
+
this.usernames.push(username);
|
|
6968
|
+
return this.updateProfile({
|
|
6969
|
+
username: username,
|
|
6970
|
+
external: false,
|
|
6971
|
+
profileId: username,
|
|
6972
|
+
email: "",
|
|
6973
|
+
fullName: fullName ? fullName : username,
|
|
6974
|
+
loginAllowed: true,
|
|
6975
|
+
// dateFormat: "dd/MM/yy",
|
|
6976
|
+
dateFormat: "M/d/yy",
|
|
6977
|
+
// timeFormat: "HH:mm",
|
|
6978
|
+
timeFormat: "h:mm a",
|
|
6979
|
+
firstDayOfWeek: 0
|
|
6980
|
+
});
|
|
6981
|
+
}
|
|
6982
|
+
async updateProfile(profile) {
|
|
6983
|
+
return this.doPut("profile", profile);
|
|
6984
|
+
}
|
|
6081
6985
|
async expectJiraTaskStatus(taskId, expectedStatus) {
|
|
6082
6986
|
const headers = {
|
|
6083
6987
|
Authorization: `Basic ${btoa("xlr-jira-testuser@xebialabs.com:zgsXK6c3oLVkJxrWVJQy9DB7")}`,
|