@digital-ai/devops-page-object-release 0.0.12 → 0.0.13
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 +305 -14
- package/dist/main.js.map +1 -1
- package/dist/module.js +305 -14
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +76 -13
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @digital-ai/devops-page-object-release
|
|
2
2
|
|
|
3
|
+
## 0.0.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f88f88e: Add tags, flag status and dependency in index.ts
|
|
8
|
+
- a26dd30: Dependency class is been created to develop methods for dependency features in taskDrawer.
|
|
9
|
+
UserPage is been modified as per latest UI change.
|
|
10
|
+
Fixture types are updated as per new fixtures added in index.ts file.
|
|
11
|
+
Validated against xl-release PR also it is been validated locally.
|
|
12
|
+
|
|
3
13
|
## 0.0.12
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -960,6 +960,7 @@ class $f8721861c660dd88$export$2b65d1d97338f32b {
|
|
|
960
960
|
|
|
961
961
|
class $87643f2d97b0644e$export$a678525e79c4ccc4 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
962
962
|
async expectNumberOfReleases(releaseTitle, amount) {
|
|
963
|
+
await this.filterReleaseByTitle(releaseTitle);
|
|
963
964
|
if (amount === 1) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible({
|
|
964
965
|
timeout: 5000
|
|
965
966
|
});
|
|
@@ -971,6 +972,12 @@ class $87643f2d97b0644e$export$a678525e79c4ccc4 extends (0, $f8721861c660dd88$ex
|
|
|
971
972
|
}).click();
|
|
972
973
|
return new (0, $9b9a8c3da392d020$export$f43492e8ac3c566)(this.page);
|
|
973
974
|
}
|
|
975
|
+
async filterReleaseByTitle(releaseTitle) {
|
|
976
|
+
await this.page.locator(".toggle-search-filter").click();
|
|
977
|
+
await this.page.locator(".searchFilter").fill(releaseTitle);
|
|
978
|
+
await this.page.locator(".searchFilter").press("Enter");
|
|
979
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible();
|
|
980
|
+
}
|
|
974
981
|
}
|
|
975
982
|
|
|
976
983
|
|
|
@@ -1151,7 +1158,57 @@ class $9c0b0c2caed50730$export$d4865631ba74f3e2 extends (0, $f8721861c660dd88$ex
|
|
|
1151
1158
|
class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1152
1159
|
constructor(page){
|
|
1153
1160
|
super(page);
|
|
1154
|
-
this.railLocator = this.page.locator("task-drawer .dot-drawer
|
|
1161
|
+
this.railLocator = this.page.locator("task-drawer .dot-drawer .task-drawer-content");
|
|
1162
|
+
this.dependency = new $eb81c1b930e440ff$export$fbbf45eff21470e3(page);
|
|
1163
|
+
}
|
|
1164
|
+
async openInputProperties() {
|
|
1165
|
+
await this.railLocator.locator(".task-config-header").getByText("Input properties").click();
|
|
1166
|
+
}
|
|
1167
|
+
async openOutputProperties() {
|
|
1168
|
+
await this.railLocator.locator(".task-config-header").getByText("Output properties").click();
|
|
1169
|
+
}
|
|
1170
|
+
async getValueFromCi(propertyName) {
|
|
1171
|
+
return this.railLocator.locator(`input[id="${propertyName}"]`).inputValue();
|
|
1172
|
+
}
|
|
1173
|
+
async getAllOptionsFromCi(propertyName) {
|
|
1174
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).click();
|
|
1175
|
+
return this.railLocator.locator(`.dot-popper ul li`).allInnerTexts();
|
|
1176
|
+
}
|
|
1177
|
+
async setValueFromCi(propertyName, value) {
|
|
1178
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
|
|
1179
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).click();
|
|
1180
|
+
await this.railLocator.locator(`.dot-popper ul li`, {
|
|
1181
|
+
hasText: value
|
|
1182
|
+
}).click();
|
|
1183
|
+
}
|
|
1184
|
+
async getValueFromString(propertyName) {
|
|
1185
|
+
await this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`).focus();
|
|
1186
|
+
return this.railLocator.locator(`input[id="${propertyName}"]`).inputValue();
|
|
1187
|
+
}
|
|
1188
|
+
async setValueFromString(propertyName, value) {
|
|
1189
|
+
await this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`).focus();
|
|
1190
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).fill(value);
|
|
1191
|
+
}
|
|
1192
|
+
async setValueFromLargeString(propertyName, value) {
|
|
1193
|
+
await this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`).focus();
|
|
1194
|
+
await this.railLocator.locator(`textarea[id="${propertyName}"]`).fill(value);
|
|
1195
|
+
}
|
|
1196
|
+
async setValueFromPassword(propertyName, value) {
|
|
1197
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).fill(value);
|
|
1198
|
+
}
|
|
1199
|
+
async setAndCreateVariable(propertyName, variableName) {
|
|
1200
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
|
|
1201
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).click();
|
|
1202
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).fill(variableName);
|
|
1203
|
+
await this.railLocator.locator(`.dot-popper button`, {
|
|
1204
|
+
hasText: variableName
|
|
1205
|
+
}).click();
|
|
1206
|
+
}
|
|
1207
|
+
async setVariable(propertyName, variableName) {
|
|
1208
|
+
return this.setValueFromCi(propertyName, variableName);
|
|
1209
|
+
}
|
|
1210
|
+
async expectValueFromString(propertyName, propertyValue) {
|
|
1211
|
+
return await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`)).toHaveText(propertyValue);
|
|
1155
1212
|
}
|
|
1156
1213
|
async setValueFromMap(propertyName, key, value) {
|
|
1157
1214
|
await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.add-new-button`).click();
|
|
@@ -1167,12 +1224,174 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
1167
1224
|
async expectScriptToContain(script) {
|
|
1168
1225
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".code-editor .ace_content")).toContainText(script);
|
|
1169
1226
|
}
|
|
1227
|
+
async enterScriptForAutoComplete(script) {
|
|
1228
|
+
await this.page.locator(".code-editor textarea.ace_text-input").clear();
|
|
1229
|
+
await this.page.locator(".code-editor textarea.ace_text-input").fill(script);
|
|
1230
|
+
await this.page.locator(".code-editor textarea.ace_text-input").press(".");
|
|
1231
|
+
}
|
|
1232
|
+
async openScriptEditorInSeparateWindow() {
|
|
1233
|
+
await this.page.getByTestId("fullscreen-enter-btn").click();
|
|
1234
|
+
(0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).toBeVisible();
|
|
1235
|
+
}
|
|
1236
|
+
async closeFullscreenScriptWindowWithESC() {
|
|
1237
|
+
await this.page.locator("#dialogTitle").press("Escape");
|
|
1238
|
+
(0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
|
|
1239
|
+
}
|
|
1240
|
+
async closeFullscreenScriptWindow() {
|
|
1241
|
+
await this.page.getByTestId("fullscreen-exit-btn").click();
|
|
1242
|
+
(0, $kKeXs$playwrighttest.expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
|
|
1243
|
+
}
|
|
1170
1244
|
async abort(comment) {
|
|
1171
1245
|
await this.page.getByTestId("single-action-button").click();
|
|
1172
1246
|
await this.page.getByTestId("task-action-comment").click();
|
|
1173
1247
|
await this.page.getByTestId("task-action-comment").fill(comment);
|
|
1174
1248
|
await this.page.getByTestId("task-action-confirm").click();
|
|
1175
1249
|
}
|
|
1250
|
+
async expectDependenciesDisplayed(dependencies) {
|
|
1251
|
+
await this.railLocator.locator(".gate-task-dependencies").waitFor();
|
|
1252
|
+
for(let i = 0; i < dependencies.length; i++)await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dependency").filter({
|
|
1253
|
+
hasText: dependencies[i]
|
|
1254
|
+
})).toBeVisible();
|
|
1255
|
+
}
|
|
1256
|
+
async expectCanDeleteDependency(title, canDelete = true) {
|
|
1257
|
+
if (canDelete) {
|
|
1258
|
+
const locat = this.page.locator(".dependency").filter({
|
|
1259
|
+
has: this.page.getByRole("link", {
|
|
1260
|
+
name: title,
|
|
1261
|
+
exact: true
|
|
1262
|
+
})
|
|
1263
|
+
}).locator(".icon-options");
|
|
1264
|
+
await locat.isVisible();
|
|
1265
|
+
await locat.click();
|
|
1266
|
+
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.getByRole("menuitem", {
|
|
1267
|
+
name: "Remove"
|
|
1268
|
+
})).toBeVisible();
|
|
1269
|
+
} else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dependency").filter({
|
|
1270
|
+
has: this.page.getByRole("link", {
|
|
1271
|
+
name: title,
|
|
1272
|
+
exact: true
|
|
1273
|
+
})
|
|
1274
|
+
}).locator(".icon-options")).not.toBeVisible();
|
|
1275
|
+
}
|
|
1276
|
+
async getDependencyCount() {
|
|
1277
|
+
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
|
|
1278
|
+
const count = await this.railLocator.locator(".gate-task-dependencies .dependency").count();
|
|
1279
|
+
return count;
|
|
1280
|
+
}
|
|
1281
|
+
async addDependency() {
|
|
1282
|
+
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".add-dependency-btn")).toBeVisible();
|
|
1283
|
+
await this.railLocator.locator(".add-dependency-btn").click();
|
|
1284
|
+
}
|
|
1285
|
+
async expectDependencyText(dependencies) {
|
|
1286
|
+
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
|
|
1287
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("link", {
|
|
1288
|
+
name: dependencies,
|
|
1289
|
+
exact: true
|
|
1290
|
+
}).first()).toBeVisible();
|
|
1291
|
+
}
|
|
1292
|
+
async clickEditDependency(dependencies) {
|
|
1293
|
+
const locat = this.page.locator(".dependency").filter({
|
|
1294
|
+
has: this.page.getByRole("link", {
|
|
1295
|
+
name: dependencies,
|
|
1296
|
+
exact: true
|
|
1297
|
+
})
|
|
1298
|
+
}).locator(".icon-options");
|
|
1299
|
+
await locat.isVisible();
|
|
1300
|
+
await locat.click();
|
|
1301
|
+
const frame = this.page.getByTestId("undefined-menu");
|
|
1302
|
+
if (await frame.isVisible()) await this.railLocator.getByRole("menuitem", {
|
|
1303
|
+
name: "Edit"
|
|
1304
|
+
}).click();
|
|
1305
|
+
else {
|
|
1306
|
+
await locat.nth(1).click();
|
|
1307
|
+
await this.railLocator.getByRole("menuitem", {
|
|
1308
|
+
name: "Edit"
|
|
1309
|
+
}).click();
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
class $eb81c1b930e440ff$export$fbbf45eff21470e3 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1314
|
+
constructor(page){
|
|
1315
|
+
super(page);
|
|
1316
|
+
this.dependencyLocator = page.locator(".gate-task-dependencies .dependency-selector-component");
|
|
1317
|
+
this.release = this.dependencyLocator.locator("#release-dependency");
|
|
1318
|
+
this.phase = this.dependencyLocator.locator("#phase-dependency");
|
|
1319
|
+
this.task = this.dependencyLocator.locator("#task-dependency");
|
|
1320
|
+
}
|
|
1321
|
+
async getRelease() {
|
|
1322
|
+
await this.release.isVisible();
|
|
1323
|
+
const releaseValue = await this.release.getAttribute("value");
|
|
1324
|
+
return releaseValue;
|
|
1325
|
+
}
|
|
1326
|
+
async getPhase() {
|
|
1327
|
+
await this.phase.isVisible();
|
|
1328
|
+
const phaseValue = await this.phase.getAttribute("value");
|
|
1329
|
+
return phaseValue;
|
|
1330
|
+
}
|
|
1331
|
+
async getTask() {
|
|
1332
|
+
await this.task.isVisible();
|
|
1333
|
+
const taskValue = await this.task.getAttribute("value");
|
|
1334
|
+
return taskValue;
|
|
1335
|
+
}
|
|
1336
|
+
async setRelease(releaseTitle) {
|
|
1337
|
+
await this.release.click();
|
|
1338
|
+
await this.release.fill(releaseTitle);
|
|
1339
|
+
await this.page.getByRole("option", {
|
|
1340
|
+
name: releaseTitle
|
|
1341
|
+
}).click();
|
|
1342
|
+
}
|
|
1343
|
+
async save() {
|
|
1344
|
+
await (0, $kKeXs$playwrighttest.expect)(this.dependencyLocator.getByRole("button", {
|
|
1345
|
+
name: "OK"
|
|
1346
|
+
})).toBeEnabled();
|
|
1347
|
+
await this.dependencyLocator.getByRole("button", {
|
|
1348
|
+
name: "OK"
|
|
1349
|
+
}).click();
|
|
1350
|
+
}
|
|
1351
|
+
async setPhase(phaseTitle) {
|
|
1352
|
+
await this.phase.click();
|
|
1353
|
+
await this.phase.fill("");
|
|
1354
|
+
await this.page.getByRole("option", {
|
|
1355
|
+
name: phaseTitle
|
|
1356
|
+
}).click();
|
|
1357
|
+
}
|
|
1358
|
+
async setTask(taskTitle) {
|
|
1359
|
+
await this.task.click();
|
|
1360
|
+
await this.task.fill("");
|
|
1361
|
+
await this.page.getByRole("option", {
|
|
1362
|
+
name: taskTitle
|
|
1363
|
+
}).click();
|
|
1364
|
+
}
|
|
1365
|
+
async clearPhase() {
|
|
1366
|
+
await this.phase.clear();
|
|
1367
|
+
}
|
|
1368
|
+
async expectVariableModeEnabled(mode) {
|
|
1369
|
+
await (0, $kKeXs$playwrighttest.expect)(this.dependencyLocator.getByLabel("input-variable")).toBeVisible();
|
|
1370
|
+
const variablemode = await this.dependencyLocator.getByLabel("input-variable").getAttribute("aria-pressed");
|
|
1371
|
+
(0, $kKeXs$playwrighttest.expect)(variablemode).toBe("" + mode + "");
|
|
1372
|
+
}
|
|
1373
|
+
async clickVariable() {
|
|
1374
|
+
await this.dependencyLocator.getByLabel("input-variable").click();
|
|
1375
|
+
}
|
|
1376
|
+
//TODO: getAttribute('value') is not working as expected. Need to be fixed with better alternative.
|
|
1377
|
+
async expectMinimumOptions(options) {
|
|
1378
|
+
await this.dependencyLocator.getByPlaceholder("Please select a variable of").click();
|
|
1379
|
+
for(let i = 0; i < options.length; i++){
|
|
1380
|
+
const option = await this.dependencyLocator.locator("#mui-30-option-" + i).getAttribute("value");
|
|
1381
|
+
(0, $kKeXs$playwrighttest.expect)(options[i]).toContain(option);
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
async enterNewVariable(variablename) {
|
|
1385
|
+
await this.page.getByLabel("Please select a variable of").click();
|
|
1386
|
+
await this.page.getByLabel("Please select a variable of").fill(variablename);
|
|
1387
|
+
await this.page.getByTestId("dot-action-item-btn").click();
|
|
1388
|
+
}
|
|
1389
|
+
async selectVariable(variablename) {
|
|
1390
|
+
await this.page.getByLabel("Please select a variable of").click();
|
|
1391
|
+
await this.page.getByRole("option", {
|
|
1392
|
+
name: variablename
|
|
1393
|
+
}).click();
|
|
1394
|
+
}
|
|
1176
1395
|
}
|
|
1177
1396
|
|
|
1178
1397
|
|
|
@@ -1193,9 +1412,44 @@ class $f9016705c1a1eb20$export$aa59788fdecae2f2 extends (0, $f8721861c660dd88$ex
|
|
|
1193
1412
|
await test.isVisible();
|
|
1194
1413
|
await (0, $kKeXs$playwrighttest.expect)(test).toContainText(filename);
|
|
1195
1414
|
}
|
|
1415
|
+
async getAttachmentsListCount() {
|
|
1416
|
+
return await this.page.locator(".file-upload-list div").count();
|
|
1417
|
+
}
|
|
1418
|
+
async uploadFile(filePath) {
|
|
1419
|
+
const fileChooserPromise = this.page.waitForEvent("filechooser");
|
|
1420
|
+
await this.page.getByRole("button", {
|
|
1421
|
+
name: "Select file(s)"
|
|
1422
|
+
}).click();
|
|
1423
|
+
const fileChooser = await fileChooserPromise;
|
|
1424
|
+
await fileChooser.setFiles(filePath);
|
|
1425
|
+
}
|
|
1426
|
+
async downloadFile(filename) {
|
|
1427
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1428
|
+
this.page.on("download", ()=>{});
|
|
1429
|
+
const downloadPromise = this.page.waitForEvent("download");
|
|
1430
|
+
await this.page.locator("li").filter({
|
|
1431
|
+
hasText: "" + filename + ""
|
|
1432
|
+
}).click();
|
|
1433
|
+
await downloadPromise;
|
|
1434
|
+
}
|
|
1435
|
+
async deleteAttachment(fileName) {
|
|
1436
|
+
await this.page.locator("li").filter({
|
|
1437
|
+
hasText: fileName
|
|
1438
|
+
}).click();
|
|
1439
|
+
await this.page.getByLabel("delete file").click();
|
|
1440
|
+
await this.page.getByRole("button", {
|
|
1441
|
+
name: "Delete"
|
|
1442
|
+
}).click();
|
|
1443
|
+
}
|
|
1444
|
+
async expectWithNoAttachment(tempFile) {
|
|
1445
|
+
const test = await this.page.locator(".task-attachments-grid .file-item-text").isVisible();
|
|
1446
|
+
if (test) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toContainText(tempFile);
|
|
1447
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toBeVisible();
|
|
1448
|
+
}
|
|
1196
1449
|
}
|
|
1197
1450
|
|
|
1198
1451
|
|
|
1452
|
+
|
|
1199
1453
|
class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1200
1454
|
constructor(page){
|
|
1201
1455
|
super(page);
|
|
@@ -1256,6 +1510,9 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
1256
1510
|
await this.commentBox.fill(comment);
|
|
1257
1511
|
await this.confirm.click();
|
|
1258
1512
|
}
|
|
1513
|
+
async expectTaskTitle(taskTitle) {
|
|
1514
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".task-drawer .task-title-input .dot-view-mode-typography").innerText()).toContain(taskTitle);
|
|
1515
|
+
}
|
|
1259
1516
|
}
|
|
1260
1517
|
|
|
1261
1518
|
|
|
@@ -1549,17 +1806,16 @@ class $be4dd73206d8e76b$export$3cac5fd37ae64b91 extends (0, $f8721861c660dd88$ex
|
|
|
1549
1806
|
|
|
1550
1807
|
|
|
1551
1808
|
|
|
1809
|
+
|
|
1552
1810
|
class $bb5572a48b31014a$export$e2e2e1ffdce20c30 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
1553
1811
|
constructor(page){
|
|
1554
1812
|
super(page);
|
|
1555
1813
|
this.userName = page.locator("#username");
|
|
1556
|
-
this.name = page.locator("#
|
|
1814
|
+
this.name = page.locator("#fullName");
|
|
1557
1815
|
this.email = page.locator("#email");
|
|
1558
|
-
this.password = page.locator(
|
|
1559
|
-
this.cnfPassword = page.locator("#
|
|
1560
|
-
this.saveButton = page.
|
|
1561
|
-
name: "Save"
|
|
1562
|
-
});
|
|
1816
|
+
this.password = page.locator("#password");
|
|
1817
|
+
this.cnfPassword = page.locator("#confirmPassword");
|
|
1818
|
+
this.saveButton = page.getByTestId("save-btn");
|
|
1563
1819
|
this.cancelButton = page.getByRole("button", {
|
|
1564
1820
|
name: "Cancel"
|
|
1565
1821
|
});
|
|
@@ -1583,6 +1839,9 @@ class $bb5572a48b31014a$export$e2e2e1ffdce20c30 extends (0, $f8721861c660dd88$ex
|
|
|
1583
1839
|
return await this.cnfPassword.fill(cnfPassword);
|
|
1584
1840
|
}
|
|
1585
1841
|
async save() {
|
|
1842
|
+
await this.saveButton.isEnabled();
|
|
1843
|
+
await (0, $kKeXs$playwrighttest.expect)(this.saveButton).not.toBeDisabled();
|
|
1844
|
+
await this.saveButton.focus();
|
|
1586
1845
|
await this.saveButton.click();
|
|
1587
1846
|
}
|
|
1588
1847
|
async cancel() {
|
|
@@ -1609,8 +1868,10 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
|
|
|
1609
1868
|
async toggleLoginPermission(username) {
|
|
1610
1869
|
await this.page.getByRole("row", {
|
|
1611
1870
|
name: "" + username + ""
|
|
1612
|
-
}).getByRole("checkbox").
|
|
1613
|
-
|
|
1871
|
+
}).getByRole("checkbox").click();
|
|
1872
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("row", {
|
|
1873
|
+
name: "" + username + ""
|
|
1874
|
+
}).locator(".Mui-checked")).toBeChecked();
|
|
1614
1875
|
}
|
|
1615
1876
|
async addUser() {
|
|
1616
1877
|
await this.newUserButton.click();
|
|
@@ -2878,9 +3139,12 @@ const $6998c6a53a9eb4fa$export$e0969da9b8fb378d = (0, $kKeXs$playwrighttest.test
|
|
|
2878
3139
|
}
|
|
2879
3140
|
});
|
|
2880
3141
|
class $6998c6a53a9eb4fa$var$Fixtures {
|
|
3142
|
+
archivedReleaseIds = [];
|
|
2881
3143
|
releaseIds = [];
|
|
2882
3144
|
triggerIds = [];
|
|
2883
3145
|
configurationIds = [];
|
|
3146
|
+
globalVariableIds = [];
|
|
3147
|
+
folderIds = [];
|
|
2884
3148
|
usernames = [];
|
|
2885
3149
|
userProfiles = [];
|
|
2886
3150
|
constructor(request, page){
|
|
@@ -2892,15 +3156,29 @@ class $6998c6a53a9eb4fa$var$Fixtures {
|
|
|
2892
3156
|
this.releaseIds.push(release.id);
|
|
2893
3157
|
return this.deleteRelease(release.id).then(()=>this.deleteArchivedRelease(release.id)).then(()=>this.doPost("fixtures/release", release));
|
|
2894
3158
|
}
|
|
3159
|
+
archivedRelease(release) {
|
|
3160
|
+
this.initDefaults(release);
|
|
3161
|
+
this.archivedReleaseIds.push(release.id);
|
|
3162
|
+
return this.doPost("fixtures/archived", release);
|
|
3163
|
+
}
|
|
2895
3164
|
configuration(ci) {
|
|
2896
3165
|
this.configurationIds.push(ci.id);
|
|
2897
3166
|
return this.doPost("fixtures/shared", [
|
|
2898
3167
|
ci
|
|
2899
3168
|
]);
|
|
2900
3169
|
}
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
3170
|
+
getParentId(id) {
|
|
3171
|
+
return id.substring(0, id.lastIndexOf("/"));
|
|
3172
|
+
}
|
|
3173
|
+
folder(folder) {
|
|
3174
|
+
const parentId = this.getParentId(folder.id);
|
|
3175
|
+
//ToDo: Add system teams
|
|
3176
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */ const teams = folder.teams;
|
|
3177
|
+
delete folder.teams;
|
|
3178
|
+
//ToDo: Add Children
|
|
3179
|
+
const children = folder.children || [];
|
|
3180
|
+
delete folder.children;
|
|
3181
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */ return this.doPost(`api/v1/folders/${parentId}`, folder);
|
|
2904
3182
|
}
|
|
2905
3183
|
deleteArchivedRelease(id) {
|
|
2906
3184
|
const releaseId = id.includes("Applications/") ? id : `Applications/${id}`;
|
|
@@ -2929,8 +3207,19 @@ class $6998c6a53a9eb4fa$var$Fixtures {
|
|
|
2929
3207
|
id
|
|
2930
3208
|
]);
|
|
2931
3209
|
}
|
|
2932
|
-
|
|
2933
|
-
|
|
3210
|
+
deleteFolder(folderId) {
|
|
3211
|
+
const id = this.doGet(`api/v1/folders/${folderId}`);
|
|
3212
|
+
return this.doDelete(`api/v1/folders/${id}`);
|
|
3213
|
+
}
|
|
3214
|
+
activityLogs(id, logs) {
|
|
3215
|
+
return this.doPost(`fixtures/activityLogs/${id}`, logs);
|
|
3216
|
+
}
|
|
3217
|
+
globalVariable(variable) {
|
|
3218
|
+
variable.id = variable.id || `Configuration/variables/global/Variable_${variable.key}`;
|
|
3219
|
+
this.globalVariableIds.push(variable.id);
|
|
3220
|
+
variable.requiresValue = false;
|
|
3221
|
+
variable.showOnReleaseStart = false;
|
|
3222
|
+
return this.doPost("api/v1/config/Configuration/variables/global", variable);
|
|
2934
3223
|
}
|
|
2935
3224
|
async cleanAll() {
|
|
2936
3225
|
for (const username of this.usernames)await this.deleteUser(username);
|
|
@@ -2938,6 +3227,8 @@ class $6998c6a53a9eb4fa$var$Fixtures {
|
|
|
2938
3227
|
for (const triggerId of this.triggerIds)await this.deleteTrigger(triggerId);
|
|
2939
3228
|
for (const releaseId of this.releaseIds.reverse())await this.deleteRelease(releaseId);
|
|
2940
3229
|
for (const confId of this.configurationIds)await this.deleteConfiguration(confId);
|
|
3230
|
+
for (const folderId of this.folderIds.reverse())await this.deleteFolder(folderId);
|
|
3231
|
+
this.folderIds = [];
|
|
2941
3232
|
this.releaseIds = [];
|
|
2942
3233
|
this.triggerIds = [];
|
|
2943
3234
|
this.configurationIds = [];
|