@digital-ai/devops-page-object-release 0.0.35 → 0.0.37
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 +176 -10
- package/dist/main.js.map +1 -1
- package/dist/module.js +176 -10
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +41 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/module.js
CHANGED
|
@@ -878,6 +878,51 @@ class $3fa741329d8067d5$export$d4865631ba74f3e2 extends (0, $9626bc9256ce31f7$ex
|
|
|
878
878
|
async expectPreconditionNotEditable() {
|
|
879
879
|
await this.textEditor.isHidden();
|
|
880
880
|
}
|
|
881
|
+
async enableFailureHandler() {
|
|
882
|
+
await this.page.getByLabel("Enable failure handler").check();
|
|
883
|
+
}
|
|
884
|
+
async expectEnabledFailureHandlerToggle() {
|
|
885
|
+
await (0, $hOLA6$expect)(this.page.getByLabel("Enable failure handler")).toBeEnabled();
|
|
886
|
+
}
|
|
887
|
+
async expectDisabledFailureHandlerToggle() {
|
|
888
|
+
await (0, $hOLA6$expect)(this.page.getByLabel("Enable failure handler")).toBeDisabled();
|
|
889
|
+
}
|
|
890
|
+
async clickFailureHandler() {
|
|
891
|
+
await this.page.getByRole("button", {
|
|
892
|
+
name: "failure"
|
|
893
|
+
}).click();
|
|
894
|
+
return this;
|
|
895
|
+
}
|
|
896
|
+
async clickPrecondition() {
|
|
897
|
+
await this.page.getByRole("button", {
|
|
898
|
+
name: "precondition"
|
|
899
|
+
}).click();
|
|
900
|
+
return this;
|
|
901
|
+
}
|
|
902
|
+
async expectFailureHandlerHasDefaults() {
|
|
903
|
+
await (0, $hOLA6$expect)(this.page.locator(".task-conditions .dot-label-wrapper")).toContainText("If the task fails");
|
|
904
|
+
await (0, $hOLA6$expect)(this.page.locator("#select-action")).toContainText("Skip task");
|
|
905
|
+
return this;
|
|
906
|
+
}
|
|
907
|
+
async selectPostAction(action) {
|
|
908
|
+
await this.page.getByRole("textbox", {
|
|
909
|
+
name: "If the task fails"
|
|
910
|
+
}).getByLabel("If the task fails").selectOption(action);
|
|
911
|
+
return this;
|
|
912
|
+
}
|
|
913
|
+
async enterFailureHandlerScript(script) {
|
|
914
|
+
await this.page.locator(".ace_content").click();
|
|
915
|
+
await this.page.locator("textarea").fill(script);
|
|
916
|
+
await this.saveButton.click();
|
|
917
|
+
return this;
|
|
918
|
+
}
|
|
919
|
+
async expectScriptToContain(script) {
|
|
920
|
+
await (0, $hOLA6$expect)(this.page.locator(".code-editor .ace_content")).toContainText(script);
|
|
921
|
+
}
|
|
922
|
+
async expectFailureHandlerEditable() {
|
|
923
|
+
await (0, $hOLA6$expect)(this.page.locator("#select-action")).toBeVisible();
|
|
924
|
+
return this;
|
|
925
|
+
}
|
|
881
926
|
}
|
|
882
927
|
|
|
883
928
|
|
|
@@ -946,6 +991,7 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
|
|
|
946
991
|
constructor(page){
|
|
947
992
|
super(page);
|
|
948
993
|
this.dependency = new $90bb70a7e909e500$export$fbbf45eff21470e3(page);
|
|
994
|
+
this.modal = new $90bb70a7e909e500$export$bb6ccfada3e7d0f7(page);
|
|
949
995
|
this.railLocator = this.page.locator("task-drawer .dot-drawer .task-drawer-content");
|
|
950
996
|
this.scriptTextArea = this.page.locator(".code-editor textarea.ace_text-input");
|
|
951
997
|
}
|
|
@@ -969,6 +1015,11 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
|
|
|
969
1015
|
hasText: value
|
|
970
1016
|
}).click();
|
|
971
1017
|
}
|
|
1018
|
+
async clickCreateNewCiInVariable(propertyName) {
|
|
1019
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
|
|
1020
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).click();
|
|
1021
|
+
await this.railLocator.getByTestId("dot-action-item-btn").click();
|
|
1022
|
+
}
|
|
972
1023
|
async getValueFromString(propertyName) {
|
|
973
1024
|
await this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`).focus();
|
|
974
1025
|
return this.railLocator.locator(`input[id="${propertyName}"]`).inputValue();
|
|
@@ -1000,6 +1051,12 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
|
|
|
1000
1051
|
name: variable
|
|
1001
1052
|
}).click();
|
|
1002
1053
|
}
|
|
1054
|
+
async setValueForDateVariable(variable, date) {
|
|
1055
|
+
await this.page.getByRole("textbox", {
|
|
1056
|
+
name: variable
|
|
1057
|
+
}).fill(date);
|
|
1058
|
+
return this;
|
|
1059
|
+
}
|
|
1003
1060
|
async createNewVariableForField(objectID, variable) {
|
|
1004
1061
|
await this.page.locator(`div[data-testid="${objectID}"] .icon-variable`).waitFor({
|
|
1005
1062
|
timeout: 10000
|
|
@@ -1142,13 +1199,22 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
|
|
|
1142
1199
|
if (option) await (0, $hOLA6$expect)(depOptionsIcon).toBeVisible();
|
|
1143
1200
|
else await (0, $hOLA6$expect)(depOptionsIcon).not.toBeVisible();
|
|
1144
1201
|
}
|
|
1145
|
-
async
|
|
1202
|
+
async expectDependencyContextualMenuFor(title, option = true) {
|
|
1146
1203
|
const depOptionsIcon = this.page.locator(".dependency").filter({
|
|
1147
1204
|
has: this.page.getByRole("link", {
|
|
1148
1205
|
name: title,
|
|
1149
1206
|
exact: true
|
|
1150
1207
|
})
|
|
1151
1208
|
}).locator(".icon-options");
|
|
1209
|
+
if (option) await (0, $hOLA6$expect)(depOptionsIcon).toBeVisible();
|
|
1210
|
+
else await (0, $hOLA6$expect)(depOptionsIcon).not.toBeVisible();
|
|
1211
|
+
}
|
|
1212
|
+
async removeDependency(title) {
|
|
1213
|
+
const depOptionsIcon = this.page.locator(".dependency").filter({
|
|
1214
|
+
has: this.page.getByLabel(title, {
|
|
1215
|
+
exact: true
|
|
1216
|
+
})
|
|
1217
|
+
}).locator(".icon-options");
|
|
1152
1218
|
await depOptionsIcon.isVisible();
|
|
1153
1219
|
await depOptionsIcon.click();
|
|
1154
1220
|
await this.railLocator.getByRole("menuitem", {
|
|
@@ -1170,9 +1236,11 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
|
|
|
1170
1236
|
await (0, $hOLA6$expect)(this.railLocator.getByTestId("add-condition")).toBeVisible();
|
|
1171
1237
|
await this.railLocator.getByTestId("add-condition").click();
|
|
1172
1238
|
}
|
|
1173
|
-
async expectDependencyText(dependencies) {
|
|
1174
|
-
|
|
1175
|
-
|
|
1239
|
+
async expectDependencyText(dependencies, isVisible = true) {
|
|
1240
|
+
if (isVisible) {
|
|
1241
|
+
await (0, $hOLA6$expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
|
|
1242
|
+
await (0, $hOLA6$expect)(this.page.locator(`.gate-task-dependencies`).getByLabel(dependencies).first()).toBeVisible();
|
|
1243
|
+
} else await (0, $hOLA6$expect)(this.page.locator(`.gate-task-dependencies`).getByLabel(dependencies)).not.toBeVisible();
|
|
1176
1244
|
}
|
|
1177
1245
|
async clickEditDependency(dependencies) {
|
|
1178
1246
|
const depOptionsIcon = this.page.locator(".dependency").filter({
|
|
@@ -1328,10 +1396,31 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
|
|
|
1328
1396
|
name: "Save"
|
|
1329
1397
|
}).click();
|
|
1330
1398
|
}
|
|
1331
|
-
async expectedGateConditionDisplayed(title) {
|
|
1332
|
-
await (0, $hOLA6$expect)(this.page.locator(".gate-task-condition-input").filter({
|
|
1399
|
+
async expectedGateConditionDisplayed(title, isVisible = true) {
|
|
1400
|
+
if (isVisible) await (0, $hOLA6$expect)(this.page.locator(".gate-task-condition-input").filter({
|
|
1333
1401
|
hasText: title
|
|
1334
1402
|
})).toBeVisible();
|
|
1403
|
+
else await (0, $hOLA6$expect)(this.page.locator(".gate-task-condition-input").filter({
|
|
1404
|
+
hasText: title
|
|
1405
|
+
})).not.toBeVisible();
|
|
1406
|
+
}
|
|
1407
|
+
async expectedGateConditionChecked(title, expected = true) {
|
|
1408
|
+
if (expected) await (0, $hOLA6$expect)(this.page.locator(".gate-task-condition").filter({
|
|
1409
|
+
hasText: title
|
|
1410
|
+
}).getByTestId("CheckBoxIcon")).toBeVisible();
|
|
1411
|
+
else await (0, $hOLA6$expect)(this.page.locator(".gate-task-condition").filter({
|
|
1412
|
+
hasText: title
|
|
1413
|
+
}).getByTestId("CheckBoxOutlineBlankIcon")).toBeVisible();
|
|
1414
|
+
}
|
|
1415
|
+
async removeCondition(title) {
|
|
1416
|
+
await this.page.locator(".gate-task-condition").filter({
|
|
1417
|
+
hasText: title
|
|
1418
|
+
}).locator(".icon-delete").click();
|
|
1419
|
+
}
|
|
1420
|
+
async checkGateCondition(title) {
|
|
1421
|
+
await this.page.locator(".gate-task-condition").filter({
|
|
1422
|
+
hasText: title
|
|
1423
|
+
}).getByTestId("CheckBoxOutlineBlankIcon").click();
|
|
1335
1424
|
}
|
|
1336
1425
|
async expectScriptEditable() {
|
|
1337
1426
|
await this.page.locator("div.ace_content").click();
|
|
@@ -1373,6 +1462,61 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
|
|
|
1373
1462
|
await (0, $hOLA6$expect)(this.page.locator(`#${ObjectID}`)).toHaveValue("");
|
|
1374
1463
|
return this;
|
|
1375
1464
|
}
|
|
1465
|
+
async expectEditVariableList(isVisible = true) {
|
|
1466
|
+
if (isVisible) await (0, $hOLA6$expect)(this.page.getByTestId("edit-btn")).toBeVisible();
|
|
1467
|
+
else await (0, $hOLA6$expect)(this.page.getByTestId("edit-btn")).toBeDisabled();
|
|
1468
|
+
return this;
|
|
1469
|
+
}
|
|
1470
|
+
async clickEditVariableList() {
|
|
1471
|
+
await this.page.getByTestId("edit-btn").click();
|
|
1472
|
+
return this;
|
|
1473
|
+
}
|
|
1474
|
+
async removeVariable(variableName) {
|
|
1475
|
+
await this.page.locator(".draggable-list").filter({
|
|
1476
|
+
hasText: variableName
|
|
1477
|
+
}).locator(".icon-close").click();
|
|
1478
|
+
return this;
|
|
1479
|
+
}
|
|
1480
|
+
async saveVariable() {
|
|
1481
|
+
await this.page.getByTestId("save-btn").click();
|
|
1482
|
+
return this;
|
|
1483
|
+
}
|
|
1484
|
+
async selectVariable(variable) {
|
|
1485
|
+
if (variable instanceof Array) for (const value of variable){
|
|
1486
|
+
await this.railLocator.getByRole("combobox", {
|
|
1487
|
+
name: "Variables in this task"
|
|
1488
|
+
}).click();
|
|
1489
|
+
await this.railLocator.getByText(value).click();
|
|
1490
|
+
}
|
|
1491
|
+
else {
|
|
1492
|
+
await this.railLocator.getByRole("combobox", {
|
|
1493
|
+
name: "Variables in this task"
|
|
1494
|
+
}).click();
|
|
1495
|
+
await this.railLocator.getByText(variable).click();
|
|
1496
|
+
}
|
|
1497
|
+
return this;
|
|
1498
|
+
}
|
|
1499
|
+
async setValueForUserInputField(propertyName, value) {
|
|
1500
|
+
await this.page.locator(`.input-scalar-fake-input[id="${propertyName}"]`).focus();
|
|
1501
|
+
await this.page.locator(`input[id="${propertyName}"]`).fill(value);
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
class $90bb70a7e909e500$export$bb6ccfada3e7d0f7 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
1505
|
+
constructor(page){
|
|
1506
|
+
super(page);
|
|
1507
|
+
this.modalLocator = this.page.locator(".dot-dialog-content");
|
|
1508
|
+
this.saveLocator = this.page.getByRole("button", {
|
|
1509
|
+
name: "Save"
|
|
1510
|
+
});
|
|
1511
|
+
}
|
|
1512
|
+
async setInputTextField(propertyName, value) {
|
|
1513
|
+
await this.modalLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`).focus();
|
|
1514
|
+
await this.modalLocator.locator(`input[id="${propertyName}"]`).fill(value);
|
|
1515
|
+
await this.modalLocator.press("Tab");
|
|
1516
|
+
}
|
|
1517
|
+
async save() {
|
|
1518
|
+
await this.saveLocator.click();
|
|
1519
|
+
}
|
|
1376
1520
|
}
|
|
1377
1521
|
class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
1378
1522
|
constructor(page){
|
|
@@ -1426,7 +1570,7 @@ class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$ex
|
|
|
1426
1570
|
}
|
|
1427
1571
|
async setTask(taskTitle) {
|
|
1428
1572
|
await this.task.click();
|
|
1429
|
-
await this.task.fill("");
|
|
1573
|
+
await this.task.fill(" ");
|
|
1430
1574
|
await this.page.getByRole("option", {
|
|
1431
1575
|
name: taskTitle
|
|
1432
1576
|
}).click();
|
|
@@ -1748,6 +1892,17 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
|
|
|
1748
1892
|
async expectCompleteButtonNotEnabled() {
|
|
1749
1893
|
await (0, $hOLA6$expect)(this.completeButton).not.toBeEnabled();
|
|
1750
1894
|
}
|
|
1895
|
+
async expectButtonNotVisible(buttonName) {
|
|
1896
|
+
await (0, $hOLA6$expect)(this.page.getByRole("button", {
|
|
1897
|
+
name: buttonName,
|
|
1898
|
+
exact: true
|
|
1899
|
+
})).not.toBeVisible();
|
|
1900
|
+
return this;
|
|
1901
|
+
}
|
|
1902
|
+
async expectSkipMenuNotEnabled() {
|
|
1903
|
+
await this.openMenu.click();
|
|
1904
|
+
await (0, $hOLA6$expect)(this.skipMenu).not.toBeEnabled();
|
|
1905
|
+
}
|
|
1751
1906
|
async setTitle(title) {
|
|
1752
1907
|
await this.page.getByTestId("task-title-input-view-mode-typography").click();
|
|
1753
1908
|
await this.page.getByTestId("task-title-input-input").clear();
|
|
@@ -1813,6 +1968,9 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
|
|
|
1813
1968
|
await this.page.locator(".user-task-assigned-wrapper .editable").getByText(existingUsername).click();
|
|
1814
1969
|
await this.page.getByTestId(`render-option-${userName}`).click();
|
|
1815
1970
|
}
|
|
1971
|
+
async expectAssigneeToBeEnabled() {
|
|
1972
|
+
await (0, $hOLA6$expect)(this.page.locator(".user-task-assigned-wrapper .clickable-avatar")).toBeVisible();
|
|
1973
|
+
}
|
|
1816
1974
|
async removeAssignToUser(userName) {
|
|
1817
1975
|
await this.page.getByRole("button", {
|
|
1818
1976
|
name: userName
|
|
@@ -2973,13 +3131,13 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
2973
3131
|
hasText: newPhaseName
|
|
2974
3132
|
})).toBeVisible();
|
|
2975
3133
|
}
|
|
2976
|
-
async exportRelease() {
|
|
3134
|
+
async exportRelease(exportAs = "Audit report (Excel)") {
|
|
2977
3135
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2978
3136
|
this.page.on("download", ()=>{});
|
|
2979
3137
|
await this.page.getByTestId("template-export-btn").click();
|
|
2980
3138
|
const downloadPromise = this.page.waitForEvent("download");
|
|
2981
3139
|
await this.page.getByRole("link", {
|
|
2982
|
-
name:
|
|
3140
|
+
name: exportAs
|
|
2983
3141
|
}).click();
|
|
2984
3142
|
await downloadPromise;
|
|
2985
3143
|
}
|
|
@@ -3158,6 +3316,15 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
|
|
|
3158
3316
|
await (0, $hOLA6$expect)(this.page.locator(".task-type-gatetask .marker-check-icon")).toBeVisible();
|
|
3159
3317
|
return this;
|
|
3160
3318
|
}
|
|
3319
|
+
async expectFailureHandlerCheckMar(taskTitle, isVisible = true) {
|
|
3320
|
+
if (isVisible) await (0, $hOLA6$expect)(this.page.locator(".task").filter({
|
|
3321
|
+
hasText: taskTitle
|
|
3322
|
+
}).locator(".failure-handler-icon")).toBeVisible();
|
|
3323
|
+
else await (0, $hOLA6$expect)(this.page.locator(".task").filter({
|
|
3324
|
+
hasText: taskTitle
|
|
3325
|
+
}).locator(".failure-handler-icon")).not.toBeVisible();
|
|
3326
|
+
return this;
|
|
3327
|
+
}
|
|
3161
3328
|
async expectNoOptionInChangeType(taskTitle, taskGroup) {
|
|
3162
3329
|
await this.openContextMenuForTask(taskTitle);
|
|
3163
3330
|
await this.page.locator(".dropdown-menu li").getByText("Change type").click();
|
|
@@ -3300,7 +3467,6 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
|
|
|
3300
3467
|
}).locator(".task").filter({
|
|
3301
3468
|
hasText: taskTitle
|
|
3302
3469
|
});
|
|
3303
|
-
await taskLocator.locator(".task-inner-active > .task-container > .task-box > .task > .context-menu-button").click();
|
|
3304
3470
|
await taskLocator.locator(".task .context-menu-button").click();
|
|
3305
3471
|
}
|
|
3306
3472
|
async duplicateFromContextualMenuInGroup(groupName, taskTitle) {
|