@digital-ai/devops-page-object-release 0.0.21 → 0.0.22
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 +10 -0
- package/dist/main.js +867 -153
- package/dist/main.js.map +1 -1
- package/dist/module.js +867 -153
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +213 -28
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -962,6 +962,7 @@ class $f8721861c660dd88$export$2b65d1d97338f32b {
|
|
|
962
962
|
|
|
963
963
|
|
|
964
964
|
|
|
965
|
+
|
|
965
966
|
class $3d3f3946c54f5897$export$34addcca3f0ae43f extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
966
967
|
constructor(page){
|
|
967
968
|
super(page);
|
|
@@ -992,6 +993,25 @@ class $3d3f3946c54f5897$export$34addcca3f0ae43f extends (0, $f8721861c660dd88$ex
|
|
|
992
993
|
name: "Create"
|
|
993
994
|
}).click();
|
|
994
995
|
}
|
|
996
|
+
async expectVariablesCountToBe(count) {
|
|
997
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".variable-editor .form-group")).toHaveCount(count);
|
|
998
|
+
}
|
|
999
|
+
async expectContainingVariable(variableName, value) {
|
|
1000
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`#form-${variableName} .text span`).textContent()).toBe(value);
|
|
1001
|
+
}
|
|
1002
|
+
async selectTemplate(templateName) {
|
|
1003
|
+
await this.page.getByPlaceholder("No template").click();
|
|
1004
|
+
await this.page.getByPlaceholder("No template").clear();
|
|
1005
|
+
await this.page.getByPlaceholder("No template").fill(templateName);
|
|
1006
|
+
await this.page.getByText(templateName).click();
|
|
1007
|
+
}
|
|
1008
|
+
async removeTemplate() {
|
|
1009
|
+
await this.page.locator(".template-select .close-icon").click();
|
|
1010
|
+
}
|
|
1011
|
+
async setValueForVariables(variableName, value) {
|
|
1012
|
+
await this.page.locator(`#form-${variableName} .display`).click();
|
|
1013
|
+
await this.page.locator(`input[name="${variableName}"]`).fill(value);
|
|
1014
|
+
}
|
|
995
1015
|
}
|
|
996
1016
|
|
|
997
1017
|
|
|
@@ -1090,25 +1110,273 @@ async function $ef0df8ad8a777ce6$export$a0f926f04148e5d2(locators) {
|
|
|
1090
1110
|
}
|
|
1091
1111
|
|
|
1092
1112
|
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
|
|
1116
|
+
class $880df57ffbf6e614$export$9b575f14aa5e09a1 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1117
|
+
constructor(page){
|
|
1118
|
+
super(page);
|
|
1119
|
+
}
|
|
1120
|
+
async openDatePicker(selector) {
|
|
1121
|
+
await this.page.locator(`${selector} .date`).click();
|
|
1122
|
+
}
|
|
1123
|
+
/**
|
|
1124
|
+
* Setting date, month and year from calendar picker
|
|
1125
|
+
*/ async setDate(date, monthYear) {
|
|
1126
|
+
const prev = this.page.locator(".datepicker-days .prev");
|
|
1127
|
+
const next = this.page.locator(".datepicker-days .next");
|
|
1128
|
+
const monYear = this.page.locator(".datepicker-days .datepicker-switch");
|
|
1129
|
+
const currentYear = await monYear.textContent();
|
|
1130
|
+
const thisMonth = (0, ($parcel$interopDefault($kKeXs$moment)))(monthYear, "MMMM YYYY").isBefore(currentYear);
|
|
1131
|
+
while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
|
|
1132
|
+
else await next.click();
|
|
1133
|
+
await this.page.getByRole("cell", {
|
|
1134
|
+
name: "" + date + "",
|
|
1135
|
+
exact: true
|
|
1136
|
+
}).first().click();
|
|
1137
|
+
}
|
|
1138
|
+
async expectDurationToBe(duration) {
|
|
1139
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".duration-editor").textContent()).toBe(duration);
|
|
1140
|
+
}
|
|
1141
|
+
async setDuration(days, hours, mins) {
|
|
1142
|
+
if (typeof days !== "undefined") await this.page.locator(".days").fill(days);
|
|
1143
|
+
if (typeof hours !== "undefined") await this.page.locator(".hours").fill(hours);
|
|
1144
|
+
if (typeof mins !== "undefined") await this.page.locator(".minutes").fill(mins);
|
|
1145
|
+
await this.page.keyboard.press("Enter");
|
|
1146
|
+
}
|
|
1147
|
+
async expectTimeToBe(selector, format, date) {
|
|
1148
|
+
if (typeof date === "string") date = new Date(date);
|
|
1149
|
+
const formattedDate = (0, ($parcel$interopDefault($kKeXs$moment)))(date).format(format);
|
|
1150
|
+
const input = this.page.locator(`${selector}`);
|
|
1151
|
+
await (0, $kKeXs$playwrighttest.expect)(input).toBeVisible();
|
|
1152
|
+
const value = await input.inputValue();
|
|
1153
|
+
(0, $kKeXs$playwrighttest.expect)(value).toBe(formattedDate);
|
|
1154
|
+
}
|
|
1155
|
+
/**
|
|
1156
|
+
*
|
|
1157
|
+
* @returns Getting current month and year in the format "MonthName YYYY"
|
|
1158
|
+
*/ async getCurrentMonthYear() {
|
|
1159
|
+
const monthNames = [
|
|
1160
|
+
"January",
|
|
1161
|
+
"February",
|
|
1162
|
+
"March",
|
|
1163
|
+
"April",
|
|
1164
|
+
"May",
|
|
1165
|
+
"June",
|
|
1166
|
+
"July",
|
|
1167
|
+
"August",
|
|
1168
|
+
"September",
|
|
1169
|
+
"October",
|
|
1170
|
+
"November",
|
|
1171
|
+
"December"
|
|
1172
|
+
];
|
|
1173
|
+
const d = new Date();
|
|
1174
|
+
const month = monthNames[d.getMonth()];
|
|
1175
|
+
const year = d.getFullYear();
|
|
1176
|
+
return `${month} ${year}`;
|
|
1177
|
+
}
|
|
1178
|
+
/**
|
|
1179
|
+
*
|
|
1180
|
+
* @returns Getting current date in the format "dd MonthName YYYY"
|
|
1181
|
+
*/ async getCurrentDate() {
|
|
1182
|
+
const d = new Date();
|
|
1183
|
+
const date = d.getDate();
|
|
1184
|
+
const monthYear = await this.getCurrentMonthYear();
|
|
1185
|
+
return `${date} ${monthYear}`;
|
|
1186
|
+
}
|
|
1187
|
+
/**
|
|
1188
|
+
*
|
|
1189
|
+
* @param days Number of days to add to current date within the current month
|
|
1190
|
+
* @returns
|
|
1191
|
+
*/ async getFutureDate(days) {
|
|
1192
|
+
const d = new Date();
|
|
1193
|
+
d.setDate(d.getDate() + days);
|
|
1194
|
+
const date = d.getDate();
|
|
1195
|
+
const monthYear = await this.getCurrentMonthYear();
|
|
1196
|
+
return `${date} ${monthYear}`;
|
|
1197
|
+
}
|
|
1198
|
+
async removeDate(selector) {
|
|
1199
|
+
return await selector.locator(`.remove`).click();
|
|
1200
|
+
}
|
|
1201
|
+
async expectDateNotDeletable(selector) {
|
|
1202
|
+
await (0, $kKeXs$playwrighttest.expect)(selector.locator(`.remove`)).not.toBeVisible();
|
|
1203
|
+
}
|
|
1204
|
+
async expectDateToBe(selector, date) {
|
|
1205
|
+
return await this.expectInputContainingDate(selector, date);
|
|
1206
|
+
}
|
|
1207
|
+
async expectDateToBeInferred(selector) {
|
|
1208
|
+
await (0, $kKeXs$playwrighttest.expect)(selector.locator(`input.light-text`).first()).toBeVisible();
|
|
1209
|
+
}
|
|
1210
|
+
async expectNoDate(selector) {
|
|
1211
|
+
(0, $kKeXs$playwrighttest.expect)(selector.locator(`.date-placeholder`)).toBeVisible();
|
|
1212
|
+
}
|
|
1213
|
+
async expectInputContainingDate(inputLocator, date) {
|
|
1214
|
+
await (0, $kKeXs$playwrighttest.expect)(inputLocator).toBeVisible();
|
|
1215
|
+
const attribute = await inputLocator.getAttribute("value");
|
|
1216
|
+
(0, $kKeXs$playwrighttest.expect)(attribute).toContain(date);
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
|
|
1093
1221
|
class $fd4eef3ad2b2e612$export$a87f0ae8695e74be extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1222
|
+
constructor(page){
|
|
1223
|
+
super(page);
|
|
1224
|
+
this.addListValue = this.page.locator(".variable-selector .xl-components-input-full input");
|
|
1225
|
+
this.addVariableValue = this.page.locator(".variable-value .xl-components-input-full input");
|
|
1226
|
+
this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
|
|
1227
|
+
this.listAddButton = this.page.getByRole("button", {
|
|
1228
|
+
name: "Add"
|
|
1229
|
+
});
|
|
1230
|
+
}
|
|
1094
1231
|
async openVariable(variableKey) {
|
|
1095
1232
|
await this.page.locator(`.variables-list .variable`).getByText(variableKey).click();
|
|
1096
1233
|
return new $fd4eef3ad2b2e612$var$ReleaseVariableModal(this.page);
|
|
1097
1234
|
}
|
|
1235
|
+
async addNewVariable(variableName, labelname, description) {
|
|
1236
|
+
await this.page.locator("#action-toolbar").getByTestId("dot-button").click();
|
|
1237
|
+
await this.page.fill(`[name="fieldKey"]`, variableName);
|
|
1238
|
+
await this.page.locator(".variable-label input").fill(labelname);
|
|
1239
|
+
if (description) await this.page.locator(".variable-description input").fill(description);
|
|
1240
|
+
}
|
|
1241
|
+
async selectVariableTextType(valuename) {
|
|
1242
|
+
await this.page.getByRole("combobox").selectOption("StringVariable");
|
|
1243
|
+
await this.page.locator(".variable-value").type(valuename);
|
|
1244
|
+
}
|
|
1245
|
+
async selectVariableListboxType(possiblevalue, defaultValue, required) {
|
|
1246
|
+
await this.page.getByRole("combobox").selectOption("DropDownListBox");
|
|
1247
|
+
if (possiblevalue instanceof Array) for (const value of possiblevalue){
|
|
1248
|
+
await this.addListValue.fill(value);
|
|
1249
|
+
await this.listAddButton.click();
|
|
1250
|
+
}
|
|
1251
|
+
else {
|
|
1252
|
+
await this.addListValue.fill(possiblevalue);
|
|
1253
|
+
await this.listAddButton.click();
|
|
1254
|
+
}
|
|
1255
|
+
await this.page.locator(".variable-value select").type(defaultValue);
|
|
1256
|
+
if (required) await this.page.getByRole("checkbox").check();
|
|
1257
|
+
else await this.page.getByRole("checkbox").uncheck();
|
|
1258
|
+
}
|
|
1259
|
+
async selectVariablePasswordType(possiblevalue) {
|
|
1260
|
+
await this.page.getByRole("combobox").selectOption("PasswordStringVariable");
|
|
1261
|
+
await this.page.locator('input[type="password"]').type(possiblevalue);
|
|
1262
|
+
}
|
|
1263
|
+
async selectVariableCheckboxType() {
|
|
1264
|
+
await this.page.getByRole("combobox").selectOption("BooleanVariable");
|
|
1265
|
+
await this.page.getByRole("checkbox").check();
|
|
1266
|
+
}
|
|
1267
|
+
async selectVariableNumberType(possiblevalue) {
|
|
1268
|
+
await this.page.getByRole("combobox").selectOption("IntegerVariable");
|
|
1269
|
+
await this.page.locator('input[ng-model="var.value"]').fill(possiblevalue);
|
|
1270
|
+
}
|
|
1271
|
+
async selectVariableMultiListType(possiblevalue1, possiblevalue2) {
|
|
1272
|
+
await this.page.getByRole("combobox").selectOption("MultiSelectListBox");
|
|
1273
|
+
await this.addListValue.fill(possiblevalue1);
|
|
1274
|
+
await this.listAddButton.click();
|
|
1275
|
+
await this.addListValue.fill(possiblevalue2);
|
|
1276
|
+
await this.listAddButton.click();
|
|
1277
|
+
await this.page.locator(".react-tagsinput").click();
|
|
1278
|
+
await this.page.getByText("Select all", {
|
|
1279
|
+
exact: true
|
|
1280
|
+
}).click();
|
|
1281
|
+
}
|
|
1282
|
+
async addVariableDate() {
|
|
1283
|
+
await this.page.getByRole("combobox").selectOption("DateVariable");
|
|
1284
|
+
await this.page.getByText("Select date").click();
|
|
1285
|
+
}
|
|
1286
|
+
async setDate(date, monthYear) {
|
|
1287
|
+
await this.dateUtil.setDate(date, monthYear);
|
|
1288
|
+
}
|
|
1289
|
+
async addVariableKeyValueMap(keys1, values1) {
|
|
1290
|
+
await this.page.getByRole("combobox").selectOption("MapStringStringVariable");
|
|
1291
|
+
await this.page.getByPlaceholder("key").fill(keys1);
|
|
1292
|
+
await this.page.getByPlaceholder("Value").fill(values1);
|
|
1293
|
+
await this.listAddButton.click();
|
|
1294
|
+
await this.page.locator(".xl-map-string-string-div-buttons .search-icon").click();
|
|
1295
|
+
await this.page.getByRole("row", {
|
|
1296
|
+
name: "Search"
|
|
1297
|
+
}).getByRole("textbox").fill(keys1);
|
|
1298
|
+
const detail = await this.page.locator("table.table-condensed span").allInnerTexts();
|
|
1299
|
+
(0, $kKeXs$playwrighttest.expect)(detail[0]).toEqual(keys1);
|
|
1300
|
+
(0, $kKeXs$playwrighttest.expect)(detail[1]).toEqual(values1);
|
|
1301
|
+
}
|
|
1302
|
+
async addVariableSet(possiblevalue1) {
|
|
1303
|
+
await this.page.getByRole("combobox").selectOption("SetStringVariable");
|
|
1304
|
+
await this.page.locator(".dip-input input").fill(possiblevalue1);
|
|
1305
|
+
await this.listAddButton.click();
|
|
1306
|
+
}
|
|
1307
|
+
async submitTheVariable() {
|
|
1308
|
+
const createButton = this.page.locator(".modal-footer .save");
|
|
1309
|
+
await (0, $kKeXs$playwrighttest.expect)(createButton).toBeEnabled();
|
|
1310
|
+
await createButton.scrollIntoViewIfNeeded();
|
|
1311
|
+
await createButton.click();
|
|
1312
|
+
// Expect is needed here to avoid flackiness on clicking create button
|
|
1313
|
+
await (0, $kKeXs$playwrighttest.expect)(createButton).not.toBeVisible();
|
|
1314
|
+
}
|
|
1315
|
+
async expectVariableWithNameValueAndType(name, value, type) {
|
|
1316
|
+
const rowLocator = await this.page.locator(".variable .data-row").allTextContents();
|
|
1317
|
+
(0, $kKeXs$playwrighttest.expect)(rowLocator.toString()).toContain(name);
|
|
1318
|
+
(0, $kKeXs$playwrighttest.expect)(rowLocator.toString()).toContain(value);
|
|
1319
|
+
(0, $kKeXs$playwrighttest.expect)(rowLocator.toString()).toContain(type);
|
|
1320
|
+
}
|
|
1321
|
+
async clickEditVariable(variableName) {
|
|
1322
|
+
await this.page.locator("[id='variables-filter']").fill(variableName);
|
|
1323
|
+
await this.page.getByText("Edit").first().click();
|
|
1324
|
+
return new $fd4eef3ad2b2e612$var$ReleaseVariableModal(this.page);
|
|
1325
|
+
}
|
|
1326
|
+
async clickDeleteVariable(variableName) {
|
|
1327
|
+
await this.page.locator("[id='variables-filter']").fill(variableName);
|
|
1328
|
+
await this.page.locator(".action .delete-icon").first().click();
|
|
1329
|
+
return new $fd4eef3ad2b2e612$var$DeleteVariableModel(this.page);
|
|
1330
|
+
}
|
|
1331
|
+
async expectVariablesCountToBe(count) {
|
|
1332
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".variable .data-row")).toHaveCount(count);
|
|
1333
|
+
}
|
|
1334
|
+
async expectVariableNotPresent(variableName) {
|
|
1335
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".variable").filter({
|
|
1336
|
+
hasText: variableName
|
|
1337
|
+
})).not.toBeVisible();
|
|
1338
|
+
}
|
|
1339
|
+
async clearSearch() {
|
|
1340
|
+
await this.page.locator("[id='variables-filter']").clear();
|
|
1341
|
+
}
|
|
1342
|
+
async switchPossibleValuesToVariable(variableName) {
|
|
1343
|
+
await this.page.locator(".variable-toggle button").click();
|
|
1344
|
+
await this.page.locator(".ui-autocomplete-input").fill(variableName);
|
|
1345
|
+
await this.page.locator(".ui-menu-item-wrapper").filter({
|
|
1346
|
+
hasText: `${variableName}`
|
|
1347
|
+
}).click();
|
|
1348
|
+
}
|
|
1349
|
+
async selectVariableListboxTypeWithVariable(variableName, defaultValue, required) {
|
|
1350
|
+
await this.page.getByRole("combobox").selectOption("DropDownListBox");
|
|
1351
|
+
await this.page.locator(".variable-toggle button").click();
|
|
1352
|
+
await this.page.locator(".ui-autocomplete-input").fill(variableName);
|
|
1353
|
+
await this.page.locator(".ui-menu-item-wrapper").filter({
|
|
1354
|
+
hasText: `${variableName}`
|
|
1355
|
+
}).click();
|
|
1356
|
+
await this.page.locator(".variable-value select").type(defaultValue);
|
|
1357
|
+
if (required) await this.page.getByRole("checkbox").check();
|
|
1358
|
+
else await this.page.getByRole("checkbox").uncheck();
|
|
1359
|
+
}
|
|
1098
1360
|
}
|
|
1099
1361
|
class $fd4eef3ad2b2e612$var$ReleaseVariableModal extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1362
|
+
constructor(page){
|
|
1363
|
+
super(page);
|
|
1364
|
+
this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
|
|
1365
|
+
}
|
|
1100
1366
|
async expectValue(locators, expectFn) {
|
|
1101
1367
|
const [index, locator] = await (0, $ef0df8ad8a777ce6$export$a0f926f04148e5d2)(locators);
|
|
1102
|
-
|
|
1368
|
+
expectFn[index](locator);
|
|
1103
1369
|
}
|
|
1104
1370
|
async expectValueToBe(value) {
|
|
1105
1371
|
await this.expectValue([
|
|
1106
1372
|
this.page.locator("#modal .variable-value input"),
|
|
1107
1373
|
this.page.locator("#modal .variable-value .field-readonly"),
|
|
1108
|
-
this.page.locator("#modal .variable-value .xl-map-string-string")
|
|
1374
|
+
this.page.locator("#modal .variable-value .xl-map-string-string"),
|
|
1375
|
+
this.page.locator("#modal .variable-value .xl-list-display-mode .text-container")
|
|
1109
1376
|
], [
|
|
1110
1377
|
(l)=>(0, $kKeXs$playwrighttest.expect)(l).toHaveValue(value),
|
|
1111
1378
|
(l)=>(0, $kKeXs$playwrighttest.expect)(l).toHaveText(value),
|
|
1379
|
+
(l)=>(0, $kKeXs$playwrighttest.expect)(l).toHaveText(value),
|
|
1112
1380
|
(l)=>(0, $kKeXs$playwrighttest.expect)(l).toHaveText(value)
|
|
1113
1381
|
]);
|
|
1114
1382
|
}
|
|
@@ -1116,16 +1384,155 @@ class $fd4eef3ad2b2e612$var$ReleaseVariableModal extends (0, $f8721861c660dd88$e
|
|
|
1116
1384
|
await this.expectValue([
|
|
1117
1385
|
this.page.locator("#modal .variable-value input"),
|
|
1118
1386
|
this.page.locator("#modal .variable-value .field-readonly"),
|
|
1119
|
-
this.page.locator("#modal .variable-value .xl-map-string-string")
|
|
1387
|
+
this.page.locator("#modal .variable-value .xl-map-string-string"),
|
|
1388
|
+
this.page.locator("#modal .variable-value .xl-list-display-mode")
|
|
1120
1389
|
], [
|
|
1121
1390
|
(l)=>(0, $kKeXs$playwrighttest.expect)(l.inputValue()).toContain(value),
|
|
1122
1391
|
(l)=>(0, $kKeXs$playwrighttest.expect)(l).toContainText(value),
|
|
1392
|
+
(l)=>(0, $kKeXs$playwrighttest.expect)(l).toContainText(value),
|
|
1123
1393
|
(l)=>(0, $kKeXs$playwrighttest.expect)(l).toContainText(value)
|
|
1124
1394
|
]);
|
|
1125
1395
|
}
|
|
1126
1396
|
async close() {
|
|
1127
1397
|
await this.page.locator("#modal .modal-header button.close").click();
|
|
1128
1398
|
}
|
|
1399
|
+
async expectPossibleValues(possiblevalue) {
|
|
1400
|
+
const listLocator = await this.page.locator(".editor .xl-list-row").allInnerTexts();
|
|
1401
|
+
if (possiblevalue instanceof Array) for (const value of possiblevalue)(0, $kKeXs$playwrighttest.expect)(listLocator).toContain(value);
|
|
1402
|
+
else (0, $kKeXs$playwrighttest.expect)(listLocator).toContain(possiblevalue);
|
|
1403
|
+
}
|
|
1404
|
+
async expectPossibleVariableValues(possiblevariablevalue) {
|
|
1405
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".variable-dropdown input")).toHaveValue(possiblevariablevalue);
|
|
1406
|
+
}
|
|
1407
|
+
async addPossibleValue(value) {
|
|
1408
|
+
if (value instanceof Array) for (const li of value){
|
|
1409
|
+
await this.page.locator(".xl-components-input-full input").fill(li);
|
|
1410
|
+
await this.page.getByRole("button", {
|
|
1411
|
+
name: "Add"
|
|
1412
|
+
}).click();
|
|
1413
|
+
}
|
|
1414
|
+
else {
|
|
1415
|
+
await this.page.locator(".xl-components-input-full input").fill(value);
|
|
1416
|
+
await this.page.getByRole("button", {
|
|
1417
|
+
name: "Add"
|
|
1418
|
+
}).click();
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
async selectVariableValue(defaultValue) {
|
|
1422
|
+
await this.page.locator(".variable-value select").selectOption(defaultValue);
|
|
1423
|
+
}
|
|
1424
|
+
async save() {
|
|
1425
|
+
const saveButton = this.page.locator("#modal .modal-footer .save");
|
|
1426
|
+
await saveButton.scrollIntoViewIfNeeded();
|
|
1427
|
+
await saveButton.click({
|
|
1428
|
+
delay: 2000
|
|
1429
|
+
});
|
|
1430
|
+
// Expect is needed here to avoid flackiness on clicking save button on modal window
|
|
1431
|
+
await (0, $kKeXs$playwrighttest.expect)(saveButton).not.toBeVisible();
|
|
1432
|
+
}
|
|
1433
|
+
async createPossibleValuesVariable(variableName) {
|
|
1434
|
+
await this.page.locator(".variable-toggle button").click();
|
|
1435
|
+
await this.page.locator(".ui-autocomplete-input").fill(variableName);
|
|
1436
|
+
await this.page.locator(".ui-menu-item-wrapper").filter({
|
|
1437
|
+
hasText: `${variableName}`
|
|
1438
|
+
}).click();
|
|
1439
|
+
}
|
|
1440
|
+
async expectVariableValueToBe(value) {
|
|
1441
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator('.variable-value select option[selected="selected"]').textContent()).toBe(value);
|
|
1442
|
+
}
|
|
1443
|
+
async expectNoVariablesInList() {
|
|
1444
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText("No variables defined.")).toBeVisible();
|
|
1445
|
+
}
|
|
1446
|
+
async expectNameInput(value) {
|
|
1447
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`#modal .variable-name input`)).toHaveValue(value);
|
|
1448
|
+
}
|
|
1449
|
+
async expectLabel(value) {
|
|
1450
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#modal .variable-label input")).toHaveValue(value);
|
|
1451
|
+
}
|
|
1452
|
+
async expectRequired(value) {
|
|
1453
|
+
if (value == true) await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.form-group input[ng-model="var.requiresValue"]')).toBeChecked();
|
|
1454
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.page.locator('.form-group input[ng-model="var.requiresValue"]')).not.toBeChecked();
|
|
1455
|
+
}
|
|
1456
|
+
async setDescription(description) {
|
|
1457
|
+
await this.page.locator(".variable-description input").click();
|
|
1458
|
+
await this.page.locator(".variable-description input").clear();
|
|
1459
|
+
await this.page.locator(".variable-description input").fill(description);
|
|
1460
|
+
}
|
|
1461
|
+
async setLabel(labelValue) {
|
|
1462
|
+
await this.page.locator(".variable-label input").fill(labelValue);
|
|
1463
|
+
}
|
|
1464
|
+
async setDate(date, monthYear) {
|
|
1465
|
+
await this.page.locator("#modal .date").click();
|
|
1466
|
+
await this.dateUtil.setDate(date, monthYear);
|
|
1467
|
+
}
|
|
1468
|
+
async setValue(value) {
|
|
1469
|
+
await this.page.locator(".variable-value input").fill(value);
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
class $fd4eef3ad2b2e612$var$DeleteVariableModel extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1473
|
+
constructor(page){
|
|
1474
|
+
super(page);
|
|
1475
|
+
this.model = new $fd4eef3ad2b2e612$var$ReleaseVariableModal(page);
|
|
1476
|
+
this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
|
|
1477
|
+
}
|
|
1478
|
+
async deleteVariable() {
|
|
1479
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
|
|
1480
|
+
name: "Replace and delete"
|
|
1481
|
+
})).toBeVisible();
|
|
1482
|
+
await this.page.getByRole("button", {
|
|
1483
|
+
name: "Delete"
|
|
1484
|
+
}).click();
|
|
1485
|
+
}
|
|
1486
|
+
async replaceItWithVariable(variable) {
|
|
1487
|
+
await this.model.createPossibleValuesVariable(variable);
|
|
1488
|
+
}
|
|
1489
|
+
async replaceItwithValue(value) {
|
|
1490
|
+
await this.page.locator(".display").click();
|
|
1491
|
+
await this.page.getByLabel("*").fill(value);
|
|
1492
|
+
}
|
|
1493
|
+
async clickReplaceAndDelete() {
|
|
1494
|
+
await this.page.getByRole("button", {
|
|
1495
|
+
name: "Replace and delete"
|
|
1496
|
+
}).click();
|
|
1497
|
+
}
|
|
1498
|
+
async addValue(value) {
|
|
1499
|
+
await this.page.locator(".xl-components-input-full input").fill(value);
|
|
1500
|
+
await this.page.getByRole("button", {
|
|
1501
|
+
name: "Add"
|
|
1502
|
+
}).click();
|
|
1503
|
+
}
|
|
1504
|
+
async remove(value) {
|
|
1505
|
+
await this.page.locator("li").filter({
|
|
1506
|
+
hasText: value
|
|
1507
|
+
}).locator("i.close-icon").click();
|
|
1508
|
+
}
|
|
1509
|
+
async expectReplacementPromptDisplayed() {
|
|
1510
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
|
|
1511
|
+
name: "Replace and delete"
|
|
1512
|
+
})).toBeVisible();
|
|
1513
|
+
}
|
|
1514
|
+
async close() {
|
|
1515
|
+
await this.page.locator("#modal .modal-header button.close").click();
|
|
1516
|
+
}
|
|
1517
|
+
async removeItemOnSet(value) {
|
|
1518
|
+
await this.page.locator("tr").filter({
|
|
1519
|
+
hasText: value
|
|
1520
|
+
}).locator("i.close-icon").click();
|
|
1521
|
+
}
|
|
1522
|
+
async addValueForSet(key, value) {
|
|
1523
|
+
await this.page.locator(".input-key").fill(key);
|
|
1524
|
+
await this.page.locator(".input-value").fill(value);
|
|
1525
|
+
}
|
|
1526
|
+
async replaceWithIntegerValue(value) {
|
|
1527
|
+
await this.page.locator(".editable").fill(value);
|
|
1528
|
+
}
|
|
1529
|
+
async replaceForBooleanValue() {
|
|
1530
|
+
await this.page.locator(".editor input").click();
|
|
1531
|
+
}
|
|
1532
|
+
async deleteBySettingDate(date, monthYear) {
|
|
1533
|
+
await this.page.locator("#modal .date").click();
|
|
1534
|
+
await this.dateUtil.setDate(date, monthYear);
|
|
1535
|
+
}
|
|
1129
1536
|
}
|
|
1130
1537
|
|
|
1131
1538
|
|
|
@@ -1361,6 +1768,22 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
1361
1768
|
}).click();
|
|
1362
1769
|
}
|
|
1363
1770
|
}
|
|
1771
|
+
async validateAutoCompleteOptions(descriptionName, expectedDescription, variableSelection) {
|
|
1772
|
+
await this.page.getByLabel("Double-click to edit").waitFor({
|
|
1773
|
+
timeout: 10000
|
|
1774
|
+
});
|
|
1775
|
+
await this.page.getByLabel("Double-click to edit").hover();
|
|
1776
|
+
await this.page.locator(".markdown-viewer-actions").getByTestId("edit-button").click();
|
|
1777
|
+
await this.page.locator("#task-description-input").fill(descriptionName);
|
|
1778
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-popper-content-wrapper .option-name")).toHaveCount(6);
|
|
1779
|
+
await this.page.locator(".dot-popper-content-wrapper .option-name").filter({
|
|
1780
|
+
hasText: variableSelection
|
|
1781
|
+
}).click();
|
|
1782
|
+
await this.page.getByRole("button", {
|
|
1783
|
+
name: "Save"
|
|
1784
|
+
}).click();
|
|
1785
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".phase-link-container").locator(".variable").first()).toHaveText(expectedDescription);
|
|
1786
|
+
}
|
|
1364
1787
|
}
|
|
1365
1788
|
class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1366
1789
|
constructor(page){
|
|
@@ -1462,6 +1885,9 @@ class $6c924a95a765a086$export$15d3f9b095bb5188 extends (0, $f8721861c660dd88$ex
|
|
|
1462
1885
|
async expectCommentToContain(text) {
|
|
1463
1886
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-comment .markdown-wrapper p")).toContainText(text);
|
|
1464
1887
|
}
|
|
1888
|
+
async expectTaskIsCommentable(isCommentable) {
|
|
1889
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator("#task-comment").count()).toBe(isCommentable ? 1 : 0);
|
|
1890
|
+
}
|
|
1465
1891
|
}
|
|
1466
1892
|
|
|
1467
1893
|
|
|
@@ -1525,7 +1951,7 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
1525
1951
|
});
|
|
1526
1952
|
this.cancelButton = this.page.getByTestId("task-action-cancel");
|
|
1527
1953
|
this.commentBox = this.page.getByTestId("task-action-comment");
|
|
1528
|
-
this.confirm = this.page.getByTestId("dot-button");
|
|
1954
|
+
this.confirm = this.page.locator(".popper-action-buttons").getByTestId("dot-button");
|
|
1529
1955
|
this.activity = new (0, $6c924a95a765a086$export$15d3f9b095bb5188)(page);
|
|
1530
1956
|
this.attachment = new (0, $f9016705c1a1eb20$export$aa59788fdecae2f2)(page);
|
|
1531
1957
|
this.config = new (0, $8be2ce0eccbe6d27$export$64c93bc7fb9ca44e)(page);
|
|
@@ -1643,52 +2069,153 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
1643
2069
|
async expectWaitForScheduledDateToBeUnchecked() {
|
|
1644
2070
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".wait-for-start input")).not.toBeChecked();
|
|
1645
2071
|
}
|
|
1646
|
-
// Other locators are flaky and it can be replaced if we get locator change in the frontend
|
|
1647
|
-
async clickOnStartDate() {
|
|
1648
|
-
await this.page.getByTestId("month-and-year").first().click();
|
|
2072
|
+
// Other locators are flaky and it can be replaced if we get locator change in the frontend
|
|
2073
|
+
async clickOnStartDate() {
|
|
2074
|
+
await this.page.getByTestId("month-and-year").first().click();
|
|
2075
|
+
}
|
|
2076
|
+
async removeStartDate() {
|
|
2077
|
+
await this.page.getByRole("button", {
|
|
2078
|
+
name: "Set by user"
|
|
2079
|
+
}).locator(".MuiChip-deleteIcon").click();
|
|
2080
|
+
}
|
|
2081
|
+
async setStartDate(date) {
|
|
2082
|
+
await this.clickOnStartDate();
|
|
2083
|
+
await this.page.locator(".MuiPickersDay-root", {
|
|
2084
|
+
hasText: date
|
|
2085
|
+
}).click();
|
|
2086
|
+
}
|
|
2087
|
+
async assignToMe(userName, existingUsername) {
|
|
2088
|
+
await this.page.getByRole("button", {
|
|
2089
|
+
name: existingUsername
|
|
2090
|
+
}).click();
|
|
2091
|
+
await this.page.getByTestId(`render-option-${userName}`).click();
|
|
2092
|
+
}
|
|
2093
|
+
async setFlag(flagName, flagComment) {
|
|
2094
|
+
await this.page.getByTestId("flag-btn").click();
|
|
2095
|
+
await this.page.getByLabel(flagName).click();
|
|
2096
|
+
await this.page.getByPlaceholder("Set message").click();
|
|
2097
|
+
await this.page.getByPlaceholder("Set message").fill(flagComment);
|
|
2098
|
+
await this.page.getByPlaceholder("Set message").press("Enter");
|
|
2099
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("button", {
|
|
2100
|
+
name: `flag icon ${flagComment}`
|
|
2101
|
+
})).toBeVisible();
|
|
2102
|
+
}
|
|
2103
|
+
async expectFlaggedWith(flagName, flagComment) {
|
|
2104
|
+
await this.page.getByRole("button", {
|
|
2105
|
+
name: "flag icon"
|
|
2106
|
+
}).click();
|
|
2107
|
+
const regexPattern = new RegExp(`${flagComment}.*${flagName}`, "i");
|
|
2108
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(regexPattern)).toBeVisible();
|
|
2109
|
+
}
|
|
2110
|
+
async expectStartDateToBeDisplayed() {
|
|
2111
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("start-date-title")).toHaveCount(1);
|
|
2112
|
+
}
|
|
2113
|
+
async expectEndDateToBeDisplayed() {
|
|
2114
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("end-date-title")).toHaveCount(1);
|
|
2115
|
+
}
|
|
2116
|
+
async expectStartDateAndEndDateToBeDisplayed() {
|
|
2117
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("month-and-year")).toHaveCount(2);
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
|
|
2122
|
+
|
|
2123
|
+
|
|
2124
|
+
|
|
2125
|
+
|
|
2126
|
+
class $e8395395d01b66bb$export$5a82be0a2a261cc6 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2127
|
+
constructor(page){
|
|
2128
|
+
super(page);
|
|
2129
|
+
this.releaseHeader = this.page.locator(".release-header");
|
|
2130
|
+
}
|
|
2131
|
+
async enableShowDates() {
|
|
2132
|
+
await this.page.locator("#toggleIsDatesColumnsShown").check();
|
|
2133
|
+
}
|
|
2134
|
+
async disableShowDates() {
|
|
2135
|
+
await this.page.locator("#toggleIsDatesColumnsShown").uncheck();
|
|
2136
|
+
}
|
|
2137
|
+
async expectPlanningDataColumnsHidden() {
|
|
2138
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`#gantt .gantt_grid_data .gantt_row`).first().locator(`.gantt_cell`).count()).toEqual(1);
|
|
2139
|
+
}
|
|
2140
|
+
async expectPlanningDateColumnsShown() {
|
|
2141
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`#gantt .gantt_grid_data .gantt_row`).first().locator(`.gantt_cell`).count()).toEqual(4);
|
|
2142
|
+
}
|
|
2143
|
+
getRow(phaseName) {
|
|
2144
|
+
return new $e8395395d01b66bb$var$GanttRow(this.page, phaseName);
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2147
|
+
class $e8395395d01b66bb$var$GanttRow extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2148
|
+
constructor(page, phaseName){
|
|
2149
|
+
super(page);
|
|
2150
|
+
this.phaseName = page.locator(".gantt_row").filter({
|
|
2151
|
+
hasText: phaseName
|
|
2152
|
+
});
|
|
2153
|
+
this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
|
|
2154
|
+
}
|
|
2155
|
+
async getFirstDate() {
|
|
2156
|
+
return this.phaseName.locator(".date-editor .date input").first();
|
|
2157
|
+
}
|
|
2158
|
+
async getLastDate() {
|
|
2159
|
+
return this.phaseName.locator(".date-editor .date input").last();
|
|
2160
|
+
}
|
|
2161
|
+
async getFirstDateEditor() {
|
|
2162
|
+
return this.phaseName.locator(".date-editor").first();
|
|
2163
|
+
}
|
|
2164
|
+
async getLastDateEditor() {
|
|
2165
|
+
return this.phaseName.locator(".date-editor").last();
|
|
2166
|
+
}
|
|
2167
|
+
async setStartDate(date, monthYear) {
|
|
2168
|
+
await (await this.getFirstDate()).click();
|
|
2169
|
+
await this.dateUtil.setDate(date, monthYear);
|
|
2170
|
+
}
|
|
2171
|
+
async setEndDate(date, monthYear) {
|
|
2172
|
+
await (await this.getLastDate()).click();
|
|
2173
|
+
await this.dateUtil.setDate(date, monthYear);
|
|
2174
|
+
}
|
|
2175
|
+
async expectStartDateToBe(date) {
|
|
2176
|
+
const dateTimePicker = await this.getFirstDate();
|
|
2177
|
+
this.dateUtil.expectDateToBe(dateTimePicker, date);
|
|
2178
|
+
}
|
|
2179
|
+
async expectEndDateToBe(date) {
|
|
2180
|
+
const dateTimePicker = await this.getLastDate();
|
|
2181
|
+
this.dateUtil.expectDateToBe(dateTimePicker, date);
|
|
1649
2182
|
}
|
|
1650
2183
|
async removeStartDate() {
|
|
1651
|
-
await this.
|
|
1652
|
-
|
|
1653
|
-
}).locator(".MuiChip-deleteIcon").click();
|
|
2184
|
+
const dateTimePicker = await this.getFirstDateEditor();
|
|
2185
|
+
await this.dateUtil.removeDate(dateTimePicker);
|
|
1654
2186
|
}
|
|
1655
|
-
async
|
|
1656
|
-
await this.
|
|
1657
|
-
await this.
|
|
1658
|
-
hasText: date
|
|
1659
|
-
}).click();
|
|
2187
|
+
async removeEndDate() {
|
|
2188
|
+
const dateTimePicker = await this.getLastDateEditor();
|
|
2189
|
+
await this.dateUtil.removeDate(dateTimePicker);
|
|
1660
2190
|
}
|
|
1661
|
-
async
|
|
1662
|
-
await this.
|
|
1663
|
-
|
|
1664
|
-
}).click();
|
|
1665
|
-
await this.page.getByTestId(`render-option-${userName}`).click();
|
|
2191
|
+
async expectStartDateToBeInferred() {
|
|
2192
|
+
const dateTimePicker = await this.getFirstDateEditor();
|
|
2193
|
+
await this.dateUtil.expectDateToBeInferred(dateTimePicker);
|
|
1666
2194
|
}
|
|
1667
|
-
async
|
|
1668
|
-
await this.
|
|
1669
|
-
await this.
|
|
1670
|
-
await this.page.getByPlaceholder("Set message").click();
|
|
1671
|
-
await this.page.getByPlaceholder("Set message").fill(flagComment);
|
|
1672
|
-
await this.page.getByPlaceholder("Set message").press("Enter");
|
|
1673
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("button", {
|
|
1674
|
-
name: `flag icon ${flagComment}`
|
|
1675
|
-
})).toBeVisible();
|
|
2195
|
+
async expectEndDateToBeInferred() {
|
|
2196
|
+
const dateTimePicker = await this.getLastDateEditor();
|
|
2197
|
+
await this.dateUtil.expectDateToBeInferred(dateTimePicker);
|
|
1676
2198
|
}
|
|
1677
|
-
async
|
|
1678
|
-
await this.
|
|
1679
|
-
|
|
1680
|
-
}).click();
|
|
1681
|
-
const regexPattern = new RegExp(`${flagComment}.*${flagName}`, "i");
|
|
1682
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(regexPattern)).toBeVisible();
|
|
2199
|
+
async expectStartDateNotDeletable() {
|
|
2200
|
+
const dateTimePicker = await this.getFirstDate();
|
|
2201
|
+
await this.dateUtil.expectDateNotDeletable(dateTimePicker);
|
|
1683
2202
|
}
|
|
1684
|
-
async
|
|
1685
|
-
await
|
|
2203
|
+
async expectEndDateNotDeletable() {
|
|
2204
|
+
const dateTimePicker = await this.getLastDate();
|
|
2205
|
+
await this.dateUtil.expectDateNotDeletable(dateTimePicker);
|
|
1686
2206
|
}
|
|
1687
|
-
async
|
|
1688
|
-
|
|
2207
|
+
async expectDurationToBe(duration) {
|
|
2208
|
+
(0, $kKeXs$playwrighttest.expect)(await this.phaseName.locator(".duration-editor").textContent()).toBe(duration);
|
|
1689
2209
|
}
|
|
1690
|
-
async
|
|
1691
|
-
await
|
|
2210
|
+
async clickDuration() {
|
|
2211
|
+
await this.phaseName.locator(".duration-editor").first().click();
|
|
2212
|
+
}
|
|
2213
|
+
async removeDuration() {
|
|
2214
|
+
await this.phaseName.click();
|
|
2215
|
+
return await this.phaseName.locator(`.remove-duration`).click();
|
|
2216
|
+
}
|
|
2217
|
+
async expectNoDuration() {
|
|
2218
|
+
(0, $kKeXs$playwrighttest.expect)(await this.phaseName.locator(".duration-editor").textContent()).toContain("");
|
|
1692
2219
|
}
|
|
1693
2220
|
}
|
|
1694
2221
|
|
|
@@ -1794,7 +2321,8 @@ class $8681d8a3f46f87b7$export$d1077068a9cc9f17 extends (0, $f8721861c660dd88$ex
|
|
|
1794
2321
|
while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
|
|
1795
2322
|
else await next.click();
|
|
1796
2323
|
await this.page.getByRole("cell", {
|
|
1797
|
-
name: "" + date + ""
|
|
2324
|
+
name: "" + date + "",
|
|
2325
|
+
exact: true
|
|
1798
2326
|
}).first().click();
|
|
1799
2327
|
}
|
|
1800
2328
|
async setScheduledStartTime(hrs, mins, meridian) {
|
|
@@ -1873,92 +2401,26 @@ class $8681d8a3f46f87b7$export$d1077068a9cc9f17 extends (0, $f8721861c660dd88$ex
|
|
|
1873
2401
|
await this.page.locator("#release-form-abort-on-failure").check();
|
|
1874
2402
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#release-form-abort-on-failure")).toBeChecked();
|
|
1875
2403
|
}
|
|
2404
|
+
async expectDescriptionToBe(description) {
|
|
2405
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".release-description p").textContent()).toContain(description);
|
|
2406
|
+
}
|
|
1876
2407
|
}
|
|
1877
2408
|
|
|
1878
2409
|
|
|
1879
2410
|
|
|
1880
2411
|
|
|
1881
|
-
|
|
1882
|
-
class $880df57ffbf6e614$export$9b575f14aa5e09a1 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2412
|
+
class $d330a7d6f7926d53$export$3bc3e140e0dcb075 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1883
2413
|
constructor(page){
|
|
1884
2414
|
super(page);
|
|
2415
|
+
this.resetButton = this.page.getByRole("button", {
|
|
2416
|
+
name: "Reset"
|
|
2417
|
+
});
|
|
2418
|
+
this.saveButton = this.page.getByRole("button", {
|
|
2419
|
+
name: "Save"
|
|
2420
|
+
});
|
|
1885
2421
|
}
|
|
1886
|
-
async
|
|
1887
|
-
|
|
1888
|
-
}
|
|
1889
|
-
/**
|
|
1890
|
-
* Setting date, month and year from calendar picker
|
|
1891
|
-
*/ async setDate(date, monthYear) {
|
|
1892
|
-
const prev = this.page.locator(".datepicker-days .prev");
|
|
1893
|
-
const next = this.page.locator(".datepicker-days .next");
|
|
1894
|
-
const monYear = this.page.locator(".datepicker-days .datepicker-switch");
|
|
1895
|
-
const thisMonth = (0, ($parcel$interopDefault($kKeXs$moment)))(monthYear, "MMMM YYYY").isBefore();
|
|
1896
|
-
while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
|
|
1897
|
-
else await next.click();
|
|
1898
|
-
await this.page.getByRole("cell", {
|
|
1899
|
-
name: "" + date + ""
|
|
1900
|
-
}).first().click();
|
|
1901
|
-
}
|
|
1902
|
-
async expectDurationToBe(duration) {
|
|
1903
|
-
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".duration-editor").textContent()).toBe(duration);
|
|
1904
|
-
}
|
|
1905
|
-
async setDuration(days, hours, mins) {
|
|
1906
|
-
await this.page.locator(".duration-editor").click();
|
|
1907
|
-
if (typeof days !== "undefined") await this.page.locator(".days").fill(days);
|
|
1908
|
-
if (typeof hours !== "undefined") await this.page.locator(".hours").fill(hours);
|
|
1909
|
-
if (typeof mins !== "undefined") await this.page.locator(".minutes").fill(mins);
|
|
1910
|
-
await this.page.keyboard.press("Enter");
|
|
1911
|
-
}
|
|
1912
|
-
async expectTimeToBe(selector, format, date) {
|
|
1913
|
-
if (typeof date === "string") date = new Date(date);
|
|
1914
|
-
const formattedDate = (0, ($parcel$interopDefault($kKeXs$moment)))(date).format(format);
|
|
1915
|
-
const input = this.page.locator(`${selector}`);
|
|
1916
|
-
await (0, $kKeXs$playwrighttest.expect)(input).toBeVisible();
|
|
1917
|
-
const value = await input.inputValue();
|
|
1918
|
-
(0, $kKeXs$playwrighttest.expect)(value).toBe(formattedDate);
|
|
1919
|
-
}
|
|
1920
|
-
/**
|
|
1921
|
-
*
|
|
1922
|
-
* @returns Getting current month and year in the format "MonthName YYYY"
|
|
1923
|
-
*/ async getCurrentMonthYear() {
|
|
1924
|
-
const monthNames = [
|
|
1925
|
-
"January",
|
|
1926
|
-
"February",
|
|
1927
|
-
"March",
|
|
1928
|
-
"April",
|
|
1929
|
-
"May",
|
|
1930
|
-
"June",
|
|
1931
|
-
"July",
|
|
1932
|
-
"August",
|
|
1933
|
-
"September",
|
|
1934
|
-
"October",
|
|
1935
|
-
"November",
|
|
1936
|
-
"December"
|
|
1937
|
-
];
|
|
1938
|
-
const d = new Date();
|
|
1939
|
-
const month = monthNames[d.getMonth()];
|
|
1940
|
-
const year = d.getFullYear();
|
|
1941
|
-
return `${month} ${year}`;
|
|
1942
|
-
}
|
|
1943
|
-
/**
|
|
1944
|
-
*
|
|
1945
|
-
* @returns Getting current date in the format "dd MonthName YYYY"
|
|
1946
|
-
*/ async getCurrentDate() {
|
|
1947
|
-
const d = new Date();
|
|
1948
|
-
const date = d.getDate();
|
|
1949
|
-
const monthYear = await this.getCurrentMonthYear();
|
|
1950
|
-
return `${date} ${monthYear}`;
|
|
1951
|
-
}
|
|
1952
|
-
/**
|
|
1953
|
-
*
|
|
1954
|
-
* @param days Number of days to add to current date within the current month
|
|
1955
|
-
* @returns
|
|
1956
|
-
*/ async getFutureDate(days) {
|
|
1957
|
-
const d = new Date();
|
|
1958
|
-
d.setDate(d.getDate() + days);
|
|
1959
|
-
const date = d.getDate();
|
|
1960
|
-
const monthYear = await this.getCurrentMonthYear();
|
|
1961
|
-
return `${date} ${monthYear}`;
|
|
2422
|
+
async expectSaveButtonDisabled() {
|
|
2423
|
+
(0, $kKeXs$playwrighttest.expect)(this.saveButton).toBeDisabled();
|
|
1962
2424
|
}
|
|
1963
2425
|
}
|
|
1964
2426
|
|
|
@@ -1966,6 +2428,7 @@ class $880df57ffbf6e614$export$9b575f14aa5e09a1 extends (0, $f8721861c660dd88$ex
|
|
|
1966
2428
|
|
|
1967
2429
|
|
|
1968
2430
|
|
|
2431
|
+
|
|
1969
2432
|
class $2c89ba54932fbba8$export$f8f26dd395d7e1bd extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1970
2433
|
constructor(page){
|
|
1971
2434
|
super(page);
|
|
@@ -2048,7 +2511,10 @@ class $2c89ba54932fbba8$export$f8f26dd395d7e1bd extends (0, $f8721861c660dd88$ex
|
|
|
2048
2511
|
class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2049
2512
|
constructor(page){
|
|
2050
2513
|
super(page);
|
|
2514
|
+
this.createPage = new (0, $3d3f3946c54f5897$export$34addcca3f0ae43f)(page);
|
|
2515
|
+
this.ganttPage = new (0, $e8395395d01b66bb$export$5a82be0a2a261cc6)(page);
|
|
2051
2516
|
this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
|
|
2517
|
+
this.teamsPermissions = new (0, $d330a7d6f7926d53$export$3bc3e140e0dcb075)(page);
|
|
2052
2518
|
this.phaseTitle = this.page.locator(".phase .phase-title");
|
|
2053
2519
|
this.properties = new (0, $8681d8a3f46f87b7$export$d1077068a9cc9f17)(page);
|
|
2054
2520
|
this.variables = new (0, $fd4eef3ad2b2e612$export$a87f0ae8695e74be)(page);
|
|
@@ -2059,11 +2525,14 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
2059
2525
|
return new (0, $133601cfe0486710$export$fb932093f944abe4)(this.page);
|
|
2060
2526
|
}
|
|
2061
2527
|
async abort(comment = "Abort for testing") {
|
|
2062
|
-
await this.page.
|
|
2063
|
-
|
|
2528
|
+
await this.page.getByTestId("abort-btn").waitFor();
|
|
2529
|
+
await this.page.getByTestId("abort-btn").click();
|
|
2530
|
+
await this.page.getByPlaceholder("Give feedback or place a").click();
|
|
2531
|
+
await this.page.getByPlaceholder("Give feedback or place a").fill(comment);
|
|
2532
|
+
await this.page.getByRole("button", {
|
|
2533
|
+
name: "Abort"
|
|
2064
2534
|
}).click();
|
|
2065
|
-
await this.page.locator(".
|
|
2066
|
-
await this.page.locator(".modal .continue").click();
|
|
2535
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".progress-status-and-percentage")).toContainText("Aborted");
|
|
2067
2536
|
}
|
|
2068
2537
|
getPhase(phaseName) {
|
|
2069
2538
|
return new $9b9a8c3da392d020$var$Phase(this.page, phaseName);
|
|
@@ -2273,6 +2742,12 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
2273
2742
|
hasText: "TEMPLATE"
|
|
2274
2743
|
})).not.toBeVisible();
|
|
2275
2744
|
}
|
|
2745
|
+
async expectAbortedStatusToBePresent() {
|
|
2746
|
+
await this.page.locator(".progress-status-and-percentage").waitFor({
|
|
2747
|
+
timeout: 10000
|
|
2748
|
+
});
|
|
2749
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".progress-status-and-percentage").textContent()).toContain("Aborted");
|
|
2750
|
+
}
|
|
2276
2751
|
async openTableView() {
|
|
2277
2752
|
await this.util.openSideNavMenu("Table");
|
|
2278
2753
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-grid-container")).toBeVisible();
|
|
@@ -2371,6 +2846,9 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
2371
2846
|
hasText: title
|
|
2372
2847
|
}).locator(`.task-infos .delay-count`)).toBeVisible();
|
|
2373
2848
|
}
|
|
2849
|
+
async expectOnePhaseDisplayed() {
|
|
2850
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".phase-content").count()).toBe(1);
|
|
2851
|
+
}
|
|
2374
2852
|
}
|
|
2375
2853
|
class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
2376
2854
|
constructor(page, phaseName){
|
|
@@ -2501,10 +2979,12 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
2501
2979
|
await this.dateUtil.expectDurationToBe(duration);
|
|
2502
2980
|
}
|
|
2503
2981
|
async setDurationFromPhaseDetails(days, hours, mins) {
|
|
2982
|
+
await this.page.locator(".duration-editor").click();
|
|
2504
2983
|
await this.dateUtil.setDuration(days, hours, mins);
|
|
2505
2984
|
}
|
|
2506
2985
|
async expectDueTimeToBe(format, date) {
|
|
2507
|
-
|
|
2986
|
+
const selector = this.page.locator(".modal .due-date .time-picker-holder input");
|
|
2987
|
+
await this.dateUtil.expectTimeToBe(selector, format, date);
|
|
2508
2988
|
}
|
|
2509
2989
|
async deleteTaskInPhase(taskName) {
|
|
2510
2990
|
await this.page.locator(".task").filter({
|
|
@@ -3163,6 +3643,10 @@ class $9058d40a81bdb1f5$export$b453f08936c58edb extends (0, $f8721861c660dd88$ex
|
|
|
3163
3643
|
await this.util.openSideNavMenu("Notifications");
|
|
3164
3644
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Notifications")).toBeVisible();
|
|
3165
3645
|
}
|
|
3646
|
+
async openTemplates() {
|
|
3647
|
+
await this.util.openSideNavMenu("Templates");
|
|
3648
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Templates")).toBeVisible();
|
|
3649
|
+
}
|
|
3166
3650
|
}
|
|
3167
3651
|
|
|
3168
3652
|
|
|
@@ -3648,7 +4132,7 @@ class $010122e1d9b28b80$export$3cf9c90f870f31bd extends (0, $f8721861c660dd88$ex
|
|
|
3648
4132
|
})).toBeVisible();
|
|
3649
4133
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("Delete token")).toContainText("Delete token");
|
|
3650
4134
|
await this.page.getByRole("button", {
|
|
3651
|
-
name: "delete icon Delete
|
|
4135
|
+
name: "delete icon Delete"
|
|
3652
4136
|
}).click();
|
|
3653
4137
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByText(tokenName)).not.toBeVisible();
|
|
3654
4138
|
}
|
|
@@ -4124,7 +4608,7 @@ class $a8855257f8bb2b12$export$43682cddead1dd78 extends (0, $f8721861c660dd88$ex
|
|
|
4124
4608
|
await this.page.getByRole("button", {
|
|
4125
4609
|
name: "Today"
|
|
4126
4610
|
}).click();
|
|
4127
|
-
await this.page.getByText(release_title).click();
|
|
4611
|
+
await this.page.locator(".tl-event-title").getByText(release_title).click();
|
|
4128
4612
|
await this.page.locator(".release-modal-container").locator(".xl-icon.release-icon").click();
|
|
4129
4613
|
const releaseurl = `/#/releases/${release_id}`;
|
|
4130
4614
|
const currentURL = await this.page.url();
|
|
@@ -4306,6 +4790,7 @@ class $3fad6a9449b6416f$export$1a0994e9c202d529 extends (0, $f8721861c660dd88$ex
|
|
|
4306
4790
|
|
|
4307
4791
|
|
|
4308
4792
|
|
|
4793
|
+
|
|
4309
4794
|
class $ed2d4739e27d43c1$export$60c3bfa6385e2a10 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
4310
4795
|
constructor(page){
|
|
4311
4796
|
super(page);
|
|
@@ -4524,6 +5009,8 @@ class $ed2d4739e27d43c1$export$60c3bfa6385e2a10 extends (0, $f8721861c660dd88$ex
|
|
|
4524
5009
|
class $f4ca0e32f2cf5291$export$ccf2756779bad715 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
4525
5010
|
constructor(page){
|
|
4526
5011
|
super(page);
|
|
5012
|
+
this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
|
|
5013
|
+
this.scheduledStartDate = this.page.locator(`.scheduled-start-date .date`);
|
|
4527
5014
|
}
|
|
4528
5015
|
async getAttachmentsListCount() {
|
|
4529
5016
|
return await this.page.locator(".attachments tr").count();
|
|
@@ -4580,16 +5067,8 @@ class $f4ca0e32f2cf5291$export$ccf2756779bad715 extends (0, $f8721861c660dd88$ex
|
|
|
4580
5067
|
await this.page.locator(".due-date .close-icon").click();
|
|
4581
5068
|
}
|
|
4582
5069
|
async setScheduledStartDate(date, monthYear) {
|
|
4583
|
-
await this.
|
|
4584
|
-
|
|
4585
|
-
const next = this.page.locator(".datepicker-days .next");
|
|
4586
|
-
const monYear = this.page.locator(".datepicker-days .datepicker-switch");
|
|
4587
|
-
const thisMonth = (0, ($parcel$interopDefault($kKeXs$moment)))(monthYear, "MMMM YYYY").isBefore();
|
|
4588
|
-
while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
|
|
4589
|
-
else await next.click();
|
|
4590
|
-
await this.page.getByRole("cell", {
|
|
4591
|
-
name: "" + date + ""
|
|
4592
|
-
}).first().click();
|
|
5070
|
+
await this.scheduledStartDate.click();
|
|
5071
|
+
await this.dateUtil.setDate(date, monthYear);
|
|
4593
5072
|
}
|
|
4594
5073
|
async setDuration(days, hours, mins) {
|
|
4595
5074
|
await this.page.locator(".duration-editor").click();
|
|
@@ -4691,6 +5170,30 @@ class $b12db2561a3bf785$export$899a7095bab1879d extends (0, $f8721861c660dd88$ex
|
|
|
4691
5170
|
|
|
4692
5171
|
|
|
4693
5172
|
|
|
5173
|
+
class $170d32617f3aa58e$export$e0f84914460c3382 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
5174
|
+
constructor(page){
|
|
5175
|
+
super(page);
|
|
5176
|
+
}
|
|
5177
|
+
async clickEditVariable(variableName) {
|
|
5178
|
+
await this.page.locator("[id='variables-filter']").fill(variableName);
|
|
5179
|
+
await this.page.getByText("Edit").click();
|
|
5180
|
+
return new $170d32617f3aa58e$var$TemplateVariableModal(this.page);
|
|
5181
|
+
}
|
|
5182
|
+
}
|
|
5183
|
+
class $170d32617f3aa58e$var$TemplateVariableModal extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
5184
|
+
async setLabel(label) {
|
|
5185
|
+
await this.page.locator(".variable-label input").fill(label);
|
|
5186
|
+
}
|
|
5187
|
+
async setDefalutValue(value) {
|
|
5188
|
+
await this.page.locator(".variable-value input").fill(value);
|
|
5189
|
+
}
|
|
5190
|
+
async save() {
|
|
5191
|
+
await this.page.locator("#modal .button.save").click();
|
|
5192
|
+
}
|
|
5193
|
+
}
|
|
5194
|
+
|
|
5195
|
+
|
|
5196
|
+
|
|
4694
5197
|
class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
4695
5198
|
constructor(page){
|
|
4696
5199
|
super(page);
|
|
@@ -4700,6 +5203,7 @@ class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$ex
|
|
|
4700
5203
|
this.createTemplatePage = new (0, $3048f12d9d777352$export$98de9bca7d44fc1a)(page);
|
|
4701
5204
|
this.triggers = new (0, $b12db2561a3bf785$export$899a7095bab1879d)(page);
|
|
4702
5205
|
this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
|
|
5206
|
+
this.variables = new (0, $170d32617f3aa58e$export$e0f84914460c3382)(page);
|
|
4703
5207
|
}
|
|
4704
5208
|
async openTemplateMenu(menuItem) {
|
|
4705
5209
|
await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
|
|
@@ -4818,6 +5322,10 @@ class $959d38250779aa22$export$8c8e7207254accc2 extends (0, $f8721861c660dd88$ex
|
|
|
4818
5322
|
hasText: newPhaseName
|
|
4819
5323
|
})).toBeVisible();
|
|
4820
5324
|
}
|
|
5325
|
+
async clickNewRelease() {
|
|
5326
|
+
await this.page.getByTestId("new-release-btn").click();
|
|
5327
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release-properties-form")).toBeVisible();
|
|
5328
|
+
}
|
|
4821
5329
|
getPhase(phaseName) {
|
|
4822
5330
|
return new $959d38250779aa22$var$Phase(this.page, phaseName);
|
|
4823
5331
|
}
|
|
@@ -5164,9 +5672,184 @@ class $84dbf24c796d0540$export$7a5b979a220f477c extends (0, $f8721861c660dd88$ex
|
|
|
5164
5672
|
|
|
5165
5673
|
|
|
5166
5674
|
|
|
5675
|
+
class $ea5452748687c9a2$export$539d82a5d70c4909 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
5676
|
+
constructor(page){
|
|
5677
|
+
super(page);
|
|
5678
|
+
}
|
|
5679
|
+
async getValue(classIdentifier) {
|
|
5680
|
+
return await this.page.locator(`.rz-bubble.${classIdentifier}-label`).innerText();
|
|
5681
|
+
}
|
|
5682
|
+
async setPointerValue(elem, value, isIncrease) {
|
|
5683
|
+
await elem.waitFor({
|
|
5684
|
+
state: "visible"
|
|
5685
|
+
});
|
|
5686
|
+
await elem.click();
|
|
5687
|
+
for(let i = 0; i < value; i++){
|
|
5688
|
+
if (isIncrease) await this.page.keyboard.press("ArrowRight");
|
|
5689
|
+
else await this.page.keyboard.press("ArrowLeft");
|
|
5690
|
+
await elem.click();
|
|
5691
|
+
}
|
|
5692
|
+
}
|
|
5693
|
+
async setValue(identifier, newValue) {
|
|
5694
|
+
const value = await this.getValue(identifier);
|
|
5695
|
+
const initialDiff = newValue - parseInt(value);
|
|
5696
|
+
const elem = this.page.locator(`.rz-pointer-${identifier}`);
|
|
5697
|
+
const diffValue = Math.abs(initialDiff);
|
|
5698
|
+
await this.setPointerValue(elem, diffValue, initialDiff > 0);
|
|
5699
|
+
await this.checkValue(identifier, newValue);
|
|
5700
|
+
}
|
|
5701
|
+
async checkValue(identifier, value) {
|
|
5702
|
+
(0, $kKeXs$playwrighttest.expect)(await this.getValue(identifier)).toEqual(value.toString());
|
|
5703
|
+
}
|
|
5704
|
+
async shouldHaveEditButton(present = true) {
|
|
5705
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator("#editRisk").isVisible()).toBe(present);
|
|
5706
|
+
}
|
|
5707
|
+
async shouldHaveSaveButton(present = true) {
|
|
5708
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.getByTestId("save-btn").isVisible()).toBe(present);
|
|
5709
|
+
}
|
|
5710
|
+
async startEditGlobalRiskThreshold() {
|
|
5711
|
+
await this.page.locator("#editRisk").click();
|
|
5712
|
+
}
|
|
5713
|
+
async setInitialValues() {
|
|
5714
|
+
await this.setValue("min", 10);
|
|
5715
|
+
await this.setValue("max", 50);
|
|
5716
|
+
}
|
|
5717
|
+
async changeValuesAndSave(minValue, maxValue) {
|
|
5718
|
+
await this.setValue("min", minValue);
|
|
5719
|
+
await this.setValue("max", maxValue);
|
|
5720
|
+
await this.page.locator("#submit").click();
|
|
5721
|
+
}
|
|
5722
|
+
async checkValuesChanged(minValue, maxValue) {
|
|
5723
|
+
await this.checkValue("min", minValue);
|
|
5724
|
+
await this.checkValue("max", maxValue);
|
|
5725
|
+
}
|
|
5726
|
+
async expectRiskProfileToBePresent(title, present = true) {
|
|
5727
|
+
await this.page.locator("#risk-profile-table").waitFor({
|
|
5728
|
+
state: "visible"
|
|
5729
|
+
});
|
|
5730
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".risk-profile .data-row").filter({
|
|
5731
|
+
hasText: title
|
|
5732
|
+
}).isVisible()).toBe(present);
|
|
5733
|
+
}
|
|
5734
|
+
async expectDefaultRiskProfileToBeFirst() {
|
|
5735
|
+
await this.page.locator("#risk-profile-table").waitFor({
|
|
5736
|
+
state: "visible"
|
|
5737
|
+
});
|
|
5738
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".risk-profile .data-row .ng-binding").first()).toHaveText("Default risk profile");
|
|
5739
|
+
}
|
|
5740
|
+
async openRiskProfile(title) {
|
|
5741
|
+
await this.page.locator("#risk-profile-table").waitFor({
|
|
5742
|
+
state: "visible"
|
|
5743
|
+
});
|
|
5744
|
+
await this.page.locator(".risk-profile .data-row").filter({
|
|
5745
|
+
hasText: title
|
|
5746
|
+
}).click();
|
|
5747
|
+
return new $ea5452748687c9a2$var$RisksProfilePage(this.page);
|
|
5748
|
+
}
|
|
5749
|
+
async shouldHaveCopyButtonEnabledForRiskProfile(title, enabled = true) {
|
|
5750
|
+
await this.page.locator(".risk-profile .data-row").filter({
|
|
5751
|
+
hasText: title
|
|
5752
|
+
}).waitFor({
|
|
5753
|
+
state: "visible"
|
|
5754
|
+
});
|
|
5755
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".risk-profile .data-row").filter({
|
|
5756
|
+
hasText: title
|
|
5757
|
+
}).locator(".copy-action").isVisible()).toBe(enabled);
|
|
5758
|
+
}
|
|
5759
|
+
async shouldHaveDeleteButtonEnabledForRiskProfile(title, enabled = true) {
|
|
5760
|
+
await this.page.locator(".risk-profile .data-row").filter({
|
|
5761
|
+
hasText: title
|
|
5762
|
+
}).waitFor({
|
|
5763
|
+
state: "visible"
|
|
5764
|
+
});
|
|
5765
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(`.risk-profile .data-row`).filter({
|
|
5766
|
+
hasText: title
|
|
5767
|
+
}).locator(`.remove-action`).isVisible()).toBe(enabled);
|
|
5768
|
+
}
|
|
5769
|
+
async clickNewRiskProfile() {
|
|
5770
|
+
await this.page.getByTestId("new-risk-btn").waitFor({
|
|
5771
|
+
state: "visible"
|
|
5772
|
+
});
|
|
5773
|
+
await this.page.getByTestId("new-risk-btn").click();
|
|
5774
|
+
return new $ea5452748687c9a2$var$RisksProfilePage(this.page);
|
|
5775
|
+
}
|
|
5776
|
+
async deleteRiskProfile(title) {
|
|
5777
|
+
await this.page.locator(".risk-profile .data-row").filter({
|
|
5778
|
+
hasText: title
|
|
5779
|
+
}).locator(".remove-action").waitFor({
|
|
5780
|
+
state: "visible"
|
|
5781
|
+
});
|
|
5782
|
+
await this.page.locator(".risk-profile .data-row").filter({
|
|
5783
|
+
hasText: title
|
|
5784
|
+
}).locator(".remove-action").click();
|
|
5785
|
+
await this.page.locator(".modal-footer .button.save").click();
|
|
5786
|
+
}
|
|
5787
|
+
async expectSuccessMessageOnRisksPage() {
|
|
5788
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("success")).toBeVisible();
|
|
5789
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".success").filter({
|
|
5790
|
+
hasText: "Risk Profile Created Successfully"
|
|
5791
|
+
})).toBeVisible();
|
|
5792
|
+
}
|
|
5793
|
+
async copyRiskProfile(title) {
|
|
5794
|
+
await this.page.locator(".risk-profile .data-row").filter({
|
|
5795
|
+
hasText: title
|
|
5796
|
+
}).waitFor({
|
|
5797
|
+
state: "visible"
|
|
5798
|
+
});
|
|
5799
|
+
await this.page.locator(".risk-profile .data-row").filter({
|
|
5800
|
+
hasText: title
|
|
5801
|
+
}).locator(".copy-action").click();
|
|
5802
|
+
}
|
|
5803
|
+
async expectSuccessMessageOnUpdateRiskProfile() {
|
|
5804
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("success")).toBeVisible();
|
|
5805
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".success").filter({
|
|
5806
|
+
hasText: "Risk Profile Updated Successfully"
|
|
5807
|
+
})).toBeVisible();
|
|
5808
|
+
}
|
|
5809
|
+
async filter(filterText) {
|
|
5810
|
+
await this.page.locator("#risk-profile-filter").waitFor({
|
|
5811
|
+
state: "visible"
|
|
5812
|
+
});
|
|
5813
|
+
await this.page.locator("#risk-profile-filter").clear();
|
|
5814
|
+
await this.page.locator("#risk-profile-filter").fill(filterText);
|
|
5815
|
+
}
|
|
5816
|
+
async shouldHaveNVisibleRiskProfiles(numberOfVisibleRiskProfiles) {
|
|
5817
|
+
await this.page.locator("#risk-profile-table").waitFor({
|
|
5818
|
+
state: "visible"
|
|
5819
|
+
});
|
|
5820
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator("#risk-profile-table .data-row").count()).toEqual(numberOfVisibleRiskProfiles);
|
|
5821
|
+
}
|
|
5822
|
+
async shouldHaveNewRiskProfileButton(present = true) {
|
|
5823
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.getByTestId("new-risk-btn").isVisible()).toBe(present);
|
|
5824
|
+
}
|
|
5825
|
+
}
|
|
5826
|
+
class $ea5452748687c9a2$var$RisksProfilePage extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
5827
|
+
async shouldBeEditable(editable) {
|
|
5828
|
+
const elem = this.page.locator("#riskProfileTitle");
|
|
5829
|
+
if (editable) await (0, $kKeXs$playwrighttest.expect)(elem).toBeEnabled();
|
|
5830
|
+
else await (0, $kKeXs$playwrighttest.expect)(elem).toBeDisabled();
|
|
5831
|
+
}
|
|
5832
|
+
async setName(name) {
|
|
5833
|
+
await this.page.locator("#riskProfileTitle").waitFor({
|
|
5834
|
+
state: "visible"
|
|
5835
|
+
});
|
|
5836
|
+
await this.page.locator("#riskProfileTitle").click();
|
|
5837
|
+
await this.page.locator("#riskProfileTitle").clear();
|
|
5838
|
+
await this.page.locator("#riskProfileTitle").fill(name);
|
|
5839
|
+
}
|
|
5840
|
+
async save() {
|
|
5841
|
+
await this.page.getByTestId("save-btn").click();
|
|
5842
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#risk-profile-table")).toBeVisible();
|
|
5843
|
+
}
|
|
5844
|
+
}
|
|
5845
|
+
|
|
5846
|
+
|
|
5847
|
+
|
|
5848
|
+
|
|
5167
5849
|
class $dbc8f157e7b24b12$export$2edf430132ca35d0 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
5168
5850
|
constructor(page){
|
|
5169
5851
|
super(page);
|
|
5852
|
+
this.risksPage = new (0, $ea5452748687c9a2$export$539d82a5d70c4909)(page);
|
|
5170
5853
|
this.util = new (0, $2c89ba54932fbba8$export$f8f26dd395d7e1bd)(page);
|
|
5171
5854
|
}
|
|
5172
5855
|
async openGeneralSettings() {
|
|
@@ -5200,6 +5883,7 @@ class $dbc8f157e7b24b12$export$2edf430132ca35d0 extends (0, $f8721861c660dd88$ex
|
|
|
5200
5883
|
async openRiskProfiles() {
|
|
5201
5884
|
await this.util.openSideNavMenu("Risk profiles");
|
|
5202
5885
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Risk profiles")).toBeVisible();
|
|
5886
|
+
return new (0, $ea5452748687c9a2$export$539d82a5d70c4909)(this.page);
|
|
5203
5887
|
}
|
|
5204
5888
|
async openWorkflowCategories() {
|
|
5205
5889
|
await this.util.openSideNavMenu("Workflow categories");
|
|
@@ -5243,6 +5927,16 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
|
5243
5927
|
async openTemplate(id) {
|
|
5244
5928
|
return this.openReleaseOrTemplate(id, false);
|
|
5245
5929
|
}
|
|
5930
|
+
async openFolder(id) {
|
|
5931
|
+
await this.page.goto(`./#/folders/${id}/releases`);
|
|
5932
|
+
await this.page.waitForSelector("#releases-content");
|
|
5933
|
+
return new (0, $9058d40a81bdb1f5$export$b453f08936c58edb)(this.page);
|
|
5934
|
+
}
|
|
5935
|
+
async openVariablesOnReleasePage(releaseId) {
|
|
5936
|
+
await this.page.goto(`./#/releases/${releaseId}/variables`);
|
|
5937
|
+
await this.page.waitForSelector("#release-variables");
|
|
5938
|
+
return new (0, $fd4eef3ad2b2e612$export$a87f0ae8695e74be)(this.page);
|
|
5939
|
+
}
|
|
5246
5940
|
async openRelease(id) {
|
|
5247
5941
|
return this.openReleaseOrTemplate(id, true);
|
|
5248
5942
|
}
|
|
@@ -5252,83 +5946,88 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
|
5252
5946
|
async openPersonalAccessTokenPage() {
|
|
5253
5947
|
return new (0, $be4dd73206d8e76b$export$3cac5fd37ae64b91)(this.page).openPersonalAccessTokenPage();
|
|
5254
5948
|
}
|
|
5949
|
+
async gotoHomePage() {
|
|
5950
|
+
await this.page.locator("ul.side-nav li").getByLabel("Home", {
|
|
5951
|
+
exact: true
|
|
5952
|
+
}).click();
|
|
5953
|
+
}
|
|
5255
5954
|
async gotoFolderPage() {
|
|
5256
|
-
await this.page.locator("ul.side-nav li").
|
|
5955
|
+
await this.page.locator("ul.side-nav li").getByLabel("Folders", {
|
|
5257
5956
|
exact: true
|
|
5258
5957
|
}).click();
|
|
5259
5958
|
}
|
|
5260
5959
|
async gotoTaskPage() {
|
|
5261
|
-
await this.page.locator("ul.side-nav li").
|
|
5960
|
+
await this.page.locator("ul.side-nav li").getByLabel("Tasks", {
|
|
5262
5961
|
exact: true
|
|
5263
5962
|
}).click();
|
|
5264
5963
|
}
|
|
5265
5964
|
async gotoReleasePage() {
|
|
5266
|
-
await this.page.locator("ul.side-nav li").
|
|
5965
|
+
await this.page.locator("ul.side-nav li").getByLabel("Releases", {
|
|
5267
5966
|
exact: true
|
|
5268
5967
|
}).click();
|
|
5269
5968
|
}
|
|
5270
5969
|
async gotoWorkflowCatalogPage() {
|
|
5271
|
-
await this.page.locator("ul.side-nav li").
|
|
5970
|
+
await this.page.locator("ul.side-nav li").getByLabel("Workflow catalog", {
|
|
5272
5971
|
exact: true
|
|
5273
5972
|
}).click();
|
|
5274
5973
|
}
|
|
5275
5974
|
async gotoWorkflowsPage() {
|
|
5276
|
-
await this.page.locator("ul.side-nav li").
|
|
5975
|
+
await this.page.locator("ul.side-nav li").getByLabel("Workflows", {
|
|
5277
5976
|
exact: true
|
|
5278
5977
|
}).click();
|
|
5279
5978
|
}
|
|
5280
5979
|
async gotoGroupsPage() {
|
|
5281
|
-
await this.page.locator("ul.side-nav li").
|
|
5980
|
+
await this.page.locator("ul.side-nav li").getByLabel("Groups", {
|
|
5282
5981
|
exact: true
|
|
5283
5982
|
}).click();
|
|
5284
5983
|
}
|
|
5285
5984
|
async gotoReleaseCalenderPage() {
|
|
5286
|
-
await this.page.locator("ul.side-nav li").
|
|
5985
|
+
await this.page.locator("ul.side-nav li").getByLabel("Release calendar", {
|
|
5287
5986
|
exact: true
|
|
5288
5987
|
}).click();
|
|
5289
5988
|
}
|
|
5290
5989
|
async gotoDeliveriesPage() {
|
|
5291
|
-
await this.page.locator("ul.side-nav li").
|
|
5990
|
+
await this.page.locator("ul.side-nav li").getByLabel("Deliveries", {
|
|
5292
5991
|
exact: true
|
|
5293
5992
|
}).click();
|
|
5294
5993
|
}
|
|
5295
5994
|
async gotoTriggersPage() {
|
|
5296
|
-
await this.page.locator("ul.side-nav li").
|
|
5995
|
+
await this.page.locator("ul.side-nav li").getByLabel("Triggers", {
|
|
5297
5996
|
exact: true
|
|
5298
5997
|
}).click();
|
|
5299
5998
|
}
|
|
5300
5999
|
async gotoDigitalAnalyticsPage() {
|
|
5301
|
-
await this.page.locator("ul.side-nav li").
|
|
6000
|
+
await this.page.locator("ul.side-nav li").getByLabel("Digital.ai Analytics", {
|
|
5302
6001
|
exact: true
|
|
5303
6002
|
}).click();
|
|
5304
6003
|
}
|
|
5305
6004
|
async gotoReportsPage() {
|
|
5306
|
-
await this.page.locator("ul.side-nav li").
|
|
6005
|
+
await this.page.locator("ul.side-nav li").getByLabel("Reports", {
|
|
5307
6006
|
exact: true
|
|
5308
6007
|
}).click();
|
|
5309
6008
|
}
|
|
5310
6009
|
async gotoTemplatesPage() {
|
|
5311
|
-
await this.page.locator("ul.side-nav li").
|
|
6010
|
+
await this.page.locator("ul.side-nav li").getByLabel("Templates", {
|
|
5312
6011
|
exact: true
|
|
5313
6012
|
}).click();
|
|
5314
6013
|
}
|
|
5315
6014
|
async gotoEnvironmentsPage() {
|
|
5316
|
-
await this.page.locator("ul.side-nav li").
|
|
6015
|
+
await this.page.locator("ul.side-nav li").getByLabel("Environments", {
|
|
5317
6016
|
exact: true
|
|
5318
6017
|
}).click();
|
|
5319
6018
|
}
|
|
5320
6019
|
async gotoEnvironmentsCalenderPage() {
|
|
5321
|
-
await this.page.locator("ul.side-nav li").
|
|
6020
|
+
await this.page.locator("ul.side-nav li").getByLabel("Environments calendar", {
|
|
5322
6021
|
exact: true
|
|
5323
6022
|
}).click();
|
|
5324
6023
|
}
|
|
5325
6024
|
async gotoGobalVariablesPage() {
|
|
5326
|
-
await this.page.locator("ul.side-nav li").
|
|
6025
|
+
await this.page.locator("ul.side-nav li").getByLabel("Global variables", {
|
|
5327
6026
|
exact: true
|
|
5328
6027
|
}).click();
|
|
5329
6028
|
}
|
|
5330
6029
|
async gotoConnectionsPage() {
|
|
5331
|
-
await this.page.locator("ul.side-nav li").
|
|
6030
|
+
await this.page.locator("ul.side-nav li").getByLabel("Connections", {
|
|
5332
6031
|
exact: true
|
|
5333
6032
|
}).click();
|
|
5334
6033
|
}
|
|
@@ -5346,6 +6045,9 @@ class $4ef41cf96a5fae4c$export$b8a61e5c71402559 {
|
|
|
5346
6045
|
await this.page.getByLabel("Expand Q").click();
|
|
5347
6046
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("Expand Q")).not.toBeVisible();
|
|
5348
6047
|
}
|
|
6048
|
+
async openRisksProfile() {
|
|
6049
|
+
await this.page.goto("./#/risks");
|
|
6050
|
+
}
|
|
5349
6051
|
}
|
|
5350
6052
|
|
|
5351
6053
|
|
|
@@ -6266,6 +6968,12 @@ class $6998c6a53a9eb4fa$var$Fixtures {
|
|
|
6266
6968
|
ci
|
|
6267
6969
|
]);
|
|
6268
6970
|
}
|
|
6971
|
+
ci(ci) {
|
|
6972
|
+
this.configurationIds.push(ci.id);
|
|
6973
|
+
return this.doPost("fixtures", [
|
|
6974
|
+
ci
|
|
6975
|
+
]);
|
|
6976
|
+
}
|
|
6269
6977
|
getParentId(id) {
|
|
6270
6978
|
return id.substring(0, id.lastIndexOf("/"));
|
|
6271
6979
|
}
|
|
@@ -6321,6 +7029,12 @@ class $6998c6a53a9eb4fa$var$Fixtures {
|
|
|
6321
7029
|
permissions(rolePermissions) {
|
|
6322
7030
|
return this.doPost("fixtures/roles/permissions/global", rolePermissions);
|
|
6323
7031
|
}
|
|
7032
|
+
globalRoles(rolePrincipals) {
|
|
7033
|
+
return this.doPost(`api/v1/roles/${rolePrincipals.name}`, rolePrincipals);
|
|
7034
|
+
}
|
|
7035
|
+
deleteGlobalRole(roleName) {
|
|
7036
|
+
return this.doDelete(`api/v1/roles/${roleName}`);
|
|
7037
|
+
}
|
|
6324
7038
|
updateUserProfile(username, profile) {
|
|
6325
7039
|
profile.id = username;
|
|
6326
7040
|
profile.type = "xlrelease.UserProfile";
|