@digital-ai/devops-page-object-release 0.0.12 → 0.0.14
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 +17 -0
- package/dist/main.js +804 -13
- package/dist/main.js.map +1 -1
- package/dist/module.js +804 -13
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +184 -5
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -2
package/dist/module.js
CHANGED
|
@@ -2,6 +2,8 @@ import {test as $hOLA6$test, expect as $hOLA6$expect} from "@playwright/test";
|
|
|
2
2
|
import {execFile as $hOLA6$execFile} from "child_process";
|
|
3
3
|
import $hOLA6$lodashisNil from "lodash/isNil";
|
|
4
4
|
import {env as $hOLA6$env} from "process";
|
|
5
|
+
import {promises as $hOLA6$promises} from "fs";
|
|
6
|
+
import $hOLA6$moment from "moment";
|
|
5
7
|
import $hOLA6$lodashisUndefined from "lodash/isUndefined";
|
|
6
8
|
import $hOLA6$lodasheach from "lodash/each";
|
|
7
9
|
import $hOLA6$lodashforEach from "lodash/forEach";
|
|
@@ -15,6 +17,7 @@ import $hOLA6$lodashtoPairs from "lodash/toPairs";
|
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
|
|
20
|
+
|
|
18
21
|
class $9626bc9256ce31f7$export$2b65d1d97338f32b {
|
|
19
22
|
constructor(page){
|
|
20
23
|
this.page = page;
|
|
@@ -24,6 +27,7 @@ class $9626bc9256ce31f7$export$2b65d1d97338f32b {
|
|
|
24
27
|
|
|
25
28
|
class $5359280e98d97ff9$export$a678525e79c4ccc4 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
26
29
|
async expectNumberOfReleases(releaseTitle, amount) {
|
|
30
|
+
await this.filterReleaseByTitle(releaseTitle);
|
|
27
31
|
if (amount === 1) await (0, $hOLA6$expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible({
|
|
28
32
|
timeout: 5000
|
|
29
33
|
});
|
|
@@ -35,6 +39,12 @@ class $5359280e98d97ff9$export$a678525e79c4ccc4 extends (0, $9626bc9256ce31f7$ex
|
|
|
35
39
|
}).click();
|
|
36
40
|
return new (0, $43cbcdfccb6c2a76$export$f43492e8ac3c566)(this.page);
|
|
37
41
|
}
|
|
42
|
+
async filterReleaseByTitle(releaseTitle) {
|
|
43
|
+
await this.page.locator(".toggle-search-filter").click();
|
|
44
|
+
await this.page.locator(".searchFilter").fill(releaseTitle);
|
|
45
|
+
await this.page.locator(".searchFilter").press("Enter");
|
|
46
|
+
await (0, $hOLA6$expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible();
|
|
47
|
+
}
|
|
38
48
|
}
|
|
39
49
|
|
|
40
50
|
|
|
@@ -215,7 +225,57 @@ class $3fa741329d8067d5$export$d4865631ba74f3e2 extends (0, $9626bc9256ce31f7$ex
|
|
|
215
225
|
class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
216
226
|
constructor(page){
|
|
217
227
|
super(page);
|
|
218
|
-
this.railLocator = this.page.locator("task-drawer .dot-drawer
|
|
228
|
+
this.railLocator = this.page.locator("task-drawer .dot-drawer .task-drawer-content");
|
|
229
|
+
this.dependency = new $90bb70a7e909e500$export$fbbf45eff21470e3(page);
|
|
230
|
+
}
|
|
231
|
+
async openInputProperties() {
|
|
232
|
+
await this.railLocator.locator(".task-config-header").getByText("Input properties").click();
|
|
233
|
+
}
|
|
234
|
+
async openOutputProperties() {
|
|
235
|
+
await this.railLocator.locator(".task-config-header").getByText("Output properties").click();
|
|
236
|
+
}
|
|
237
|
+
async getValueFromCi(propertyName) {
|
|
238
|
+
return this.railLocator.locator(`input[id="${propertyName}"]`).inputValue();
|
|
239
|
+
}
|
|
240
|
+
async getAllOptionsFromCi(propertyName) {
|
|
241
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).click();
|
|
242
|
+
return this.railLocator.locator(`.dot-popper ul li`).allInnerTexts();
|
|
243
|
+
}
|
|
244
|
+
async setValueFromCi(propertyName, value) {
|
|
245
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
|
|
246
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).click();
|
|
247
|
+
await this.railLocator.locator(`.dot-popper ul li`, {
|
|
248
|
+
hasText: value
|
|
249
|
+
}).click();
|
|
250
|
+
}
|
|
251
|
+
async getValueFromString(propertyName) {
|
|
252
|
+
await this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`).focus();
|
|
253
|
+
return this.railLocator.locator(`input[id="${propertyName}"]`).inputValue();
|
|
254
|
+
}
|
|
255
|
+
async setValueFromString(propertyName, value) {
|
|
256
|
+
await this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`).focus();
|
|
257
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).fill(value);
|
|
258
|
+
}
|
|
259
|
+
async setValueFromLargeString(propertyName, value) {
|
|
260
|
+
await this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`).focus();
|
|
261
|
+
await this.railLocator.locator(`textarea[id="${propertyName}"]`).fill(value);
|
|
262
|
+
}
|
|
263
|
+
async setValueFromPassword(propertyName, value) {
|
|
264
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).fill(value);
|
|
265
|
+
}
|
|
266
|
+
async setAndCreateVariable(propertyName, variableName) {
|
|
267
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).clear();
|
|
268
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).click();
|
|
269
|
+
await this.railLocator.locator(`input[id="${propertyName}"]`).fill(variableName);
|
|
270
|
+
await this.railLocator.locator(`.dot-popper button`, {
|
|
271
|
+
hasText: variableName
|
|
272
|
+
}).click();
|
|
273
|
+
}
|
|
274
|
+
async setVariable(propertyName, variableName) {
|
|
275
|
+
return this.setValueFromCi(propertyName, variableName);
|
|
276
|
+
}
|
|
277
|
+
async expectValueFromString(propertyName, propertyValue) {
|
|
278
|
+
return await (0, $hOLA6$expect)(this.railLocator.locator(`.input-scalar-fake-input[id="${propertyName}"]`)).toHaveText(propertyValue);
|
|
219
279
|
}
|
|
220
280
|
async setValueFromMap(propertyName, key, value) {
|
|
221
281
|
await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.add-new-button`).click();
|
|
@@ -231,12 +291,174 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
|
|
|
231
291
|
async expectScriptToContain(script) {
|
|
232
292
|
await (0, $hOLA6$expect)(this.page.locator(".code-editor .ace_content")).toContainText(script);
|
|
233
293
|
}
|
|
294
|
+
async enterScriptForAutoComplete(script) {
|
|
295
|
+
await this.page.locator(".code-editor textarea.ace_text-input").clear();
|
|
296
|
+
await this.page.locator(".code-editor textarea.ace_text-input").fill(script);
|
|
297
|
+
await this.page.locator(".code-editor textarea.ace_text-input").press(".");
|
|
298
|
+
}
|
|
299
|
+
async openScriptEditorInSeparateWindow() {
|
|
300
|
+
await this.page.getByTestId("fullscreen-enter-btn").click();
|
|
301
|
+
(0, $hOLA6$expect)(this.page.locator("#dialogTitle")).toBeVisible();
|
|
302
|
+
}
|
|
303
|
+
async closeFullscreenScriptWindowWithESC() {
|
|
304
|
+
await this.page.locator("#dialogTitle").press("Escape");
|
|
305
|
+
(0, $hOLA6$expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
|
|
306
|
+
}
|
|
307
|
+
async closeFullscreenScriptWindow() {
|
|
308
|
+
await this.page.getByTestId("fullscreen-exit-btn").click();
|
|
309
|
+
(0, $hOLA6$expect)(this.page.locator("#dialogTitle")).not.toBeVisible();
|
|
310
|
+
}
|
|
234
311
|
async abort(comment) {
|
|
235
312
|
await this.page.getByTestId("single-action-button").click();
|
|
236
313
|
await this.page.getByTestId("task-action-comment").click();
|
|
237
314
|
await this.page.getByTestId("task-action-comment").fill(comment);
|
|
238
315
|
await this.page.getByTestId("task-action-confirm").click();
|
|
239
316
|
}
|
|
317
|
+
async expectDependenciesDisplayed(dependencies) {
|
|
318
|
+
await this.railLocator.locator(".gate-task-dependencies").waitFor();
|
|
319
|
+
for(let i = 0; i < dependencies.length; i++)await (0, $hOLA6$expect)(this.page.locator(".dependency").filter({
|
|
320
|
+
hasText: dependencies[i]
|
|
321
|
+
})).toBeVisible();
|
|
322
|
+
}
|
|
323
|
+
async expectCanDeleteDependency(title, canDelete = true) {
|
|
324
|
+
if (canDelete) {
|
|
325
|
+
const locat = this.page.locator(".dependency").filter({
|
|
326
|
+
has: this.page.getByRole("link", {
|
|
327
|
+
name: title,
|
|
328
|
+
exact: true
|
|
329
|
+
})
|
|
330
|
+
}).locator(".icon-options");
|
|
331
|
+
await locat.isVisible();
|
|
332
|
+
await locat.click();
|
|
333
|
+
await (0, $hOLA6$expect)(this.railLocator.getByRole("menuitem", {
|
|
334
|
+
name: "Remove"
|
|
335
|
+
})).toBeVisible();
|
|
336
|
+
} else await (0, $hOLA6$expect)(this.page.locator(".dependency").filter({
|
|
337
|
+
has: this.page.getByRole("link", {
|
|
338
|
+
name: title,
|
|
339
|
+
exact: true
|
|
340
|
+
})
|
|
341
|
+
}).locator(".icon-options")).not.toBeVisible();
|
|
342
|
+
}
|
|
343
|
+
async getDependencyCount() {
|
|
344
|
+
await (0, $hOLA6$expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
|
|
345
|
+
const count = await this.railLocator.locator(".gate-task-dependencies .dependency").count();
|
|
346
|
+
return count;
|
|
347
|
+
}
|
|
348
|
+
async addDependency() {
|
|
349
|
+
await (0, $hOLA6$expect)(this.railLocator.locator(".add-dependency-btn")).toBeVisible();
|
|
350
|
+
await this.railLocator.locator(".add-dependency-btn").click();
|
|
351
|
+
}
|
|
352
|
+
async expectDependencyText(dependencies) {
|
|
353
|
+
await (0, $hOLA6$expect)(this.railLocator.locator(".gate-task-dependencies")).toBeVisible();
|
|
354
|
+
await (0, $hOLA6$expect)(this.page.getByRole("link", {
|
|
355
|
+
name: dependencies,
|
|
356
|
+
exact: true
|
|
357
|
+
}).first()).toBeVisible();
|
|
358
|
+
}
|
|
359
|
+
async clickEditDependency(dependencies) {
|
|
360
|
+
const locat = this.page.locator(".dependency").filter({
|
|
361
|
+
has: this.page.getByRole("link", {
|
|
362
|
+
name: dependencies,
|
|
363
|
+
exact: true
|
|
364
|
+
})
|
|
365
|
+
}).locator(".icon-options");
|
|
366
|
+
await locat.isVisible();
|
|
367
|
+
await locat.click();
|
|
368
|
+
const frame = this.page.getByTestId("undefined-menu");
|
|
369
|
+
if (await frame.isVisible()) await this.railLocator.getByRole("menuitem", {
|
|
370
|
+
name: "Edit"
|
|
371
|
+
}).click();
|
|
372
|
+
else {
|
|
373
|
+
await locat.nth(1).click();
|
|
374
|
+
await this.railLocator.getByRole("menuitem", {
|
|
375
|
+
name: "Edit"
|
|
376
|
+
}).click();
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
381
|
+
constructor(page){
|
|
382
|
+
super(page);
|
|
383
|
+
this.dependencyLocator = page.locator(".gate-task-dependencies .dependency-selector-component");
|
|
384
|
+
this.release = this.dependencyLocator.locator("#release-dependency");
|
|
385
|
+
this.phase = this.dependencyLocator.locator("#phase-dependency");
|
|
386
|
+
this.task = this.dependencyLocator.locator("#task-dependency");
|
|
387
|
+
}
|
|
388
|
+
async getRelease() {
|
|
389
|
+
await this.release.isVisible();
|
|
390
|
+
const releaseValue = await this.release.getAttribute("value");
|
|
391
|
+
return releaseValue;
|
|
392
|
+
}
|
|
393
|
+
async getPhase() {
|
|
394
|
+
await this.phase.isVisible();
|
|
395
|
+
const phaseValue = await this.phase.getAttribute("value");
|
|
396
|
+
return phaseValue;
|
|
397
|
+
}
|
|
398
|
+
async getTask() {
|
|
399
|
+
await this.task.isVisible();
|
|
400
|
+
const taskValue = await this.task.getAttribute("value");
|
|
401
|
+
return taskValue;
|
|
402
|
+
}
|
|
403
|
+
async setRelease(releaseTitle) {
|
|
404
|
+
await this.release.click();
|
|
405
|
+
await this.release.fill(releaseTitle);
|
|
406
|
+
await this.page.getByRole("option", {
|
|
407
|
+
name: releaseTitle
|
|
408
|
+
}).click();
|
|
409
|
+
}
|
|
410
|
+
async save() {
|
|
411
|
+
await (0, $hOLA6$expect)(this.dependencyLocator.getByRole("button", {
|
|
412
|
+
name: "OK"
|
|
413
|
+
})).toBeEnabled();
|
|
414
|
+
await this.dependencyLocator.getByRole("button", {
|
|
415
|
+
name: "OK"
|
|
416
|
+
}).click();
|
|
417
|
+
}
|
|
418
|
+
async setPhase(phaseTitle) {
|
|
419
|
+
await this.phase.click();
|
|
420
|
+
await this.phase.fill("");
|
|
421
|
+
await this.page.getByRole("option", {
|
|
422
|
+
name: phaseTitle
|
|
423
|
+
}).click();
|
|
424
|
+
}
|
|
425
|
+
async setTask(taskTitle) {
|
|
426
|
+
await this.task.click();
|
|
427
|
+
await this.task.fill("");
|
|
428
|
+
await this.page.getByRole("option", {
|
|
429
|
+
name: taskTitle
|
|
430
|
+
}).click();
|
|
431
|
+
}
|
|
432
|
+
async clearPhase() {
|
|
433
|
+
await this.phase.clear();
|
|
434
|
+
}
|
|
435
|
+
async expectVariableModeEnabled(mode) {
|
|
436
|
+
await (0, $hOLA6$expect)(this.dependencyLocator.getByLabel("input-variable")).toBeVisible();
|
|
437
|
+
const variablemode = await this.dependencyLocator.getByLabel("input-variable").getAttribute("aria-pressed");
|
|
438
|
+
(0, $hOLA6$expect)(variablemode).toBe("" + mode + "");
|
|
439
|
+
}
|
|
440
|
+
async clickVariable() {
|
|
441
|
+
await this.dependencyLocator.getByLabel("input-variable").click();
|
|
442
|
+
}
|
|
443
|
+
//TODO: getAttribute('value') is not working as expected. Need to be fixed with better alternative.
|
|
444
|
+
async expectMinimumOptions(options) {
|
|
445
|
+
await this.dependencyLocator.getByPlaceholder("Please select a variable of").click();
|
|
446
|
+
for(let i = 0; i < options.length; i++){
|
|
447
|
+
const option = await this.dependencyLocator.locator("#mui-30-option-" + i).getAttribute("value");
|
|
448
|
+
(0, $hOLA6$expect)(options[i]).toContain(option);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
async enterNewVariable(variablename) {
|
|
452
|
+
await this.page.getByLabel("Please select a variable of").click();
|
|
453
|
+
await this.page.getByLabel("Please select a variable of").fill(variablename);
|
|
454
|
+
await this.page.getByTestId("dot-action-item-btn").click();
|
|
455
|
+
}
|
|
456
|
+
async selectVariable(variablename) {
|
|
457
|
+
await this.page.getByLabel("Please select a variable of").click();
|
|
458
|
+
await this.page.getByRole("option", {
|
|
459
|
+
name: variablename
|
|
460
|
+
}).click();
|
|
461
|
+
}
|
|
240
462
|
}
|
|
241
463
|
|
|
242
464
|
|
|
@@ -257,9 +479,44 @@ class $9c357602b6f466e7$export$aa59788fdecae2f2 extends (0, $9626bc9256ce31f7$ex
|
|
|
257
479
|
await test.isVisible();
|
|
258
480
|
await (0, $hOLA6$expect)(test).toContainText(filename);
|
|
259
481
|
}
|
|
482
|
+
async getAttachmentsListCount() {
|
|
483
|
+
return await this.page.locator(".file-upload-list div").count();
|
|
484
|
+
}
|
|
485
|
+
async uploadFile(filePath) {
|
|
486
|
+
const fileChooserPromise = this.page.waitForEvent("filechooser");
|
|
487
|
+
await this.page.getByRole("button", {
|
|
488
|
+
name: "Select file(s)"
|
|
489
|
+
}).click();
|
|
490
|
+
const fileChooser = await fileChooserPromise;
|
|
491
|
+
await fileChooser.setFiles(filePath);
|
|
492
|
+
}
|
|
493
|
+
async downloadFile(filename) {
|
|
494
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
495
|
+
this.page.on("download", ()=>{});
|
|
496
|
+
const downloadPromise = this.page.waitForEvent("download");
|
|
497
|
+
await this.page.locator("li").filter({
|
|
498
|
+
hasText: "" + filename + ""
|
|
499
|
+
}).click();
|
|
500
|
+
await downloadPromise;
|
|
501
|
+
}
|
|
502
|
+
async deleteAttachment(fileName) {
|
|
503
|
+
await this.page.locator("li").filter({
|
|
504
|
+
hasText: fileName
|
|
505
|
+
}).click();
|
|
506
|
+
await this.page.getByLabel("delete file").click();
|
|
507
|
+
await this.page.getByRole("button", {
|
|
508
|
+
name: "Delete"
|
|
509
|
+
}).click();
|
|
510
|
+
}
|
|
511
|
+
async expectWithNoAttachment(tempFile) {
|
|
512
|
+
const test = await this.page.locator(".task-attachments-grid .file-item-text").isVisible();
|
|
513
|
+
if (test) await (0, $hOLA6$expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toContainText(tempFile);
|
|
514
|
+
else await (0, $hOLA6$expect)(this.page.locator(".task-attachments-grid .file-item-text")).not.toBeVisible();
|
|
515
|
+
}
|
|
260
516
|
}
|
|
261
517
|
|
|
262
518
|
|
|
519
|
+
|
|
263
520
|
class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
264
521
|
constructor(page){
|
|
265
522
|
super(page);
|
|
@@ -320,6 +577,20 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
|
|
|
320
577
|
await this.commentBox.fill(comment);
|
|
321
578
|
await this.confirm.click();
|
|
322
579
|
}
|
|
580
|
+
async expectTaskTitle(taskTitle) {
|
|
581
|
+
(0, $hOLA6$expect)(await this.page.locator(".task-drawer .task-title-input .dot-view-mode-typography").innerText()).toContain(taskTitle);
|
|
582
|
+
}
|
|
583
|
+
async expectTypeToContain(taskType) {
|
|
584
|
+
(0, $hOLA6$expect)(await this.page.locator(".task-drawer .task-type").innerText()).toContain(taskType);
|
|
585
|
+
}
|
|
586
|
+
async clickExpand() {
|
|
587
|
+
await this.page.locator(".icon-fullscreen-enter").click();
|
|
588
|
+
await (0, $hOLA6$expect)(this.page.locator(".icon-fullscreen-enter")).not.toBeVisible();
|
|
589
|
+
}
|
|
590
|
+
async clickShrink() {
|
|
591
|
+
await this.page.locator(".icon-fullscreen-exit").click();
|
|
592
|
+
await (0, $hOLA6$expect)(this.page.locator(".icon-fullscreen-exit")).not.toBeVisible();
|
|
593
|
+
}
|
|
323
594
|
}
|
|
324
595
|
|
|
325
596
|
|
|
@@ -370,6 +641,11 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
|
|
|
370
641
|
name: "Reset"
|
|
371
642
|
}).click();
|
|
372
643
|
}
|
|
644
|
+
async expectWithAttachment(filename) {
|
|
645
|
+
await (0, $hOLA6$expect)(this.page.locator(".attachments tr td a").filter({
|
|
646
|
+
hasText: filename
|
|
647
|
+
})).toBeVisible();
|
|
648
|
+
}
|
|
373
649
|
}
|
|
374
650
|
|
|
375
651
|
|
|
@@ -453,6 +729,18 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
453
729
|
}).click();
|
|
454
730
|
return this.taskDrawer;
|
|
455
731
|
}
|
|
732
|
+
async openTaskDrawerFromTableView(taskName) {
|
|
733
|
+
await this.page.locator(".name-cell-title").getByText(taskName, {
|
|
734
|
+
exact: true
|
|
735
|
+
}).click();
|
|
736
|
+
return this.taskDrawer;
|
|
737
|
+
}
|
|
738
|
+
async openTaskDrawerFromGrantt(taskName) {
|
|
739
|
+
await this.page.locator(".gantt_tree_content").getByText(taskName, {
|
|
740
|
+
exact: true
|
|
741
|
+
}).dblclick();
|
|
742
|
+
return this.taskDrawer;
|
|
743
|
+
}
|
|
456
744
|
async openVariables() {
|
|
457
745
|
await this.openReleaseMenu("Variables");
|
|
458
746
|
}
|
|
@@ -512,6 +800,24 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
512
800
|
async backToRelease() {
|
|
513
801
|
await this.page.locator(".icon-back").click();
|
|
514
802
|
}
|
|
803
|
+
async openTableView() {
|
|
804
|
+
await this.page.locator(".xl-icon.table-icon").click();
|
|
805
|
+
await (0, $hOLA6$expect)(this.page.locator(".release-grid-container")).toBeVisible();
|
|
806
|
+
}
|
|
807
|
+
async openPlannerView() {
|
|
808
|
+
await this.page.locator(".xl-icon.planner-icon").click();
|
|
809
|
+
await (0, $hOLA6$expect)(this.page.locator(".gantt-container")).toBeVisible();
|
|
810
|
+
}
|
|
811
|
+
async expandGanttFolder() {
|
|
812
|
+
const icExpandTreeview1 = this.page.locator(".gantt_tree_icon.gantt_open");
|
|
813
|
+
for (const element of (await icExpandTreeview1.all())){
|
|
814
|
+
const blnVal = await element.isVisible();
|
|
815
|
+
if (blnVal) {
|
|
816
|
+
await element.click();
|
|
817
|
+
await this.expandGanttFolder();
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
}
|
|
515
821
|
}
|
|
516
822
|
class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
517
823
|
constructor(page, phaseName){
|
|
@@ -558,6 +864,11 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
|
|
|
558
864
|
async expectToHaveTitle(phaseTitle) {
|
|
559
865
|
await (0, $hOLA6$expect)(this.phaseLocator.locator(".phase-title")).toContainText(phaseTitle);
|
|
560
866
|
}
|
|
867
|
+
async expectTemplateLabelNotToBePresent() {
|
|
868
|
+
await (0, $hOLA6$expect)(this.page.locator(".dot-chip").filter({
|
|
869
|
+
hasText: "TEMPLATE"
|
|
870
|
+
})).not.toBeVisible();
|
|
871
|
+
}
|
|
561
872
|
}
|
|
562
873
|
|
|
563
874
|
|
|
@@ -613,17 +924,16 @@ class $6720a523bcb1cce0$export$3cac5fd37ae64b91 extends (0, $9626bc9256ce31f7$ex
|
|
|
613
924
|
|
|
614
925
|
|
|
615
926
|
|
|
927
|
+
|
|
616
928
|
class $21185a378c23589e$export$e2e2e1ffdce20c30 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
617
929
|
constructor(page){
|
|
618
930
|
super(page);
|
|
619
931
|
this.userName = page.locator("#username");
|
|
620
|
-
this.name = page.locator("#
|
|
932
|
+
this.name = page.locator("#fullName");
|
|
621
933
|
this.email = page.locator("#email");
|
|
622
|
-
this.password = page.locator(
|
|
623
|
-
this.cnfPassword = page.locator("#
|
|
624
|
-
this.saveButton = page.
|
|
625
|
-
name: "Save"
|
|
626
|
-
});
|
|
934
|
+
this.password = page.locator("#password");
|
|
935
|
+
this.cnfPassword = page.locator("#confirmPassword");
|
|
936
|
+
this.saveButton = page.getByTestId("save-btn");
|
|
627
937
|
this.cancelButton = page.getByRole("button", {
|
|
628
938
|
name: "Cancel"
|
|
629
939
|
});
|
|
@@ -647,6 +957,9 @@ class $21185a378c23589e$export$e2e2e1ffdce20c30 extends (0, $9626bc9256ce31f7$ex
|
|
|
647
957
|
return await this.cnfPassword.fill(cnfPassword);
|
|
648
958
|
}
|
|
649
959
|
async save() {
|
|
960
|
+
await this.saveButton.isEnabled();
|
|
961
|
+
await (0, $hOLA6$expect)(this.saveButton).not.toBeDisabled();
|
|
962
|
+
await this.saveButton.focus();
|
|
650
963
|
await this.saveButton.click();
|
|
651
964
|
}
|
|
652
965
|
async cancel() {
|
|
@@ -662,7 +975,6 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
|
|
|
662
975
|
constructor(page){
|
|
663
976
|
super(page);
|
|
664
977
|
this.page = page;
|
|
665
|
-
this.newUserButton = this.page.getByTestId("new-user-btn");
|
|
666
978
|
this.modal = new (0, $21185a378c23589e$export$e2e2e1ffdce20c30)(page);
|
|
667
979
|
}
|
|
668
980
|
async openUsersPage() {
|
|
@@ -673,11 +985,13 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
|
|
|
673
985
|
async toggleLoginPermission(username) {
|
|
674
986
|
await this.page.getByRole("row", {
|
|
675
987
|
name: "" + username + ""
|
|
676
|
-
}).getByRole("checkbox").
|
|
677
|
-
|
|
988
|
+
}).getByRole("checkbox").click();
|
|
989
|
+
await (0, $hOLA6$expect)(this.page.getByRole("row", {
|
|
990
|
+
name: "" + username + ""
|
|
991
|
+
}).locator(".Mui-checked")).toBeChecked();
|
|
678
992
|
}
|
|
679
993
|
async addUser() {
|
|
680
|
-
await this.
|
|
994
|
+
await this.page.locator(".new-user-btn").click();
|
|
681
995
|
}
|
|
682
996
|
async createUser(username, password) {
|
|
683
997
|
await this.modal.setUserName(username);
|
|
@@ -946,6 +1260,419 @@ class $3a340a3f4fd8f04d$export$43682cddead1dd78 extends (0, $9626bc9256ce31f7$ex
|
|
|
946
1260
|
|
|
947
1261
|
|
|
948
1262
|
|
|
1263
|
+
|
|
1264
|
+
|
|
1265
|
+
|
|
1266
|
+
class $c37c93912f458e81$export$60c3bfa6385e2a10 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
1267
|
+
constructor(page){
|
|
1268
|
+
super(page);
|
|
1269
|
+
this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
|
|
1270
|
+
}
|
|
1271
|
+
async openTask(taskName) {
|
|
1272
|
+
await this.filterTaskByTitle(taskName);
|
|
1273
|
+
await this.page.getByText(taskName).click();
|
|
1274
|
+
}
|
|
1275
|
+
async filterTaskByTitle(taskname) {
|
|
1276
|
+
await this.page.locator(".toggle-search-filter").click();
|
|
1277
|
+
await this.page.locator(".searchFilter").fill(taskname);
|
|
1278
|
+
await this.page.locator(".searchFilter").press("Enter");
|
|
1279
|
+
await (0, $hOLA6$expect)(this.page.locator("//div[@data-task-title]").filter({
|
|
1280
|
+
hasText: taskname
|
|
1281
|
+
})).toBeVisible();
|
|
1282
|
+
}
|
|
1283
|
+
async filterTasksByTag(tag, taskTitleForValidation) {
|
|
1284
|
+
await this.page.locator(".toggle-search-filter").click();
|
|
1285
|
+
await this.page.locator(".tag-input").fill(tag);
|
|
1286
|
+
await this.page.locator(".tag-input").press("Enter");
|
|
1287
|
+
//TODO: Validation can be changed based on actual test case implementation
|
|
1288
|
+
await (0, $hOLA6$expect)(this.page.locator("//div[@data-task-title]").filter({
|
|
1289
|
+
hasText: taskTitleForValidation
|
|
1290
|
+
})).toBeVisible();
|
|
1291
|
+
}
|
|
1292
|
+
async filterTasksByReleaseTitle(releaseTitle) {
|
|
1293
|
+
await this.page.locator(".toggle-search-filter").click();
|
|
1294
|
+
await this.page.locator(".release-input").fill(releaseTitle);
|
|
1295
|
+
await this.page.locator(".release-input").press("Enter");
|
|
1296
|
+
await (0, $hOLA6$expect)(this.page.locator(".group-title").filter({
|
|
1297
|
+
hasText: releaseTitle
|
|
1298
|
+
})).toBeVisible();
|
|
1299
|
+
}
|
|
1300
|
+
async openSingleTask(taskId, showDetails = false) {
|
|
1301
|
+
await this.page.goto(`./#/tasks/${taskId}?showDetails=${showDetails}`);
|
|
1302
|
+
}
|
|
1303
|
+
async expectReleaseLinksDisplayed(releaseTitle, displayed = true) {
|
|
1304
|
+
if (displayed) {
|
|
1305
|
+
await (0, $hOLA6$expect)(this.page.getByRole("link", {
|
|
1306
|
+
name: "" + releaseTitle + ""
|
|
1307
|
+
})).toBeVisible();
|
|
1308
|
+
await (0, $hOLA6$expect)(this.page.locator(".view-in-release")).toBeVisible();
|
|
1309
|
+
} else {
|
|
1310
|
+
await (0, $hOLA6$expect)(this.page.getByRole("link", {
|
|
1311
|
+
name: "" + releaseTitle + ""
|
|
1312
|
+
})).not.toBeVisible();
|
|
1313
|
+
await (0, $hOLA6$expect)(this.page.locator(".view-in-release")).not.toBeVisible();
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
async expectTaskTitle(taskTitle) {
|
|
1317
|
+
(0, $hOLA6$expect)(await this.page.locator("#tasks0").innerText()).toContain(taskTitle);
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
|
|
1322
|
+
|
|
1323
|
+
|
|
1324
|
+
class $aa992f812fb1e470$export$6adb8dd3f0d1e432 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
1325
|
+
constructor(page){
|
|
1326
|
+
super(page);
|
|
1327
|
+
this.tempDir = "";
|
|
1328
|
+
this.content = "";
|
|
1329
|
+
}
|
|
1330
|
+
async createTempFile(fileName, testInfo) {
|
|
1331
|
+
const content = fileName.toString();
|
|
1332
|
+
const tempDir = testInfo.outputPath(fileName.toString());
|
|
1333
|
+
$hOLA6$promises.writeFile(tempDir, content, "utf8");
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
|
|
1338
|
+
|
|
1339
|
+
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
class $880dec03c4eca8dc$export$ccf2756779bad715 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
1345
|
+
constructor(page){
|
|
1346
|
+
super(page);
|
|
1347
|
+
}
|
|
1348
|
+
async getAttachmentsListCount() {
|
|
1349
|
+
return await this.page.locator(".attachments tr").count();
|
|
1350
|
+
}
|
|
1351
|
+
async uploadFile(filePath) {
|
|
1352
|
+
const fileChooserPromise = this.page.waitForEvent("filechooser");
|
|
1353
|
+
await this.page.locator('input[type="file"]').click();
|
|
1354
|
+
const fileChooser = await fileChooserPromise;
|
|
1355
|
+
await fileChooser.setFiles(filePath);
|
|
1356
|
+
}
|
|
1357
|
+
async expectWithAttachment(filename) {
|
|
1358
|
+
await (0, $hOLA6$expect)(this.page.locator(".attachments tr td a").filter({
|
|
1359
|
+
hasText: filename
|
|
1360
|
+
})).toBeVisible();
|
|
1361
|
+
}
|
|
1362
|
+
async expectWithNoAttachment(filename) {
|
|
1363
|
+
const test = await this.page.locator(".attachments").isVisible();
|
|
1364
|
+
if (test) await (0, $hOLA6$expect)(this.page.locator(".attachments tr td a").filter({
|
|
1365
|
+
hasText: filename
|
|
1366
|
+
})).not.toBeVisible();
|
|
1367
|
+
}
|
|
1368
|
+
async downloadFile(filename) {
|
|
1369
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1370
|
+
const downloadPromise1 = this.page.waitForEvent("download");
|
|
1371
|
+
await this.page.getByText(filename).click();
|
|
1372
|
+
const download = await downloadPromise1;
|
|
1373
|
+
// Wait for the download process to complete and save the downloaded file in given path.
|
|
1374
|
+
await download.saveAs("./core/xlr-ui/build/playwright/" + download.suggestedFilename());
|
|
1375
|
+
(0, $hOLA6$expect)(download.suggestedFilename()).toBe(filename);
|
|
1376
|
+
}
|
|
1377
|
+
async deleteAttachment(fileName) {
|
|
1378
|
+
await this.page.getByRole("row", {
|
|
1379
|
+
name: fileName
|
|
1380
|
+
}).locator("span").click();
|
|
1381
|
+
await this.page.getByText("Remove").click();
|
|
1382
|
+
}
|
|
1383
|
+
async save() {
|
|
1384
|
+
await this.page.getByRole("button", {
|
|
1385
|
+
name: "Save"
|
|
1386
|
+
}).click({
|
|
1387
|
+
timeout: 8000
|
|
1388
|
+
});
|
|
1389
|
+
await (0, $hOLA6$expect)(this.page.locator(".form-footer .last-saved")).toBeVisible();
|
|
1390
|
+
}
|
|
1391
|
+
async reset() {
|
|
1392
|
+
await this.page.getByRole("button", {
|
|
1393
|
+
name: "Reset"
|
|
1394
|
+
}).waitFor();
|
|
1395
|
+
await this.page.getByRole("button", {
|
|
1396
|
+
name: "Reset"
|
|
1397
|
+
}).click();
|
|
1398
|
+
}
|
|
1399
|
+
async removeDueDate() {
|
|
1400
|
+
await this.page.locator(".due-date .close-icon").click();
|
|
1401
|
+
}
|
|
1402
|
+
async setScheduledStartDate(date, monthYear) {
|
|
1403
|
+
await this.page.locator(`.scheduled-start-date .date`).click();
|
|
1404
|
+
const prev = this.page.locator(".datepicker-days .prev");
|
|
1405
|
+
const next = this.page.locator(".datepicker-days .next");
|
|
1406
|
+
const monYear = this.page.locator(".datepicker-days .datepicker-switch");
|
|
1407
|
+
const thisMonth = (0, $hOLA6$moment)(monthYear, "MMMM YYYY").isBefore();
|
|
1408
|
+
while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
|
|
1409
|
+
else await next.click();
|
|
1410
|
+
await this.page.getByRole("cell", {
|
|
1411
|
+
name: "" + date + ""
|
|
1412
|
+
}).first().click();
|
|
1413
|
+
}
|
|
1414
|
+
async setDuration(days, hours, mins) {
|
|
1415
|
+
await this.page.locator(".duration-editor").click();
|
|
1416
|
+
if (typeof days !== "undefined") await this.page.locator(".days").fill(days);
|
|
1417
|
+
if (typeof hours !== "undefined") await this.page.locator(".hours").fill(hours);
|
|
1418
|
+
if (typeof mins !== "undefined") await this.page.locator(".minutes").fill(mins);
|
|
1419
|
+
}
|
|
1420
|
+
async expectScheduledStartDateToBe(date) {
|
|
1421
|
+
(0, $hOLA6$expect)(await this.page.locator(`.scheduled-start-date .date input`).getAttribute("value")).toBe(date);
|
|
1422
|
+
}
|
|
1423
|
+
async expectDueDateToBe(date) {
|
|
1424
|
+
(0, $hOLA6$expect)(await this.page.locator(".due-date .date-editor .date > .light-text").getAttribute("value")).toContain(date);
|
|
1425
|
+
}
|
|
1426
|
+
async expectedDueDateTime(time) {
|
|
1427
|
+
(0, $hOLA6$expect)(await this.page.locator(".due-date .date-editor .time-picker-holder input").getAttribute("value")).toContain(time);
|
|
1428
|
+
}
|
|
1429
|
+
async expectDurationToBe(duration) {
|
|
1430
|
+
(0, $hOLA6$expect)(await this.page.locator(".duration-editor").textContent()).toBe(duration);
|
|
1431
|
+
}
|
|
1432
|
+
async setUsername(username) {
|
|
1433
|
+
await this.page.locator(".script-username").click();
|
|
1434
|
+
await this.page.locator("user-input-with-variable").getByLabel("*").fill(username);
|
|
1435
|
+
await this.page.locator("user-input-with-variable").press("Enter");
|
|
1436
|
+
}
|
|
1437
|
+
async setPassword(password) {
|
|
1438
|
+
await this.page.locator(".field > .display").click();
|
|
1439
|
+
await this.page.locator('input[name="scriptUserPassword"]').fill(password);
|
|
1440
|
+
await this.page.locator('input[name="scriptUserPassword"]').press("Enter");
|
|
1441
|
+
}
|
|
1442
|
+
async expectScriptUsernameToBe(username) {
|
|
1443
|
+
(0, $hOLA6$expect)(await this.page.locator(".script-username").textContent()).toContain(username);
|
|
1444
|
+
}
|
|
1445
|
+
async expectScriptUserPasswordToBe(password) {
|
|
1446
|
+
(0, $hOLA6$expect)(await this.page.locator('span[name="scriptUserPassword"]').textContent()).toContain(password);
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
|
|
1451
|
+
|
|
1452
|
+
class $e83a7515970cee7f$export$98de9bca7d44fc1a extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
1453
|
+
constructor(page){
|
|
1454
|
+
super(page);
|
|
1455
|
+
}
|
|
1456
|
+
async setName(name) {
|
|
1457
|
+
await this.page.locator("#release-form-title").fill(name);
|
|
1458
|
+
}
|
|
1459
|
+
async setDescription(description) {
|
|
1460
|
+
await this.page.getByText("Set description...").click();
|
|
1461
|
+
await this.page.locator("span").filter({
|
|
1462
|
+
hasText: "Set description... * Save"
|
|
1463
|
+
}).locator("i").first().click();
|
|
1464
|
+
await this.page.locator("textarea").click();
|
|
1465
|
+
await this.page.locator("textarea").fill(description);
|
|
1466
|
+
await this.page.getByText("Save", {
|
|
1467
|
+
exact: true
|
|
1468
|
+
}).click();
|
|
1469
|
+
}
|
|
1470
|
+
async create() {
|
|
1471
|
+
await this.page.getByRole("button", {
|
|
1472
|
+
name: "Create"
|
|
1473
|
+
}).click();
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
|
|
1478
|
+
|
|
1479
|
+
|
|
1480
|
+
class $8f36d138075416d2$export$899a7095bab1879d extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
1481
|
+
constructor(page){
|
|
1482
|
+
super(page);
|
|
1483
|
+
}
|
|
1484
|
+
async expectAllowConcurrentReleasesFromTrigger(expectedValue) {
|
|
1485
|
+
if (expectedValue) {
|
|
1486
|
+
await this.page.locator(".col-xs-2 .trigger-item-state").textContent({
|
|
1487
|
+
timeout: 3000
|
|
1488
|
+
});
|
|
1489
|
+
(0, $hOLA6$expect)(await this.page.locator(".col-xs-2 .trigger-item-state").textContent()).toContain("Enabled");
|
|
1490
|
+
} else {
|
|
1491
|
+
await this.page.locator(".col-xs-2 .trigger-item-state").textContent({
|
|
1492
|
+
timeout: 3000
|
|
1493
|
+
});
|
|
1494
|
+
(0, $hOLA6$expect)(await this.page.locator(".col-xs-2 .trigger-item-state").textContent()).toContain("Disabled");
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
async setAllowConcurrentReleasesFromTriggerAndSubmit(checked) {
|
|
1498
|
+
const result = await this.page.locator(".col-xs-2 .trigger-item-state").textContent({
|
|
1499
|
+
timeout: 3000
|
|
1500
|
+
});
|
|
1501
|
+
if (result === "Enabled" && checked === false || result == "Disabled" && checked === true) await this.page.locator('form[name="releaseTriggerOptions"] label[for="cb"]').click();
|
|
1502
|
+
}
|
|
1503
|
+
async expectTriggersVisible(amount) {
|
|
1504
|
+
await (0, $hOLA6$expect)(this.page.locator(".xlr-trigger-row .trigger-row-content")).toHaveCount(amount);
|
|
1505
|
+
}
|
|
1506
|
+
async expectNoNewTriggerButtonShown() {
|
|
1507
|
+
await (0, $hOLA6$expect)(this.page.locator(".trigger-header a.button.primary")).not.toBeVisible();
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
|
|
1512
|
+
class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
1513
|
+
constructor(page){
|
|
1514
|
+
super(page);
|
|
1515
|
+
this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
|
|
1516
|
+
this.properties = new (0, $880dec03c4eca8dc$export$ccf2756779bad715)(page);
|
|
1517
|
+
this.createTemplatePage = new (0, $e83a7515970cee7f$export$98de9bca7d44fc1a)(page);
|
|
1518
|
+
this.triggers = new (0, $8f36d138075416d2$export$899a7095bab1879d)(page);
|
|
1519
|
+
}
|
|
1520
|
+
async openTemplateMenu(menuItem) {
|
|
1521
|
+
await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
|
|
1522
|
+
exact: true
|
|
1523
|
+
}).click();
|
|
1524
|
+
}
|
|
1525
|
+
async openTaskDrawer(taskName) {
|
|
1526
|
+
await this.page.getByText(taskName, {
|
|
1527
|
+
exact: true
|
|
1528
|
+
}).click();
|
|
1529
|
+
return this.taskDrawer;
|
|
1530
|
+
}
|
|
1531
|
+
async openTaskDrawerFromGrantt(taskName) {
|
|
1532
|
+
await this.page.locator(".gantt_tree_content").getByText(taskName, {
|
|
1533
|
+
exact: true
|
|
1534
|
+
}).dblclick();
|
|
1535
|
+
return this.taskDrawer;
|
|
1536
|
+
}
|
|
1537
|
+
async openProperties() {
|
|
1538
|
+
await this.openTemplateMenu("Properties");
|
|
1539
|
+
}
|
|
1540
|
+
async openTriggers() {
|
|
1541
|
+
await this.openTemplateMenu("Triggers");
|
|
1542
|
+
}
|
|
1543
|
+
async backToTemplate() {
|
|
1544
|
+
await this.page.locator(".icon-back").click();
|
|
1545
|
+
await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Templates")).toBeVisible();
|
|
1546
|
+
}
|
|
1547
|
+
async expectTemplateLabelToBePresent() {
|
|
1548
|
+
await (0, $hOLA6$expect)(this.page.locator(".dot-chip").filter({
|
|
1549
|
+
hasText: "TEMPLATE"
|
|
1550
|
+
})).toBeVisible();
|
|
1551
|
+
}
|
|
1552
|
+
async expectSubPage(menuItem, toBePresent) {
|
|
1553
|
+
if (toBePresent) await (0, $hOLA6$expect)(this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
|
|
1554
|
+
exact: true
|
|
1555
|
+
})).toBeVisible();
|
|
1556
|
+
else await (0, $hOLA6$expect)(this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
|
|
1557
|
+
exact: true
|
|
1558
|
+
})).not.toBeVisible();
|
|
1559
|
+
}
|
|
1560
|
+
async openFlowView() {
|
|
1561
|
+
await this.page.locator(".xl-icon.column-icon").click();
|
|
1562
|
+
await (0, $hOLA6$expect)(this.page.locator("#release-content")).toBeVisible();
|
|
1563
|
+
}
|
|
1564
|
+
async openTableView() {
|
|
1565
|
+
await this.page.locator(".xl-icon.table-icon").click();
|
|
1566
|
+
await (0, $hOLA6$expect)(this.page.locator(".release-grid-container")).toBeVisible();
|
|
1567
|
+
}
|
|
1568
|
+
async openPlannerView() {
|
|
1569
|
+
await this.page.locator(".xl-icon.planner-icon").click();
|
|
1570
|
+
await (0, $hOLA6$expect)(this.page.locator(".gantt-container")).toBeVisible();
|
|
1571
|
+
}
|
|
1572
|
+
async openCodeView() {
|
|
1573
|
+
await this.page.locator(".xl-icon.code-icon").click();
|
|
1574
|
+
await (0, $hOLA6$expect)(this.page.locator("#dsl-content")).toBeVisible();
|
|
1575
|
+
}
|
|
1576
|
+
async expandGanttFolder() {
|
|
1577
|
+
const icExpandTreeview1 = this.page.locator(".gantt_tree_icon.gantt_open");
|
|
1578
|
+
for (const element of (await icExpandTreeview1.all())){
|
|
1579
|
+
const blnVal = await element.isVisible();
|
|
1580
|
+
if (blnVal) {
|
|
1581
|
+
await element.click();
|
|
1582
|
+
await this.expandGanttFolder();
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
|
|
1589
|
+
|
|
1590
|
+
|
|
1591
|
+
class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
1592
|
+
constructor(page){
|
|
1593
|
+
super(page);
|
|
1594
|
+
}
|
|
1595
|
+
async openTemplatesList(filter) {
|
|
1596
|
+
let url = "/templates";
|
|
1597
|
+
if (filter) url += `?has_filter&filter=${filter}`;
|
|
1598
|
+
await this.page.goto(url);
|
|
1599
|
+
}
|
|
1600
|
+
async searchBy(criteria) {
|
|
1601
|
+
await this.page.locator(".searchFilter").clear();
|
|
1602
|
+
await this.page.locator(".searchFilter").fill(criteria);
|
|
1603
|
+
}
|
|
1604
|
+
async copy(originTitle, targetTitle) {
|
|
1605
|
+
await this.page.locator(".title").filter({
|
|
1606
|
+
hasText: originTitle
|
|
1607
|
+
}).locator(".copy").click();
|
|
1608
|
+
await this.page.getByLabel("Template name").clear();
|
|
1609
|
+
await this.page.getByLabel("Template name").fill(targetTitle);
|
|
1610
|
+
await this.page.getByLabel("Description").clear();
|
|
1611
|
+
await this.page.getByLabel("Description").fill("description");
|
|
1612
|
+
await this.page.getByRole("button", {
|
|
1613
|
+
name: "Continue"
|
|
1614
|
+
}).click();
|
|
1615
|
+
await (0, $hOLA6$expect)(this.page.locator(".dot-chip").filter({
|
|
1616
|
+
hasText: "TEMPLATE"
|
|
1617
|
+
})).toBeVisible();
|
|
1618
|
+
}
|
|
1619
|
+
async expectTemplateVisible(title, expected = true) {
|
|
1620
|
+
if (expected) {
|
|
1621
|
+
await this.page.locator(".template").filter({
|
|
1622
|
+
hasText: title
|
|
1623
|
+
}).waitFor();
|
|
1624
|
+
(0, $hOLA6$expect)(this.page.locator(".template").filter({
|
|
1625
|
+
hasText: title
|
|
1626
|
+
})).toBeVisible();
|
|
1627
|
+
} else {
|
|
1628
|
+
await this.page.locator(".template").filter({
|
|
1629
|
+
hasText: title
|
|
1630
|
+
}).waitFor();
|
|
1631
|
+
(0, $hOLA6$expect)(this.page.locator(".template").filter({
|
|
1632
|
+
hasText: title
|
|
1633
|
+
})).not.toBeVisible();
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
async delete(title) {
|
|
1637
|
+
await this.page.locator(".title").filter({
|
|
1638
|
+
hasText: title
|
|
1639
|
+
}).locator(".delete").waitFor();
|
|
1640
|
+
await this.page.locator(".title").filter({
|
|
1641
|
+
hasText: title
|
|
1642
|
+
}).locator(".delete").click();
|
|
1643
|
+
await this.page.getByRole("button", {
|
|
1644
|
+
name: "Delete"
|
|
1645
|
+
}).click();
|
|
1646
|
+
await (0, $hOLA6$expect)(this.page.locator(".title").filter({
|
|
1647
|
+
hasText: title
|
|
1648
|
+
})).not.toBeVisible();
|
|
1649
|
+
}
|
|
1650
|
+
async clickCreateNewTemplate() {
|
|
1651
|
+
await this.page.getByTestId("dot-button").click();
|
|
1652
|
+
await this.page.getByRole("menuitem", {
|
|
1653
|
+
name: "Create new template"
|
|
1654
|
+
}).click();
|
|
1655
|
+
}
|
|
1656
|
+
async openTemplateByName(templateName) {
|
|
1657
|
+
await this.page.getByPlaceholder("Filter by title...", {
|
|
1658
|
+
exact: true
|
|
1659
|
+
}).click();
|
|
1660
|
+
await this.page.getByPlaceholder("Filter by title...", {
|
|
1661
|
+
exact: true
|
|
1662
|
+
}).fill(templateName);
|
|
1663
|
+
await this.page.getByPlaceholder("Filter by title...", {
|
|
1664
|
+
exact: true
|
|
1665
|
+
}).press("Enter");
|
|
1666
|
+
await this.page.locator(`.template`).filter({
|
|
1667
|
+
hasText: templateName
|
|
1668
|
+
}).locator(`.raised-link`).waitFor();
|
|
1669
|
+
await this.page.locator(`.template`).filter({
|
|
1670
|
+
hasText: templateName
|
|
1671
|
+
}).locator(`.raised-link`).click();
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
|
|
949
1676
|
class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
950
1677
|
constructor(page){
|
|
951
1678
|
this.page = page;
|
|
@@ -953,9 +1680,13 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
|
953
1680
|
this.settingsMenu = new (0, $f1bf370bb7f683ca$export$1d7840d5cdc861d5)(page);
|
|
954
1681
|
this.usersPage = new (0, $2cb6a6ac6b17e85f$export$107317390f5aa598)(page);
|
|
955
1682
|
this.applicationPage = new (0, $c313b10398604df2$export$1533b625ec0c75e2)(page);
|
|
1683
|
+
this.taskListPage = new (0, $c37c93912f458e81$export$60c3bfa6385e2a10)(page);
|
|
1684
|
+
this.templatePage = new (0, $0c4084f199d70d72$export$8c8e7207254accc2)(page);
|
|
1685
|
+
this.templateListPage = new (0, $171d52b372748c0b$export$7e1d435fa474ee21)(page);
|
|
956
1686
|
this.taskDetailsPage = new (0, $9ca6e63d357957dd$export$922081b54f2ab994)(page);
|
|
957
1687
|
this.releaseCalendarPage = new (0, $3a340a3f4fd8f04d$export$43682cddead1dd78)(page);
|
|
958
1688
|
this.releaseListPage = new (0, $5359280e98d97ff9$export$a678525e79c4ccc4)(page);
|
|
1689
|
+
this.util = new (0, $aa992f812fb1e470$export$6adb8dd3f0d1e432)(page);
|
|
959
1690
|
}
|
|
960
1691
|
async openTemplate(id) {
|
|
961
1692
|
return this.openReleaseOrTemplate(id, false);
|
|
@@ -1055,6 +1786,14 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
|
1055
1786
|
await this.page.waitForSelector("#release");
|
|
1056
1787
|
return new (0, $43cbcdfccb6c2a76$export$f43492e8ac3c566)(this.page);
|
|
1057
1788
|
}
|
|
1789
|
+
async collapseSideView() {
|
|
1790
|
+
await this.page.locator('.dot-tooltip[aria-label="Collapse"]').click();
|
|
1791
|
+
await (0, $hOLA6$expect)(this.page.locator('.dot-tooltip[aria-label="Collapse"]')).not.toBeVisible();
|
|
1792
|
+
}
|
|
1793
|
+
async expandSideView() {
|
|
1794
|
+
await this.page.locator('.dot-tooltip[aria-label="Expand"]').click();
|
|
1795
|
+
await (0, $hOLA6$expect)(this.page.locator('.dot-tooltip[aria-label="Expand"]')).not.toBeVisible();
|
|
1796
|
+
}
|
|
1058
1797
|
}
|
|
1059
1798
|
|
|
1060
1799
|
|
|
@@ -1268,9 +2007,12 @@ const $80c3ae34677b4324$export$e0969da9b8fb378d = (0, $hOLA6$test).extend({
|
|
|
1268
2007
|
}
|
|
1269
2008
|
});
|
|
1270
2009
|
class $80c3ae34677b4324$var$Fixtures {
|
|
2010
|
+
archivedReleaseIds = [];
|
|
1271
2011
|
releaseIds = [];
|
|
1272
2012
|
triggerIds = [];
|
|
1273
2013
|
configurationIds = [];
|
|
2014
|
+
globalVariableIds = [];
|
|
2015
|
+
folderIds = [];
|
|
1274
2016
|
usernames = [];
|
|
1275
2017
|
userProfiles = [];
|
|
1276
2018
|
constructor(request, page){
|
|
@@ -1282,12 +2024,38 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
1282
2024
|
this.releaseIds.push(release.id);
|
|
1283
2025
|
return this.deleteRelease(release.id).then(()=>this.deleteArchivedRelease(release.id)).then(()=>this.doPost("fixtures/release", release));
|
|
1284
2026
|
}
|
|
2027
|
+
archivedRelease(release) {
|
|
2028
|
+
this.initDefaults(release);
|
|
2029
|
+
this.archivedReleaseIds.push(release.id);
|
|
2030
|
+
return this.doPost("fixtures/archived", release);
|
|
2031
|
+
}
|
|
1285
2032
|
configuration(ci) {
|
|
1286
2033
|
this.configurationIds.push(ci.id);
|
|
1287
2034
|
return this.doPost("fixtures/shared", [
|
|
1288
2035
|
ci
|
|
1289
2036
|
]);
|
|
1290
2037
|
}
|
|
2038
|
+
getParentId(id) {
|
|
2039
|
+
return id.substring(0, id.lastIndexOf("/"));
|
|
2040
|
+
}
|
|
2041
|
+
async folder(folder) {
|
|
2042
|
+
const parentId = this.getParentId(folder.id);
|
|
2043
|
+
folder.type = "xlrelease.Folder";
|
|
2044
|
+
//ToDo: Add system teams
|
|
2045
|
+
const teams = folder.teams;
|
|
2046
|
+
delete folder.teams;
|
|
2047
|
+
//ToDo: Add Children
|
|
2048
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */ const children = folder.children || [];
|
|
2049
|
+
delete folder.children;
|
|
2050
|
+
if (teams) return this.doPost(`api/v1/folders/${folder.id}/teams`, teams);
|
|
2051
|
+
return this.doPost(`api/v1/folders/${parentId}`, folder);
|
|
2052
|
+
}
|
|
2053
|
+
createFolder(folderJson) {
|
|
2054
|
+
folderJson.type = "xlrelease.Folder";
|
|
2055
|
+
return this.doPost(`fixtures/folders`, [
|
|
2056
|
+
folderJson
|
|
2057
|
+
]);
|
|
2058
|
+
}
|
|
1291
2059
|
trigger(trigger) {
|
|
1292
2060
|
this.triggerIds.push(trigger.id);
|
|
1293
2061
|
return this.doPost("fixtures/trigger", trigger);
|
|
@@ -1319,8 +2087,19 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
1319
2087
|
id
|
|
1320
2088
|
]);
|
|
1321
2089
|
}
|
|
1322
|
-
|
|
1323
|
-
|
|
2090
|
+
deleteFolder(folderId) {
|
|
2091
|
+
const id = this.doGet(`api/v1/folders/${folderId}`);
|
|
2092
|
+
return this.doDelete(`api/v1/folders/${id}`);
|
|
2093
|
+
}
|
|
2094
|
+
activityLogs(id, logs) {
|
|
2095
|
+
return this.doPost(`fixtures/activityLogs/${id}`, logs);
|
|
2096
|
+
}
|
|
2097
|
+
globalVariable(variable) {
|
|
2098
|
+
variable.id = variable.id || `Configuration/variables/global/Variable_${variable.key}`;
|
|
2099
|
+
this.globalVariableIds.push(variable.id);
|
|
2100
|
+
variable.requiresValue = false;
|
|
2101
|
+
variable.showOnReleaseStart = false;
|
|
2102
|
+
return this.doPost("api/v1/config/Configuration/variables/global", variable);
|
|
1324
2103
|
}
|
|
1325
2104
|
async cleanAll() {
|
|
1326
2105
|
for (const username of this.usernames)await this.deleteUser(username);
|
|
@@ -1328,6 +2107,8 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
1328
2107
|
for (const triggerId of this.triggerIds)await this.deleteTrigger(triggerId);
|
|
1329
2108
|
for (const releaseId of this.releaseIds.reverse())await this.deleteRelease(releaseId);
|
|
1330
2109
|
for (const confId of this.configurationIds)await this.deleteConfiguration(confId);
|
|
2110
|
+
for (const folderId of this.folderIds.reverse())await this.deleteFolder(folderId);
|
|
2111
|
+
this.folderIds = [];
|
|
1331
2112
|
this.releaseIds = [];
|
|
1332
2113
|
this.triggerIds = [];
|
|
1333
2114
|
this.configurationIds = [];
|
|
@@ -1397,6 +2178,16 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
1397
2178
|
const summary = json.fields.summary;
|
|
1398
2179
|
(0, $hOLA6$expect)(summary).toBe(expectedSummary);
|
|
1399
2180
|
}
|
|
2181
|
+
async expectContainingAttachments(releaseId, tempFile) {
|
|
2182
|
+
if (releaseId.indexOf("Applications/") === -1) releaseId = "Applications/" + releaseId;
|
|
2183
|
+
await (0, $hOLA6$expect)(async ()=>{
|
|
2184
|
+
const resp = await this.doPost(`fixtures/expectContainingAttachments/${releaseId}`, {
|
|
2185
|
+
name: tempFile,
|
|
2186
|
+
expectedContent: tempFile
|
|
2187
|
+
});
|
|
2188
|
+
(0, $hOLA6$expect)(resp).toBe(true);
|
|
2189
|
+
}).toPass();
|
|
2190
|
+
}
|
|
1400
2191
|
async waitForReleaseStarted(releaseTitle) {
|
|
1401
2192
|
await (0, $hOLA6$expect)(async ()=>{
|
|
1402
2193
|
const resp = await this.doPost("releases/search", {
|