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

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
@@ -639,6 +639,123 @@ class $dfc4ce40cbd0eb71$var$DeleteVariableModel extends (0, $9626bc9256ce31f7$ex
639
639
 
640
640
 
641
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
+
642
759
  class $e44e9af564fb00f7$export$64c93bc7fb9ca44e extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
643
760
  constructor(page){
644
761
  super(page);
@@ -698,39 +815,12 @@ class $e44e9af564fb00f7$export$64c93bc7fb9ca44e extends (0, $9626bc9256ce31f7$ex
698
815
 
699
816
 
700
817
 
701
-
702
- class $3fa741329d8067d5$export$d4865631ba74f3e2 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
703
- constructor(page){
704
- super(page);
705
- this.railLocator = this.page.locator("task-drawer .dot-drawer .task-conditions");
706
- this.preconditionToggle = page.getByLabel("Enable precondition");
707
- this.textEditor = page.getByRole("textbox");
708
- this.saveButton = page.getByTestId("save-btn");
709
- }
710
- async enablePrecondition() {
711
- (0, $hOLA6$expect)(await this.preconditionToggle.isChecked()).toBe(false);
712
- await this.preconditionToggle.check();
713
- }
714
- async disablePrecondition() {
715
- (0, $hOLA6$expect)(await this.preconditionToggle.isChecked()).toBe(true);
716
- await this.preconditionToggle.uncheck();
717
- }
718
- async setPrecondition(script) {
719
- await this.enablePrecondition();
720
- await this.textEditor.fill(script);
721
- await this.saveButton.dblclick();
722
- await this.page.waitForTimeout(1000);
723
- }
724
- }
725
-
726
-
727
-
728
-
729
818
  class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
730
819
  constructor(page){
731
820
  super(page);
732
- this.railLocator = this.page.locator("task-drawer .dot-drawer .task-drawer-content");
733
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");
734
824
  }
735
825
  async openInputProperties() {
736
826
  await this.railLocator.locator(".task-config-header").getByText("Input properties").click();
@@ -793,6 +883,11 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
793
883
  async expectBodyToBe(value) {
794
884
  return await (0, $hOLA6$expect)(this.page.locator(".notification-body-field p")).toHaveText(value);
795
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
+ }
796
891
  async setValueFromMap(propertyName, key, value) {
797
892
  await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.add-new-button`).click();
798
893
  await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] input[id="new-row-key-input"]`).fill(key);
@@ -800,29 +895,29 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
800
895
  await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.map-row-save-button`).click();
801
896
  }
802
897
  async setScript(script) {
803
- await this.page.locator(".code-editor textarea.ace_text-input").clear();
804
- await this.page.locator(".code-editor textarea.ace_text-input").fill(script);
898
+ await this.scriptTextArea.clear();
899
+ await this.scriptTextArea.fill(script);
805
900
  await this.page.locator('.code-editor .header button:has-text("Save")').click();
806
901
  }
807
902
  async expectScriptToContain(script) {
808
903
  await (0, $hOLA6$expect)(this.page.locator(".code-editor .ace_content")).toContainText(script);
809
904
  }
810
905
  async enterScriptForAutoComplete(script) {
811
- await this.page.locator(".code-editor textarea.ace_text-input").clear();
812
- await this.page.locator(".code-editor textarea.ace_text-input").fill(script);
813
- await this.page.locator(".code-editor textarea.ace_text-input").press(".");
906
+ await this.scriptTextArea.clear();
907
+ await this.scriptTextArea.fill(script);
908
+ await this.scriptTextArea.press(".");
814
909
  }
815
910
  async openScriptEditorInSeparateWindow() {
816
911
  await this.page.getByTestId("fullscreen-enter-btn").click();
817
- (0, $hOLA6$expect)(this.page.locator("#dialogTitle")).toBeVisible();
912
+ await (0, $hOLA6$expect)(this.page.locator("#dialogTitle")).toBeVisible();
818
913
  }
819
914
  async closeFullscreenScriptWindowWithESC() {
820
915
  await this.page.locator("#dialogTitle").press("Escape");
821
- (0, $hOLA6$expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
916
+ await (0, $hOLA6$expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
822
917
  }
823
918
  async closeFullscreenScriptWindow() {
824
919
  await this.page.getByTestId("fullscreen-exit-btn").click();
825
- (0, $hOLA6$expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
920
+ await (0, $hOLA6$expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
826
921
  }
827
922
  async abort(comment) {
828
923
  await this.page.getByTestId("single-action-button").click();
@@ -859,6 +954,10 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
859
954
  await (0, $hOLA6$expect)(this.railLocator.locator(".add-dependency-btn")).toBeVisible();
860
955
  await this.railLocator.locator(".add-dependency-btn").click();
861
956
  }
957
+ async addCondition() {
958
+ await (0, $hOLA6$expect)(this.railLocator.getByTestId("add-condition")).toBeVisible();
959
+ await this.railLocator.getByTestId("add-condition").click();
960
+ }
862
961
  async expectDependencyText(dependencies) {
863
962
  await (0, $hOLA6$expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
864
963
  await (0, $hOLA6$expect)(this.page.locator(`.gate-task-dependencies`).getByLabel(dependencies).first()).toBeVisible();
@@ -1027,6 +1126,28 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
1027
1126
  hasText: title
1028
1127
  })).toBeVisible();
1029
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
+ }
1030
1151
  }
1031
1152
  class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1032
1153
  constructor(page){
@@ -1121,68 +1242,6 @@ class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$ex
1121
1242
 
1122
1243
 
1123
1244
 
1124
- class $69e86f559cdf2bd0$export$15d3f9b095bb5188 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1125
- async expectCommentToContain(comment) {
1126
- (0, $hOLA6$expect)(await this.page.locator(".markdown-wrapper").textContent()).toContain(comment);
1127
- }
1128
- async expectTaskIsCommentable(isCommentable) {
1129
- return (0, $hOLA6$expect)(await this.page.locator("#task-comment").count()).toBe(isCommentable ? 1 : 0);
1130
- }
1131
- }
1132
-
1133
-
1134
-
1135
-
1136
- class $9c357602b6f466e7$export$aa59788fdecae2f2 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1137
- async expectWithAttachment(filename) {
1138
- const test = this.page.locator(".task-attachments-grid .file-item-text");
1139
- await test.isVisible();
1140
- await (0, $hOLA6$expect)(test).toContainText(filename);
1141
- }
1142
- async getAttachmentsListCount() {
1143
- return await this.page.locator(".file-upload-list div").count();
1144
- }
1145
- async uploadFile(filePath) {
1146
- const fileChooserPromise = this.page.waitForEvent("filechooser");
1147
- await this.page.getByRole("button", {
1148
- name: "Select file(s)"
1149
- }).click();
1150
- const fileChooser = await fileChooserPromise;
1151
- await fileChooser.setFiles(filePath);
1152
- }
1153
- async downloadFile(filename) {
1154
- // eslint-disable-next-line @typescript-eslint/no-empty-function
1155
- this.page.on("download", ()=>{});
1156
- const downloadPromise = this.page.waitForEvent("download");
1157
- await this.page.locator("li").filter({
1158
- hasText: "" + filename + ""
1159
- }).click();
1160
- await downloadPromise;
1161
- }
1162
- async deleteAttachment(fileName) {
1163
- await this.page.locator("li").filter({
1164
- hasText: fileName
1165
- }).click();
1166
- await this.page.getByLabel("delete file").click();
1167
- await this.page.getByRole("button", {
1168
- name: "Delete"
1169
- }).waitFor({
1170
- state: "visible"
1171
- });
1172
- await this.page.getByRole("button", {
1173
- name: "Delete"
1174
- }).click();
1175
- }
1176
- async expectWithNoAttachment(tempFile) {
1177
- const test = await this.page.locator(".task-attachments-grid .file-item-text").count();
1178
- if (test > 0) await (0, $hOLA6$expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toContainText(tempFile);
1179
- else await (0, $hOLA6$expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toBeVisible();
1180
- }
1181
- }
1182
-
1183
-
1184
-
1185
-
1186
1245
 
1187
1246
 
1188
1247
 
@@ -1264,25 +1323,21 @@ class $499d3d8c8706756b$export$e3515314c13bc477 extends (0, $9626bc9256ce31f7$ex
1264
1323
  }
1265
1324
 
1266
1325
 
1326
+
1267
1327
  class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1268
1328
  constructor(page){
1269
1329
  super(page);
1270
- this.taskDrawerLocator = this.page.locator("task-drawer .dot-drawer");
1271
- this.retryButton = this.page.getByRole("button", {
1272
- name: "Retry"
1273
- });
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);
1274
1333
  this.cancelButton = this.page.getByTestId("task-action-cancel");
1275
1334
  this.commentBox = this.page.getByTestId("task-action-comment");
1276
1335
  this.confirm = this.page.locator(".popper-action-buttons").getByTestId("dot-button");
1277
- this.activity = new (0, $69e86f559cdf2bd0$export$15d3f9b095bb5188)(page);
1278
- this.attachment = new (0, $9c357602b6f466e7$export$aa59788fdecae2f2)(page);
1279
1336
  this.config = new (0, $e44e9af564fb00f7$export$64c93bc7fb9ca44e)(page);
1280
1337
  this.condition = new (0, $3fa741329d8067d5$export$d4865631ba74f3e2)(page);
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");
1284
- this.skipMenu = this.page.getByRole("menuitem", {
1285
- name: "Skip"
1338
+ this.completeButton = this.page.getByRole("button", {
1339
+ name: "Complete",
1340
+ exact: true
1286
1341
  });
1287
1342
  this.failMenu = this.page.getByRole("menuitem", {
1288
1343
  name: "Fail"
@@ -1291,10 +1346,16 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
1291
1346
  name: "arrow-down icon",
1292
1347
  exact: true
1293
1348
  });
1294
- this.completeButton = this.page.getByRole("button", {
1295
- name: "Complete",
1296
- exact: true
1349
+ this.overview = new (0, $90bb70a7e909e500$export$519356f6c50361f7)(page);
1350
+ this.retryButton = this.page.getByRole("button", {
1351
+ name: "Retry"
1297
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");
1298
1359
  }
1299
1360
  async openOverviewRail() {
1300
1361
  await this.openRail("Overview");
@@ -1347,6 +1408,12 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
1347
1408
  await this.commentBox.fill(comment);
1348
1409
  await this.confirm.click();
1349
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
+ }
1350
1417
  async expectTaskTitle(taskTitle) {
1351
1418
  await (0, $hOLA6$expect)(this.page.locator(".task-drawer .task-title-input .dot-view-mode-typography")).toContainText(taskTitle);
1352
1419
  }
@@ -1432,6 +1499,16 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
1432
1499
  async expectStartDateToBeDisplayed() {
1433
1500
  await (0, $hOLA6$expect)(this.page.getByTestId("start-date-title")).toHaveCount(1);
1434
1501
  }
1502
+ async expectStartDayToBeInAvatar(expectedDay) {
1503
+ const startDayAvatar = this.page.locator(`.task-date-content .MuiAvatar-root[aria-label] `).nth(0);
1504
+ const startDay = await startDayAvatar.locator("..").locator("h3").textContent();
1505
+ (0, $hOLA6$expect)(startDay?.trim()).toBe(expectedDay);
1506
+ }
1507
+ async expectEndDayToBeInAvatar(expectedDay) {
1508
+ const endDayAvatar = this.page.locator(`.task-date-content .MuiAvatar-root[aria-label] `).nth(1);
1509
+ const endDay = await endDayAvatar.locator("..").locator("h3").textContent();
1510
+ (0, $hOLA6$expect)(endDay?.trim()).toBe(expectedDay);
1511
+ }
1435
1512
  async expectEndDateToBeDisplayed() {
1436
1513
  await (0, $hOLA6$expect)(this.page.getByTestId("end-date-title")).toHaveCount(1);
1437
1514
  }
@@ -2168,6 +2245,15 @@ class $87bbb6d35ad31a00$export$f8f26dd395d7e1bd extends (0, $9626bc9256ce31f7$ex
2168
2245
  async clearSearchFilter() {
2169
2246
  await this.page.locator(".searchFilter").clear();
2170
2247
  }
2248
+ async leaveWithoutSaving() {
2249
+ await (0, $hOLA6$expect)(this.page.getByRole("heading", {
2250
+ name: "Confirm leave"
2251
+ })).toBeVisible();
2252
+ await (0, $hOLA6$expect)(this.page.getByRole("paragraph")).toContainText("You have unsaved changes that will be lost.");
2253
+ await this.page.getByRole("button", {
2254
+ name: "Leave without saving"
2255
+ }).click();
2256
+ }
2171
2257
  }
2172
2258
 
2173
2259
 
@@ -2204,6 +2290,13 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
2204
2290
  getPhase(phaseName) {
2205
2291
  return new $43cbcdfccb6c2a76$var$Phase(this.page, phaseName);
2206
2292
  }
2293
+ async expectPhaseCountToBe(expectedPhaseCount) {
2294
+ const phaseCount = await this.page.locator(".phase").count();
2295
+ (0, $hOLA6$expect)(phaseCount).toBe(expectedPhaseCount);
2296
+ }
2297
+ async expectVariableToBeFound(variableName) {
2298
+ await (0, $hOLA6$expect)(this.page.locator(`span.variable:has-text("${variableName}")`)).toHaveCount(1);
2299
+ }
2207
2300
  async expectNotFlagged() {
2208
2301
  await (0, $hOLA6$expect)(this.page.locator(".flag-none-icon")).toBeHidden();
2209
2302
  }
@@ -2571,12 +2664,13 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
2571
2664
  }
2572
2665
  async isMenuItemDisabled(menuName, taskTitle) {
2573
2666
  await this.openContextMenuForTask(taskTitle);
2574
- await (0, $hOLA6$expect)(this.contextMenuButton.filter({
2667
+ const menuItem = this.contextMenuButton.filter({
2575
2668
  hasText: menuName
2576
- })).toHaveClass(/disabled/);
2577
- await (0, $hOLA6$expect)(this.contextMenuButton.filter({
2578
- hasText: menuName
2579
- }).locator("a")).toBeDisabled();
2669
+ });
2670
+ await (0, $hOLA6$expect)(menuItem).toHaveClass(/disabled/);
2671
+ const anchorTag = menuItem.locator("a");
2672
+ const disabledAttribute = await anchorTag.getAttribute("disabled");
2673
+ await (0, $hOLA6$expect)(disabledAttribute).not.toBeNull();
2580
2674
  await this.closeContextMenu();
2581
2675
  }
2582
2676
  async expectMenuItemIsNotVisible(menuName, taskTitle) {
@@ -2608,7 +2702,10 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
2608
2702
  await this.page.locator(".icon-close").click();
2609
2703
  await this.page.locator("#task-title").fill(taskTitle);
2610
2704
  await this.page.getByTestId("save-select-task-btn").click();
2611
- await (0, $hOLA6$expect)(this.phaseLocator.getByText(taskTitle)).toBeVisible();
2705
+ await this.page.locator("#release-header").click();
2706
+ await (0, $hOLA6$expect)(this.phaseLocator.locator(".task-title").filter({
2707
+ hasText: taskTitle
2708
+ })).toBeVisible();
2612
2709
  }
2613
2710
  async getNumberOfTasks() {
2614
2711
  return await this.phaseLocator.locator(".task").count();
@@ -2738,6 +2835,51 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
2738
2835
  hasText: taskName
2739
2836
  })).toBeVisible();
2740
2837
  }
2838
+ async expectContainingTask(taskName, exist = true) {
2839
+ const taskHeaderLocator = this.phaseLocator.locator(".task-header").filter({
2840
+ hasText: taskName
2841
+ });
2842
+ if (exist) await (0, $hOLA6$expect)(taskHeaderLocator).toContainText(taskName);
2843
+ else await (0, $hOLA6$expect)(taskHeaderLocator).not.toContainText(taskName);
2844
+ }
2845
+ // eslint-disable-next-line max-params
2846
+ async addTaskInGroup(currentGroupType, taskTitle, taskGroup, taskType) {
2847
+ const groupTaskLocator = this.phaseLocator.filter({
2848
+ hasText: "Dev.Phase"
2849
+ }).locator("li").filter({
2850
+ hasText: currentGroupType
2851
+ }).locator("a.add-task.link");
2852
+ await groupTaskLocator.click();
2853
+ await this.page.locator("#task-selector").hover();
2854
+ await this.page.locator('button[aria-label="Clear"]').click();
2855
+ await this.page.locator("#task-selector").fill(taskGroup);
2856
+ await this.page.getByTestId(taskType).click();
2857
+ await this.page.locator(".icon-close").click();
2858
+ await this.page.locator("#task-title").fill(taskTitle);
2859
+ await this.page.getByTestId("save-select-task-btn").click();
2860
+ await (0, $hOLA6$expect)(this.phaseLocator.filter({
2861
+ hasText: currentGroupType
2862
+ }).getByText(taskTitle)).toBeVisible();
2863
+ }
2864
+ async openContextMenuForTaskInGroup(taskTitle, groupName) {
2865
+ const taskLocator = this.phaseLocator.filter({
2866
+ hasText: groupName
2867
+ }).locator(".task").filter({
2868
+ hasText: taskTitle
2869
+ });
2870
+ await taskLocator.locator(".task-inner-active > .task-container > .task-box > .task > .context-menu-button").click();
2871
+ }
2872
+ async duplicatePhase() {
2873
+ await this.phaseLocator.locator(".duplicate-phase").click();
2874
+ }
2875
+ async expectActionsDisabled() {
2876
+ await (0, $hOLA6$expect)(this.phaseLocator.locator(".duplicate-phase")).toHaveCount(0);
2877
+ await (0, $hOLA6$expect)(this.phaseLocator.locator(".delete-phase")).toHaveCount(0);
2878
+ await (0, $hOLA6$expect)(this.phaseLocator.locator(".task .duplicate-task")).toHaveCount(0);
2879
+ await (0, $hOLA6$expect)(this.phaseLocator.locator(".task .delete-task")).toHaveCount(0);
2880
+ await (0, $hOLA6$expect)(this.phaseLocator.locator(".task-generator .add-task")).toHaveCount(0);
2881
+ await (0, $hOLA6$expect)(this.phaseLocator.locator(".display")).toHaveCount(0);
2882
+ }
2741
2883
  }
2742
2884
  class $43cbcdfccb6c2a76$var$RestartPhaseModel extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
2743
2885
  constructor(page){
@@ -3996,6 +4138,14 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
3996
4138
  await this.modal.setConfirmPassword(password);
3997
4139
  await this.modal.save();
3998
4140
  }
4141
+ async filterUser(username) {
4142
+ await this.page.getByPlaceholder("Filter...").fill(username);
4143
+ }
4144
+ async expectToHaveFilteredUser(username) {
4145
+ return await (0, $hOLA6$expect)(this.page.getByRole("row", {
4146
+ name: "" + username + ""
4147
+ })).toBeVisible();
4148
+ }
3999
4149
  async expectToHaveLoginPermission(username) {
4000
4150
  return await (0, $hOLA6$expect)(this.page.getByRole("row", {
4001
4151
  name: "" + username + ""
@@ -6019,9 +6169,233 @@ class $2cbb78eec86d0a9f$export$2edf430132ca35d0 extends (0, $9626bc9256ce31f7$ex
6019
6169
 
6020
6170
 
6021
6171
 
6172
+
6173
+
6174
+ class $6c0f5b52769b32c3$export$9823ddf5e80770e7 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
6175
+ constructor(page){
6176
+ super(page);
6177
+ }
6178
+ async addNewInstance(typeName) {
6179
+ await this.page.locator(`.configuration-type`).filter({
6180
+ hasText: typeName
6181
+ }).locator(`.new-instance .button`).click({
6182
+ force: true
6183
+ });
6184
+ return new $6c0f5b52769b32c3$var$ConfigurationInstancePage(this.page);
6185
+ }
6186
+ async expectInstanceDisplayed(instanceName) {
6187
+ await this.page.locator("#configuration").waitFor({
6188
+ state: "visible",
6189
+ timeout: 200000
6190
+ });
6191
+ (0, $hOLA6$expect)(await this.page.locator(`.configuration-instance`).filter({
6192
+ hasText: instanceName
6193
+ }).isVisible()).toBe(true);
6194
+ return this;
6195
+ }
6196
+ async expectInstanceNotDisplayed(instanceName) {
6197
+ await this.page.locator("#configuration").waitFor({
6198
+ state: "visible"
6199
+ });
6200
+ (0, $hOLA6$expect)(await this.page.locator(`.configuration-instance`).filter({
6201
+ hasText: instanceName
6202
+ }).isVisible()).toBe(false);
6203
+ return this;
6204
+ }
6205
+ async openInstance(instanceName) {
6206
+ await this.page.locator(`.configuration-instance`).filter({
6207
+ hasText: instanceName
6208
+ }).locator(`.edit-instance`).click({
6209
+ force: true
6210
+ });
6211
+ return new $6c0f5b52769b32c3$var$ConfigurationInstancePage(this.page);
6212
+ }
6213
+ async deleteInstance(instanceName) {
6214
+ await this.page.locator(`.configuration-instance`).filter({
6215
+ hasText: instanceName
6216
+ }).locator(`.delete-instance`).click({
6217
+ force: true
6218
+ });
6219
+ return this;
6220
+ }
6221
+ async expectSuccessMsgToBeDisplayed(text) {
6222
+ await (0, $hOLA6$expect)(this.page.locator(".success")).toBeVisible();
6223
+ (0, $hOLA6$expect)(await this.page.locator(".success").textContent()).toContain(text);
6224
+ return this;
6225
+ }
6226
+ async clearFilter() {
6227
+ await this.page.locator(".search-input-filter input").clear({
6228
+ force: true
6229
+ });
6230
+ return this;
6231
+ }
6232
+ async searchInstances(instanceName) {
6233
+ await this.page.getByPlaceholder("Search...").click();
6234
+ await this.page.getByPlaceholder("Search...").fill(instanceName);
6235
+ return this;
6236
+ }
6237
+ async expectErrorDisplayed() {
6238
+ await (0, $hOLA6$expect)(this.page.locator(".modal-header h4")).toContainText("Error");
6239
+ await this.page.locator(".modal-header .xl-icon.close-icon").click();
6240
+ }
6241
+ }
6242
+ class $6c0f5b52769b32c3$var$ConfigurationInstancePage extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
6243
+ constructor(page){
6244
+ super(page);
6245
+ }
6246
+ async setTextField(fieldName, fieldValue) {
6247
+ await this.page.locator(`input[name=${fieldName}]`).clear({
6248
+ force: true
6249
+ });
6250
+ await this.page.locator(`input[name=${fieldName}]`).fill(fieldValue, {
6251
+ force: true
6252
+ });
6253
+ return this;
6254
+ }
6255
+ async setNumberField(fieldName, fieldValue) {
6256
+ await this.page.locator(`#${fieldName}`).clear({
6257
+ force: true
6258
+ });
6259
+ await this.page.locator(`#${fieldName}`).fill(fieldValue.toString(), {
6260
+ force: true
6261
+ });
6262
+ return this;
6263
+ }
6264
+ async selectFromDropdown(fieldName, element) {
6265
+ await this.page.getByLabel(fieldName).click();
6266
+ await this.page.getByRole("option", {
6267
+ name: element
6268
+ }).click();
6269
+ return this;
6270
+ }
6271
+ async save() {
6272
+ await this.page.getByRole("button", {
6273
+ name: "Save"
6274
+ }).click();
6275
+ await (0, $hOLA6$expect)(this.page.getByLabel("success")).toBeVisible();
6276
+ return this;
6277
+ }
6278
+ async test() {
6279
+ await this.page.getByRole("button", {
6280
+ name: "Test"
6281
+ }).click();
6282
+ return this;
6283
+ }
6284
+ async cancel() {
6285
+ await this.page.getByRole("button", {
6286
+ name: "Cancel"
6287
+ }).click();
6288
+ return this;
6289
+ }
6290
+ async expectResultBanner(message) {
6291
+ await (0, $hOLA6$expect)(this.page.locator(".configuration-result-banner")).toBeVisible();
6292
+ await (0, $hOLA6$expect)(this.page.locator(".configuration-result-banner")).toContainText(message);
6293
+ return this;
6294
+ }
6295
+ async expectDropdownToBe(fieldName, fieldValue) {
6296
+ const value = await this.page.locator(`#${fieldName}`).getAttribute("value");
6297
+ (0, $hOLA6$expect)(value).toBe(fieldValue);
6298
+ return this;
6299
+ }
6300
+ async clearDropdown(fieldName) {
6301
+ await this.page.locator(`input[id=${fieldName}]`).click({
6302
+ force: true
6303
+ });
6304
+ await this.page.getByRole(`button`, {
6305
+ name: "Clear"
6306
+ }).click();
6307
+ return this;
6308
+ }
6309
+ async clickField(fieldName) {
6310
+ await this.page.getByLabel(fieldName).click();
6311
+ return this;
6312
+ }
6313
+ async expectTextFieldToBe(fieldName, fieldValue) {
6314
+ (0, $hOLA6$expect)(await this.page.locator(`input[name=${fieldName}]`).getAttribute("value")).toContain(fieldValue);
6315
+ return this;
6316
+ }
6317
+ async setStringList(value) {
6318
+ await this.page.locator(".input-list input#stringList").click();
6319
+ if (value instanceof Array) for (const val of value){
6320
+ await this.page.locator(".input-list input#stringList").fill(val);
6321
+ await this.page.locator('[data-test-id="stringList"]').getByLabel("add icon button").click();
6322
+ }
6323
+ else await this.page.locator(".input-list input#stringList").fill(value);
6324
+ return this;
6325
+ }
6326
+ async expectStringListCountToBe(count) {
6327
+ (0, $hOLA6$expect)(await this.page.locator(`[data-test-id="stringList"] .list`).count()).toBe(count);
6328
+ return this;
6329
+ }
6330
+ async removeString(value) {
6331
+ await this.page.locator("li").filter({
6332
+ hasText: value
6333
+ }).getByLabel("close icon button").click();
6334
+ return this;
6335
+ }
6336
+ async setStringSet(value) {
6337
+ await this.page.locator(".input-list input#stringSet").click();
6338
+ if (value instanceof Array) for (const val of value){
6339
+ await this.page.locator(".input-list input#stringSet").fill(val);
6340
+ await this.page.locator('[data-test-id="stringSet"]').getByLabel("add icon button").click();
6341
+ }
6342
+ else await this.page.locator(".input-list input#stringSet").fill(value);
6343
+ return this;
6344
+ }
6345
+ async expectStringSetCountToBe(count) {
6346
+ (0, $hOLA6$expect)(await this.page.locator(`[data-test-id="stringSet"] .list`).count()).toBe(count);
6347
+ return this;
6348
+ }
6349
+ async setStringMap(pairs) {
6350
+ await this.page.locator('[data-test-id="stringMap"]').getByTestId("icon-button-tooltip").getByLabel("Add key-value pair").click();
6351
+ await this.page.locator("#new-row-key-input").fill(pairs.key);
6352
+ await this.page.locator("#new-row-value-input").fill(pairs.value);
6353
+ await this.page.getByRole("button", {
6354
+ name: "check-line icon"
6355
+ }).click();
6356
+ }
6357
+ async expectStringMapCountToBe(count) {
6358
+ (0, $hOLA6$expect)(await this.page.locator(`[data-test-id="stringMap"] .map-data-row`).count()).toBe(count);
6359
+ return this;
6360
+ }
6361
+ async expectTestButtonToBeDisabled() {
6362
+ await (0, $hOLA6$expect)(this.page.locator("action-toolbar button").filter({
6363
+ hasText: "Test"
6364
+ })).toBeDisabled();
6365
+ return this;
6366
+ }
6367
+ async togglePasswordFieldVariable(fieldName) {
6368
+ await this.page.locator(`.input-with-variables[data-test-id="${fieldName}"] button`).click({
6369
+ force: true
6370
+ });
6371
+ return this;
6372
+ }
6373
+ async setPasswordFieldVariable(fieldName, fieldValue) {
6374
+ await this.page.locator(`.input-with-variables[data-test-id="${fieldName}"] input`).click({
6375
+ force: true
6376
+ });
6377
+ await this.page.locator(`.input-with-variables[data-test-id="${fieldName}"] li`).filter({
6378
+ hasText: fieldValue
6379
+ }).click();
6380
+ return this;
6381
+ }
6382
+ async expectFieldsToNotBeVisible(fieldNames) {
6383
+ if (typeof fieldNames !== "string") for (const fName of fieldNames)await (0, $hOLA6$expect)(this.page.locator(`#${fName}`)).not.toBeVisible();
6384
+ else await (0, $hOLA6$expect)(this.page.locator(`#${fieldNames}`)).not.toBeVisible();
6385
+ return this;
6386
+ }
6387
+ async expectFieldsToBeVisible(fieldNames) {
6388
+ if (typeof fieldNames !== "string") for (const fName of fieldNames)await (0, $hOLA6$expect)(this.page.locator(`input[name=${fName}]`)).toBeVisible();
6389
+ else await (0, $hOLA6$expect)(this.page.locator(`input[name=${fieldNames}]`)).toBeVisible();
6390
+ return this;
6391
+ }
6392
+ }
6393
+
6394
+
6022
6395
  class $e72552cbf941ecfa$export$b8a61e5c71402559 {
6023
6396
  constructor(page){
6024
6397
  this.page = page;
6398
+ this.connections = new (0, $6c0f5b52769b32c3$export$9823ddf5e80770e7)(page);
6025
6399
  this.dataRandomGenerator = new (0, $b14c3492cf934ea2$export$e40b5d3c74b04c89)();
6026
6400
  this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
6027
6401
  this.folderPage = new (0, $50c91328c9110668$export$b453f08936c58edb)(page);
@@ -6158,6 +6532,7 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
6158
6532
  await this.page.locator("ul.side-nav li").getByLabel("Connections", {
6159
6533
  exact: true
6160
6534
  }).click();
6535
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Connections")).toBeVisible();
6161
6536
  }
6162
6537
  async openReleaseOrTemplate(id, release) {
6163
6538
  const url = release ? "releases" : "templates";
@@ -6176,6 +6551,10 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
6176
6551
  async openRisksProfile() {
6177
6552
  await this.page.goto("./#/risks");
6178
6553
  }
6554
+ async openConnection() {
6555
+ await this.page.goto("./#/configuration");
6556
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Connections")).toBeVisible();
6557
+ }
6179
6558
  }
6180
6559
 
6181
6560
 
@@ -6655,6 +7034,25 @@ class $80c3ae34677b4324$var$Fixtures {
6655
7034
  this.userProfiles.push(profile.canonicalId);
6656
7035
  await this.doPost("fixtures/userProfile", profile);
6657
7036
  }
7037
+ async resetUserProfile(username, fullName) {
7038
+ this.usernames.push(username);
7039
+ return this.updateProfile({
7040
+ username: username,
7041
+ external: false,
7042
+ profileId: username,
7043
+ email: "",
7044
+ fullName: fullName ? fullName : username,
7045
+ loginAllowed: true,
7046
+ // dateFormat: "dd/MM/yy",
7047
+ dateFormat: "M/d/yy",
7048
+ // timeFormat: "HH:mm",
7049
+ timeFormat: "h:mm a",
7050
+ firstDayOfWeek: 0
7051
+ });
7052
+ }
7053
+ async updateProfile(profile) {
7054
+ return this.doPut("profile", profile);
7055
+ }
6658
7056
  async expectJiraTaskStatus(taskId, expectedStatus) {
6659
7057
  const headers = {
6660
7058
  Authorization: `Basic ${btoa("xlr-jira-testuser@xebialabs.com:zgsXK6c3oLVkJxrWVJQy9DB7")}`,