@digital-ai/devops-page-object-release 0.0.21 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.js CHANGED
@@ -26,6 +26,7 @@ class $9626bc9256ce31f7$export$2b65d1d97338f32b {
26
26
 
27
27
 
28
28
 
29
+
29
30
  class $05d91a1d3381a287$export$34addcca3f0ae43f extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
30
31
  constructor(page){
31
32
  super(page);
@@ -56,6 +57,25 @@ class $05d91a1d3381a287$export$34addcca3f0ae43f extends (0, $9626bc9256ce31f7$ex
56
57
  name: "Create"
57
58
  }).click();
58
59
  }
60
+ async expectVariablesCountToBe(count) {
61
+ await (0, $hOLA6$expect)(this.page.locator(".variable-editor .form-group")).toHaveCount(count);
62
+ }
63
+ async expectContainingVariable(variableName, value) {
64
+ (0, $hOLA6$expect)(await this.page.locator(`#form-${variableName} .text span`).textContent()).toBe(value);
65
+ }
66
+ async selectTemplate(templateName) {
67
+ await this.page.getByPlaceholder("No template").click();
68
+ await this.page.getByPlaceholder("No template").clear();
69
+ await this.page.getByPlaceholder("No template").fill(templateName);
70
+ await this.page.getByText(templateName).click();
71
+ }
72
+ async removeTemplate() {
73
+ await this.page.locator(".template-select .close-icon").click();
74
+ }
75
+ async setValueForVariables(variableName, value) {
76
+ await this.page.locator(`#form-${variableName} .display`).click();
77
+ await this.page.locator(`input[name="${variableName}"]`).fill(value);
78
+ }
59
79
  }
60
80
 
61
81
 
@@ -154,25 +174,272 @@ async function $251ce8153733e46f$export$a0f926f04148e5d2(locators) {
154
174
  }
155
175
 
156
176
 
177
+
178
+
179
+
180
+ class $71075ce65fcede1d$export$9b575f14aa5e09a1 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
181
+ constructor(page){
182
+ super(page);
183
+ }
184
+ async openDatePicker(selector) {
185
+ await this.page.locator(`${selector} .date`).click();
186
+ }
187
+ /**
188
+ * Setting date, month and year from calendar picker
189
+ */ async setDate(date, monthYear) {
190
+ const prev = this.page.locator(".datepicker-days .prev");
191
+ const next = this.page.locator(".datepicker-days .next");
192
+ const monYear = this.page.locator(".datepicker-days .datepicker-switch");
193
+ const currentYear = await monYear.textContent();
194
+ const thisMonth = (0, $hOLA6$moment)(monthYear, "MMMM YYYY").isBefore(currentYear);
195
+ while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
196
+ else await next.click();
197
+ await this.page.getByRole("cell", {
198
+ name: "" + date + "",
199
+ exact: true
200
+ }).first().click();
201
+ }
202
+ async expectDurationToBe(duration) {
203
+ (0, $hOLA6$expect)(await this.page.locator(".duration-editor").textContent()).toBe(duration);
204
+ }
205
+ async setDuration(days, hours, mins) {
206
+ if (typeof days !== "undefined") await this.page.locator(".days").fill(days);
207
+ if (typeof hours !== "undefined") await this.page.locator(".hours").fill(hours);
208
+ if (typeof mins !== "undefined") await this.page.locator(".minutes").fill(mins);
209
+ await this.page.keyboard.press("Enter");
210
+ }
211
+ async expectTimeToBe(selector, format, date) {
212
+ if (typeof date === "string") date = new Date(date);
213
+ const formattedDate = (0, $hOLA6$moment)(date).format(format);
214
+ await (0, $hOLA6$expect)(selector).toBeVisible();
215
+ const value = await selector.inputValue();
216
+ (0, $hOLA6$expect)(value).toBe(formattedDate);
217
+ }
218
+ /**
219
+ *
220
+ * @returns Getting current month and year in the format "MonthName YYYY"
221
+ */ async getCurrentMonthYear() {
222
+ const monthNames = [
223
+ "January",
224
+ "February",
225
+ "March",
226
+ "April",
227
+ "May",
228
+ "June",
229
+ "July",
230
+ "August",
231
+ "September",
232
+ "October",
233
+ "November",
234
+ "December"
235
+ ];
236
+ const d = new Date();
237
+ const month = monthNames[d.getMonth()];
238
+ const year = d.getFullYear();
239
+ return `${month} ${year}`;
240
+ }
241
+ /**
242
+ *
243
+ * @returns Getting current date in the format "dd MonthName YYYY"
244
+ */ async getCurrentDate() {
245
+ const d = new Date();
246
+ const date = d.getDate();
247
+ const monthYear = await this.getCurrentMonthYear();
248
+ return `${date} ${monthYear}`;
249
+ }
250
+ /**
251
+ *
252
+ * @param days Number of days to add to current date within the current month
253
+ * @returns
254
+ */ async getFutureDate(days) {
255
+ const d = new Date();
256
+ d.setDate(d.getDate() + days);
257
+ const date = d.getDate();
258
+ const monthYear = await this.getCurrentMonthYear();
259
+ return `${date} ${monthYear}`;
260
+ }
261
+ async removeDate(selector) {
262
+ return await selector.locator(`.remove`).click();
263
+ }
264
+ async expectDateNotDeletable(selector) {
265
+ await (0, $hOLA6$expect)(selector.locator(`.remove`)).not.toBeVisible();
266
+ }
267
+ async expectDateToBe(selector, date) {
268
+ return await this.expectInputContainingDate(selector, date);
269
+ }
270
+ async expectDateToBeInferred(selector) {
271
+ await (0, $hOLA6$expect)(selector.locator(`input.light-text`).first()).toBeVisible();
272
+ }
273
+ async expectNoDate(selector) {
274
+ (0, $hOLA6$expect)(selector.locator(`.date-placeholder`)).toBeVisible();
275
+ }
276
+ async expectInputContainingDate(inputLocator, date) {
277
+ await (0, $hOLA6$expect)(inputLocator).toBeVisible();
278
+ const attribute = await inputLocator.getAttribute("value");
279
+ (0, $hOLA6$expect)(attribute).toContain(date);
280
+ }
281
+ }
282
+
283
+
157
284
  class $f48771b486a3eb8f$export$a87f0ae8695e74be extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
285
+ constructor(page){
286
+ super(page);
287
+ this.addListValue = this.page.locator(".variable-selector .xl-components-input-full input");
288
+ this.addVariableValue = this.page.locator(".variable-value .xl-components-input-full input");
289
+ this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
290
+ this.listAddButton = this.page.getByRole("button", {
291
+ name: "Add"
292
+ });
293
+ }
158
294
  async openVariable(variableKey) {
159
295
  await this.page.locator(`.variables-list .variable`).getByText(variableKey).click();
160
296
  return new $f48771b486a3eb8f$var$ReleaseVariableModal(this.page);
161
297
  }
298
+ async addNewVariable(variableName, labelname, description) {
299
+ await this.page.locator("#action-toolbar").getByTestId("dot-button").click();
300
+ await this.page.fill(`[name="fieldKey"]`, variableName);
301
+ await this.page.locator(".variable-label input").fill(labelname);
302
+ if (description) await this.page.locator(".variable-description input").fill(description);
303
+ }
304
+ async selectVariableTextType(valuename) {
305
+ await this.page.getByRole("combobox").selectOption("StringVariable");
306
+ await this.page.locator(".variable-value").type(valuename);
307
+ }
308
+ async selectVariableListboxType(possiblevalue, defaultValue, required) {
309
+ await this.page.getByRole("combobox").selectOption("DropDownListBox");
310
+ if (possiblevalue instanceof Array) for (const value of possiblevalue){
311
+ await this.addListValue.fill(value);
312
+ await this.listAddButton.click();
313
+ }
314
+ else {
315
+ await this.addListValue.fill(possiblevalue);
316
+ await this.listAddButton.click();
317
+ }
318
+ await this.page.locator(".variable-value select").type(defaultValue);
319
+ if (required) await this.page.getByRole("checkbox").check();
320
+ else await this.page.getByRole("checkbox").uncheck();
321
+ }
322
+ async selectVariablePasswordType(possiblevalue) {
323
+ await this.page.getByRole("combobox").selectOption("PasswordStringVariable");
324
+ await this.page.locator('input[type="password"]').type(possiblevalue);
325
+ }
326
+ async selectVariableCheckboxType() {
327
+ await this.page.getByRole("combobox").selectOption("BooleanVariable");
328
+ await this.page.getByRole("checkbox").check();
329
+ }
330
+ async selectVariableNumberType(possiblevalue) {
331
+ await this.page.getByRole("combobox").selectOption("IntegerVariable");
332
+ await this.page.locator('input[ng-model="var.value"]').fill(possiblevalue);
333
+ }
334
+ async selectVariableMultiListType(possiblevalue1, possiblevalue2) {
335
+ await this.page.getByRole("combobox").selectOption("MultiSelectListBox");
336
+ await this.addListValue.fill(possiblevalue1);
337
+ await this.listAddButton.click();
338
+ await this.addListValue.fill(possiblevalue2);
339
+ await this.listAddButton.click();
340
+ await this.page.locator(".react-tagsinput").click();
341
+ await this.page.getByText("Select all", {
342
+ exact: true
343
+ }).click();
344
+ }
345
+ async addVariableDate() {
346
+ await this.page.getByRole("combobox").selectOption("DateVariable");
347
+ await this.page.getByText("Select date").click();
348
+ }
349
+ async setDate(date, monthYear) {
350
+ await this.dateUtil.setDate(date, monthYear);
351
+ }
352
+ async addVariableKeyValueMap(keys1, values1) {
353
+ await this.page.getByRole("combobox").selectOption("MapStringStringVariable");
354
+ await this.page.getByPlaceholder("key").fill(keys1);
355
+ await this.page.getByPlaceholder("Value").fill(values1);
356
+ await this.listAddButton.click();
357
+ await this.page.locator(".xl-map-string-string-div-buttons .search-icon").click();
358
+ await this.page.getByRole("row", {
359
+ name: "Search"
360
+ }).getByRole("textbox").fill(keys1);
361
+ const detail = await this.page.locator("table.table-condensed span").allInnerTexts();
362
+ (0, $hOLA6$expect)(detail[0]).toEqual(keys1);
363
+ (0, $hOLA6$expect)(detail[1]).toEqual(values1);
364
+ }
365
+ async addVariableSet(possiblevalue1) {
366
+ await this.page.getByRole("combobox").selectOption("SetStringVariable");
367
+ await this.page.locator(".dip-input input").fill(possiblevalue1);
368
+ await this.listAddButton.click();
369
+ }
370
+ async submitTheVariable() {
371
+ const createButton = this.page.locator(".modal-footer .save");
372
+ await (0, $hOLA6$expect)(createButton).toBeEnabled();
373
+ await createButton.scrollIntoViewIfNeeded();
374
+ await createButton.click();
375
+ // Expect is needed here to avoid flackiness on clicking create button
376
+ await (0, $hOLA6$expect)(createButton).not.toBeVisible();
377
+ }
378
+ async expectVariableWithNameValueAndType(name, value, type) {
379
+ const rowLocator = await this.page.locator(".variable .data-row").allTextContents();
380
+ (0, $hOLA6$expect)(rowLocator.toString()).toContain(name);
381
+ (0, $hOLA6$expect)(rowLocator.toString()).toContain(value);
382
+ (0, $hOLA6$expect)(rowLocator.toString()).toContain(type);
383
+ }
384
+ async clickEditVariable(variableName) {
385
+ await this.page.locator("[id='variables-filter']").fill(variableName);
386
+ await this.page.getByText("Edit").first().click();
387
+ return new $f48771b486a3eb8f$var$ReleaseVariableModal(this.page);
388
+ }
389
+ async clickDeleteVariable(variableName) {
390
+ await this.page.locator("[id='variables-filter']").fill(variableName);
391
+ await this.page.locator(".action .delete-icon").first().click();
392
+ return new $f48771b486a3eb8f$var$DeleteVariableModel(this.page);
393
+ }
394
+ async expectVariablesCountToBe(count) {
395
+ await (0, $hOLA6$expect)(this.page.locator(".variable .data-row")).toHaveCount(count);
396
+ }
397
+ async expectVariableNotPresent(variableName) {
398
+ await (0, $hOLA6$expect)(this.page.locator(".variable").filter({
399
+ hasText: variableName
400
+ })).not.toBeVisible();
401
+ }
402
+ async clearSearch() {
403
+ await this.page.locator("[id='variables-filter']").clear();
404
+ }
405
+ async switchPossibleValuesToVariable(variableName) {
406
+ await this.page.locator(".variable-toggle button").click();
407
+ await this.page.locator(".ui-autocomplete-input").fill(variableName);
408
+ await this.page.locator(".ui-menu-item-wrapper").filter({
409
+ hasText: `${variableName}`
410
+ }).click();
411
+ }
412
+ async selectVariableListboxTypeWithVariable(variableName, defaultValue, required) {
413
+ await this.page.getByRole("combobox").selectOption("DropDownListBox");
414
+ await this.page.locator(".variable-toggle button").click();
415
+ await this.page.locator(".ui-autocomplete-input").fill(variableName);
416
+ await this.page.locator(".ui-menu-item-wrapper").filter({
417
+ hasText: `${variableName}`
418
+ }).click();
419
+ await this.page.locator(".variable-value select").type(defaultValue);
420
+ if (required) await this.page.getByRole("checkbox").check();
421
+ else await this.page.getByRole("checkbox").uncheck();
422
+ }
162
423
  }
163
424
  class $f48771b486a3eb8f$var$ReleaseVariableModal extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
425
+ constructor(page){
426
+ super(page);
427
+ this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
428
+ }
164
429
  async expectValue(locators, expectFn) {
165
430
  const [index, locator] = await (0, $251ce8153733e46f$export$a0f926f04148e5d2)(locators);
166
- await expectFn[index](locator);
431
+ expectFn[index](locator);
167
432
  }
168
433
  async expectValueToBe(value) {
169
434
  await this.expectValue([
170
435
  this.page.locator("#modal .variable-value input"),
171
436
  this.page.locator("#modal .variable-value .field-readonly"),
172
- this.page.locator("#modal .variable-value .xl-map-string-string")
437
+ this.page.locator("#modal .variable-value .xl-map-string-string"),
438
+ this.page.locator("#modal .variable-value .xl-list-display-mode .text-container")
173
439
  ], [
174
440
  (l)=>(0, $hOLA6$expect)(l).toHaveValue(value),
175
441
  (l)=>(0, $hOLA6$expect)(l).toHaveText(value),
442
+ (l)=>(0, $hOLA6$expect)(l).toHaveText(value),
176
443
  (l)=>(0, $hOLA6$expect)(l).toHaveText(value)
177
444
  ]);
178
445
  }
@@ -180,16 +447,155 @@ class $f48771b486a3eb8f$var$ReleaseVariableModal extends (0, $9626bc9256ce31f7$e
180
447
  await this.expectValue([
181
448
  this.page.locator("#modal .variable-value input"),
182
449
  this.page.locator("#modal .variable-value .field-readonly"),
183
- this.page.locator("#modal .variable-value .xl-map-string-string")
450
+ this.page.locator("#modal .variable-value .xl-map-string-string"),
451
+ this.page.locator("#modal .variable-value .xl-list-display-mode")
184
452
  ], [
185
453
  (l)=>(0, $hOLA6$expect)(l.inputValue()).toContain(value),
186
454
  (l)=>(0, $hOLA6$expect)(l).toContainText(value),
455
+ (l)=>(0, $hOLA6$expect)(l).toContainText(value),
187
456
  (l)=>(0, $hOLA6$expect)(l).toContainText(value)
188
457
  ]);
189
458
  }
190
459
  async close() {
191
460
  await this.page.locator("#modal .modal-header button.close").click();
192
461
  }
462
+ async expectPossibleValues(possiblevalue) {
463
+ const listLocator = await this.page.locator(".editor .xl-list-row").allInnerTexts();
464
+ if (possiblevalue instanceof Array) for (const value of possiblevalue)(0, $hOLA6$expect)(listLocator).toContain(value);
465
+ else (0, $hOLA6$expect)(listLocator).toContain(possiblevalue);
466
+ }
467
+ async expectPossibleVariableValues(possiblevariablevalue) {
468
+ await (0, $hOLA6$expect)(this.page.locator(".variable-dropdown input")).toHaveValue(possiblevariablevalue);
469
+ }
470
+ async addPossibleValue(value) {
471
+ if (value instanceof Array) for (const li of value){
472
+ await this.page.locator(".xl-components-input-full input").fill(li);
473
+ await this.page.getByRole("button", {
474
+ name: "Add"
475
+ }).click();
476
+ }
477
+ else {
478
+ await this.page.locator(".xl-components-input-full input").fill(value);
479
+ await this.page.getByRole("button", {
480
+ name: "Add"
481
+ }).click();
482
+ }
483
+ }
484
+ async selectVariableValue(defaultValue) {
485
+ await this.page.locator(".variable-value select").selectOption(defaultValue);
486
+ }
487
+ async save() {
488
+ const saveButton = this.page.locator("#modal .modal-footer .save");
489
+ await saveButton.scrollIntoViewIfNeeded();
490
+ await saveButton.click({
491
+ delay: 2000
492
+ });
493
+ // Expect is needed here to avoid flackiness on clicking save button on modal window
494
+ await (0, $hOLA6$expect)(saveButton).not.toBeVisible();
495
+ }
496
+ async createPossibleValuesVariable(variableName) {
497
+ await this.page.locator(".variable-toggle button").click();
498
+ await this.page.locator(".ui-autocomplete-input").fill(variableName);
499
+ await this.page.locator(".ui-menu-item-wrapper").filter({
500
+ hasText: `${variableName}`
501
+ }).click();
502
+ }
503
+ async expectVariableValueToBe(value) {
504
+ (0, $hOLA6$expect)(await this.page.locator('.variable-value select option[selected="selected"]').textContent()).toBe(value);
505
+ }
506
+ async expectNoVariablesInList() {
507
+ await (0, $hOLA6$expect)(this.page.getByText("No variables defined.")).toBeVisible();
508
+ }
509
+ async expectNameInput(value) {
510
+ await (0, $hOLA6$expect)(this.page.locator(`#modal .variable-name input`)).toHaveValue(value);
511
+ }
512
+ async expectLabel(value) {
513
+ await (0, $hOLA6$expect)(this.page.locator("#modal .variable-label input")).toHaveValue(value);
514
+ }
515
+ async expectRequired(value) {
516
+ if (value == true) await (0, $hOLA6$expect)(this.page.locator('.form-group input[ng-model="var.requiresValue"]')).toBeChecked();
517
+ else await (0, $hOLA6$expect)(this.page.locator('.form-group input[ng-model="var.requiresValue"]')).not.toBeChecked();
518
+ }
519
+ async setDescription(description) {
520
+ await this.page.locator(".variable-description input").click();
521
+ await this.page.locator(".variable-description input").clear();
522
+ await this.page.locator(".variable-description input").fill(description);
523
+ }
524
+ async setLabel(labelValue) {
525
+ await this.page.locator(".variable-label input").fill(labelValue);
526
+ }
527
+ async setDate(date, monthYear) {
528
+ await this.page.locator("#modal .date").click();
529
+ await this.dateUtil.setDate(date, monthYear);
530
+ }
531
+ async setValue(value) {
532
+ await this.page.locator(".variable-value input").fill(value);
533
+ }
534
+ }
535
+ class $f48771b486a3eb8f$var$DeleteVariableModel extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
536
+ constructor(page){
537
+ super(page);
538
+ this.model = new $f48771b486a3eb8f$var$ReleaseVariableModal(page);
539
+ this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
540
+ }
541
+ async deleteVariable() {
542
+ await (0, $hOLA6$expect)(this.page.getByRole("heading", {
543
+ name: "Replace and delete"
544
+ })).toBeVisible();
545
+ await this.page.getByRole("button", {
546
+ name: "Delete"
547
+ }).click();
548
+ }
549
+ async replaceItWithVariable(variable) {
550
+ await this.model.createPossibleValuesVariable(variable);
551
+ }
552
+ async replaceItwithValue(value) {
553
+ await this.page.locator(".display").click();
554
+ await this.page.getByLabel("*").fill(value);
555
+ }
556
+ async clickReplaceAndDelete() {
557
+ await this.page.getByRole("button", {
558
+ name: "Replace and delete"
559
+ }).click();
560
+ }
561
+ async addValue(value) {
562
+ await this.page.locator(".xl-components-input-full input").fill(value);
563
+ await this.page.getByRole("button", {
564
+ name: "Add"
565
+ }).click();
566
+ }
567
+ async remove(value) {
568
+ await this.page.locator("li").filter({
569
+ hasText: value
570
+ }).locator("i.close-icon").click();
571
+ }
572
+ async expectReplacementPromptDisplayed() {
573
+ await (0, $hOLA6$expect)(this.page.getByRole("heading", {
574
+ name: "Replace and delete"
575
+ })).toBeVisible();
576
+ }
577
+ async close() {
578
+ await this.page.locator("#modal .modal-header button.close").click();
579
+ }
580
+ async removeItemOnSet(value) {
581
+ await this.page.locator("tr").filter({
582
+ hasText: value
583
+ }).locator("i.close-icon").click();
584
+ }
585
+ async addValueForSet(key, value) {
586
+ await this.page.locator(".input-key").fill(key);
587
+ await this.page.locator(".input-value").fill(value);
588
+ }
589
+ async replaceWithIntegerValue(value) {
590
+ await this.page.locator(".editable").fill(value);
591
+ }
592
+ async replaceForBooleanValue() {
593
+ await this.page.locator(".editor input").click();
594
+ }
595
+ async deleteBySettingDate(date, monthYear) {
596
+ await this.page.locator("#modal .date").click();
597
+ await this.dateUtil.setDate(date, monthYear);
598
+ }
193
599
  }
194
600
 
195
601
 
@@ -425,6 +831,22 @@ class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$ex
425
831
  }).click();
426
832
  }
427
833
  }
834
+ async validateAutoCompleteOptions(descriptionName, expectedDescription, variableSelection) {
835
+ await this.page.getByLabel("Double-click to edit").waitFor({
836
+ timeout: 10000
837
+ });
838
+ await this.page.getByLabel("Double-click to edit").hover();
839
+ await this.page.locator(".markdown-viewer-actions").getByTestId("edit-button").click();
840
+ await this.page.locator("#task-description-input").fill(descriptionName);
841
+ await (0, $hOLA6$expect)(this.page.locator(".dot-popper-content-wrapper .option-name")).toHaveCount(6);
842
+ await this.page.locator(".dot-popper-content-wrapper .option-name").filter({
843
+ hasText: variableSelection
844
+ }).click();
845
+ await this.page.getByRole("button", {
846
+ name: "Save"
847
+ }).click();
848
+ await (0, $hOLA6$expect)(this.page.locator(".phase-link-container").locator(".variable").first()).toHaveText(expectedDescription);
849
+ }
428
850
  }
429
851
  class $90bb70a7e909e500$export$fbbf45eff21470e3 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
430
852
  constructor(page){
@@ -526,6 +948,9 @@ class $69e86f559cdf2bd0$export$15d3f9b095bb5188 extends (0, $9626bc9256ce31f7$ex
526
948
  async expectCommentToContain(text) {
527
949
  await (0, $hOLA6$expect)(this.page.locator(".task-comment .markdown-wrapper p")).toContainText(text);
528
950
  }
951
+ async expectTaskIsCommentable(isCommentable) {
952
+ (0, $hOLA6$expect)(await this.page.locator("#task-comment").count()).toBe(isCommentable ? 1 : 0);
953
+ }
529
954
  }
530
955
 
531
956
 
@@ -589,7 +1014,7 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
589
1014
  });
590
1015
  this.cancelButton = this.page.getByTestId("task-action-cancel");
591
1016
  this.commentBox = this.page.getByTestId("task-action-comment");
592
- this.confirm = this.page.getByTestId("dot-button");
1017
+ this.confirm = this.page.locator(".popper-action-buttons").getByTestId("dot-button");
593
1018
  this.activity = new (0, $69e86f559cdf2bd0$export$15d3f9b095bb5188)(page);
594
1019
  this.attachment = new (0, $9c357602b6f466e7$export$aa59788fdecae2f2)(page);
595
1020
  this.config = new (0, $e44e9af564fb00f7$export$64c93bc7fb9ca44e)(page);
@@ -712,47 +1137,148 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
712
1137
  await this.page.getByTestId("month-and-year").first().click();
713
1138
  }
714
1139
  async removeStartDate() {
715
- await this.page.getByRole("button", {
716
- name: "Set by user"
717
- }).locator(".MuiChip-deleteIcon").click();
1140
+ await this.page.getByRole("button", {
1141
+ name: "Set by user"
1142
+ }).locator(".MuiChip-deleteIcon").click();
1143
+ }
1144
+ async setStartDate(date) {
1145
+ await this.clickOnStartDate();
1146
+ await this.page.locator(".MuiPickersDay-root", {
1147
+ hasText: date
1148
+ }).click();
1149
+ }
1150
+ async assignToMe(userName, existingUsername) {
1151
+ await this.page.getByRole("button", {
1152
+ name: existingUsername
1153
+ }).click();
1154
+ await this.page.getByTestId(`render-option-${userName}`).click();
1155
+ }
1156
+ async setFlag(flagName, flagComment) {
1157
+ await this.page.getByTestId("flag-btn").click();
1158
+ await this.page.getByLabel(flagName).click();
1159
+ await this.page.getByPlaceholder("Set message").click();
1160
+ await this.page.getByPlaceholder("Set message").fill(flagComment);
1161
+ await this.page.getByPlaceholder("Set message").press("Enter");
1162
+ await (0, $hOLA6$expect)(this.page.getByRole("button", {
1163
+ name: `flag icon ${flagComment}`
1164
+ })).toBeVisible();
1165
+ }
1166
+ async expectFlaggedWith(flagName, flagComment) {
1167
+ await this.page.getByRole("button", {
1168
+ name: "flag icon"
1169
+ }).click();
1170
+ const regexPattern = new RegExp(`${flagComment}.*${flagName}`, "i");
1171
+ await (0, $hOLA6$expect)(this.page.getByText(regexPattern)).toBeVisible();
1172
+ }
1173
+ async expectStartDateToBeDisplayed() {
1174
+ await (0, $hOLA6$expect)(this.page.getByTestId("start-date-title")).toHaveCount(1);
1175
+ }
1176
+ async expectEndDateToBeDisplayed() {
1177
+ await (0, $hOLA6$expect)(this.page.getByTestId("end-date-title")).toHaveCount(1);
1178
+ }
1179
+ async expectStartDateAndEndDateToBeDisplayed() {
1180
+ await (0, $hOLA6$expect)(this.page.getByTestId("month-and-year")).toHaveCount(2);
1181
+ }
1182
+ }
1183
+
1184
+
1185
+
1186
+
1187
+
1188
+
1189
+ class $a546aadb4e6fa16a$export$5a82be0a2a261cc6 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1190
+ constructor(page){
1191
+ super(page);
1192
+ this.releaseHeader = this.page.locator(".release-header");
1193
+ }
1194
+ async enableShowDates() {
1195
+ await this.page.locator("#toggleIsDatesColumnsShown").check();
1196
+ }
1197
+ async disableShowDates() {
1198
+ await this.page.locator("#toggleIsDatesColumnsShown").uncheck();
1199
+ }
1200
+ async expectPlanningDataColumnsHidden() {
1201
+ (0, $hOLA6$expect)(await this.page.locator(`#gantt .gantt_grid_data .gantt_row`).first().locator(`.gantt_cell`).count()).toEqual(1);
1202
+ }
1203
+ async expectPlanningDateColumnsShown() {
1204
+ (0, $hOLA6$expect)(await this.page.locator(`#gantt .gantt_grid_data .gantt_row`).first().locator(`.gantt_cell`).count()).toEqual(4);
1205
+ }
1206
+ getRow(phaseName) {
1207
+ return new $a546aadb4e6fa16a$var$GanttRow(this.page, phaseName);
1208
+ }
1209
+ }
1210
+ class $a546aadb4e6fa16a$var$GanttRow extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1211
+ constructor(page, phaseName){
1212
+ super(page);
1213
+ this.phaseName = page.locator(".gantt_row").filter({
1214
+ hasText: phaseName
1215
+ });
1216
+ this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
1217
+ }
1218
+ async getFirstDate() {
1219
+ return this.phaseName.locator(".date-editor .date input").first();
1220
+ }
1221
+ async getLastDate() {
1222
+ return this.phaseName.locator(".date-editor .date input").last();
1223
+ }
1224
+ async getFirstDateEditor() {
1225
+ return this.phaseName.locator(".date-editor").first();
1226
+ }
1227
+ async getLastDateEditor() {
1228
+ return this.phaseName.locator(".date-editor").last();
1229
+ }
1230
+ async setStartDate(date, monthYear) {
1231
+ await (await this.getFirstDate()).click();
1232
+ await this.dateUtil.setDate(date, monthYear);
1233
+ }
1234
+ async setEndDate(date, monthYear) {
1235
+ await (await this.getLastDate()).click();
1236
+ await this.dateUtil.setDate(date, monthYear);
1237
+ }
1238
+ async expectStartDateToBe(date) {
1239
+ const dateTimePicker = await this.getFirstDate();
1240
+ this.dateUtil.expectDateToBe(dateTimePicker, date);
1241
+ }
1242
+ async expectEndDateToBe(date) {
1243
+ const dateTimePicker = await this.getLastDate();
1244
+ this.dateUtil.expectDateToBe(dateTimePicker, date);
1245
+ }
1246
+ async removeStartDate() {
1247
+ const dateTimePicker = await this.getFirstDateEditor();
1248
+ await this.dateUtil.removeDate(dateTimePicker);
718
1249
  }
719
- async setStartDate(date) {
720
- await this.clickOnStartDate();
721
- await this.page.locator(".MuiPickersDay-root", {
722
- hasText: date
723
- }).click();
1250
+ async removeEndDate() {
1251
+ const dateTimePicker = await this.getLastDateEditor();
1252
+ await this.dateUtil.removeDate(dateTimePicker);
724
1253
  }
725
- async assignToMe(userName, existingUsername) {
726
- await this.page.getByRole("button", {
727
- name: existingUsername
728
- }).click();
729
- await this.page.getByTestId(`render-option-${userName}`).click();
1254
+ async expectStartDateToBeInferred() {
1255
+ const dateTimePicker = await this.getFirstDateEditor();
1256
+ await this.dateUtil.expectDateToBeInferred(dateTimePicker);
730
1257
  }
731
- async setFlag(flagName, flagComment) {
732
- await this.page.getByTestId("flag-btn").click();
733
- await this.page.getByLabel(flagName).click();
734
- await this.page.getByPlaceholder("Set message").click();
735
- await this.page.getByPlaceholder("Set message").fill(flagComment);
736
- await this.page.getByPlaceholder("Set message").press("Enter");
737
- await (0, $hOLA6$expect)(this.page.getByRole("button", {
738
- name: `flag icon ${flagComment}`
739
- })).toBeVisible();
1258
+ async expectEndDateToBeInferred() {
1259
+ const dateTimePicker = await this.getLastDateEditor();
1260
+ await this.dateUtil.expectDateToBeInferred(dateTimePicker);
740
1261
  }
741
- async expectFlaggedWith(flagName, flagComment) {
742
- await this.page.getByRole("button", {
743
- name: "flag icon"
744
- }).click();
745
- const regexPattern = new RegExp(`${flagComment}.*${flagName}`, "i");
746
- await (0, $hOLA6$expect)(this.page.getByText(regexPattern)).toBeVisible();
1262
+ async expectStartDateNotDeletable() {
1263
+ const dateTimePicker = await this.getFirstDate();
1264
+ await this.dateUtil.expectDateNotDeletable(dateTimePicker);
747
1265
  }
748
- async expectStartDateToBeDisplayed() {
749
- await (0, $hOLA6$expect)(this.page.getByTestId("start-date-title")).toHaveCount(1);
1266
+ async expectEndDateNotDeletable() {
1267
+ const dateTimePicker = await this.getLastDate();
1268
+ await this.dateUtil.expectDateNotDeletable(dateTimePicker);
750
1269
  }
751
- async expectEndDateToBeDisplayed() {
752
- await (0, $hOLA6$expect)(this.page.getByTestId("end-date-title")).toHaveCount(1);
1270
+ async expectDurationToBe(duration) {
1271
+ (0, $hOLA6$expect)(await this.phaseName.locator(".duration-editor").textContent()).toBe(duration);
753
1272
  }
754
- async expectStartDateAndEndDateToBeDisplayed() {
755
- await (0, $hOLA6$expect)(this.page.getByTestId("month-and-year")).toHaveCount(2);
1273
+ async clickDuration() {
1274
+ await this.phaseName.locator(".duration-editor").first().click();
1275
+ }
1276
+ async removeDuration() {
1277
+ await this.phaseName.click();
1278
+ return await this.phaseName.locator(`.remove-duration`).click();
1279
+ }
1280
+ async expectNoDuration() {
1281
+ (0, $hOLA6$expect)(await this.phaseName.locator(".duration-editor").textContent()).toContain("");
756
1282
  }
757
1283
  }
758
1284
 
@@ -858,7 +1384,8 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
858
1384
  while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
859
1385
  else await next.click();
860
1386
  await this.page.getByRole("cell", {
861
- name: "" + date + ""
1387
+ name: "" + date + "",
1388
+ exact: true
862
1389
  }).first().click();
863
1390
  }
864
1391
  async setScheduledStartTime(hrs, mins, meridian) {
@@ -937,92 +1464,26 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
937
1464
  await this.page.locator("#release-form-abort-on-failure").check();
938
1465
  await (0, $hOLA6$expect)(this.page.locator("#release-form-abort-on-failure")).toBeChecked();
939
1466
  }
1467
+ async expectDescriptionToBe(description) {
1468
+ (0, $hOLA6$expect)(await this.page.locator(".release-description p").textContent()).toContain(description);
1469
+ }
940
1470
  }
941
1471
 
942
1472
 
943
1473
 
944
1474
 
945
-
946
- class $71075ce65fcede1d$export$9b575f14aa5e09a1 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1475
+ class $96c6280ff1c47b81$export$3bc3e140e0dcb075 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
947
1476
  constructor(page){
948
1477
  super(page);
1478
+ this.resetButton = this.page.getByRole("button", {
1479
+ name: "Reset"
1480
+ });
1481
+ this.saveButton = this.page.getByRole("button", {
1482
+ name: "Save"
1483
+ });
949
1484
  }
950
- async openDatePicker(selector) {
951
- await this.page.locator(`${selector} .date`).click();
952
- }
953
- /**
954
- * Setting date, month and year from calendar picker
955
- */ async setDate(date, monthYear) {
956
- const prev = this.page.locator(".datepicker-days .prev");
957
- const next = this.page.locator(".datepicker-days .next");
958
- const monYear = this.page.locator(".datepicker-days .datepicker-switch");
959
- const thisMonth = (0, $hOLA6$moment)(monthYear, "MMMM YYYY").isBefore();
960
- while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
961
- else await next.click();
962
- await this.page.getByRole("cell", {
963
- name: "" + date + ""
964
- }).first().click();
965
- }
966
- async expectDurationToBe(duration) {
967
- (0, $hOLA6$expect)(await this.page.locator(".duration-editor").textContent()).toBe(duration);
968
- }
969
- async setDuration(days, hours, mins) {
970
- await this.page.locator(".duration-editor").click();
971
- if (typeof days !== "undefined") await this.page.locator(".days").fill(days);
972
- if (typeof hours !== "undefined") await this.page.locator(".hours").fill(hours);
973
- if (typeof mins !== "undefined") await this.page.locator(".minutes").fill(mins);
974
- await this.page.keyboard.press("Enter");
975
- }
976
- async expectTimeToBe(selector, format, date) {
977
- if (typeof date === "string") date = new Date(date);
978
- const formattedDate = (0, $hOLA6$moment)(date).format(format);
979
- const input = this.page.locator(`${selector}`);
980
- await (0, $hOLA6$expect)(input).toBeVisible();
981
- const value = await input.inputValue();
982
- (0, $hOLA6$expect)(value).toBe(formattedDate);
983
- }
984
- /**
985
- *
986
- * @returns Getting current month and year in the format "MonthName YYYY"
987
- */ async getCurrentMonthYear() {
988
- const monthNames = [
989
- "January",
990
- "February",
991
- "March",
992
- "April",
993
- "May",
994
- "June",
995
- "July",
996
- "August",
997
- "September",
998
- "October",
999
- "November",
1000
- "December"
1001
- ];
1002
- const d = new Date();
1003
- const month = monthNames[d.getMonth()];
1004
- const year = d.getFullYear();
1005
- return `${month} ${year}`;
1006
- }
1007
- /**
1008
- *
1009
- * @returns Getting current date in the format "dd MonthName YYYY"
1010
- */ async getCurrentDate() {
1011
- const d = new Date();
1012
- const date = d.getDate();
1013
- const monthYear = await this.getCurrentMonthYear();
1014
- return `${date} ${monthYear}`;
1015
- }
1016
- /**
1017
- *
1018
- * @param days Number of days to add to current date within the current month
1019
- * @returns
1020
- */ async getFutureDate(days) {
1021
- const d = new Date();
1022
- d.setDate(d.getDate() + days);
1023
- const date = d.getDate();
1024
- const monthYear = await this.getCurrentMonthYear();
1025
- return `${date} ${monthYear}`;
1485
+ async expectSaveButtonDisabled() {
1486
+ (0, $hOLA6$expect)(this.saveButton).toBeDisabled();
1026
1487
  }
1027
1488
  }
1028
1489
 
@@ -1030,6 +1491,7 @@ class $71075ce65fcede1d$export$9b575f14aa5e09a1 extends (0, $9626bc9256ce31f7$ex
1030
1491
 
1031
1492
 
1032
1493
 
1494
+
1033
1495
  class $87bbb6d35ad31a00$export$f8f26dd395d7e1bd extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1034
1496
  constructor(page){
1035
1497
  super(page);
@@ -1112,7 +1574,10 @@ class $87bbb6d35ad31a00$export$f8f26dd395d7e1bd extends (0, $9626bc9256ce31f7$ex
1112
1574
  class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1113
1575
  constructor(page){
1114
1576
  super(page);
1577
+ this.createPage = new (0, $05d91a1d3381a287$export$34addcca3f0ae43f)(page);
1578
+ this.ganttPage = new (0, $a546aadb4e6fa16a$export$5a82be0a2a261cc6)(page);
1115
1579
  this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
1580
+ this.teamsPermissions = new (0, $96c6280ff1c47b81$export$3bc3e140e0dcb075)(page);
1116
1581
  this.phaseTitle = this.page.locator(".phase .phase-title");
1117
1582
  this.properties = new (0, $c9bb587dd92143c3$export$d1077068a9cc9f17)(page);
1118
1583
  this.variables = new (0, $f48771b486a3eb8f$export$a87f0ae8695e74be)(page);
@@ -1123,11 +1588,14 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
1123
1588
  return new (0, $862f65268e488e83$export$fb932093f944abe4)(this.page);
1124
1589
  }
1125
1590
  async abort(comment = "Abort for testing") {
1126
- await this.page.locator("action-toolbar button", {
1127
- hasText: "Abort"
1591
+ await this.page.getByTestId("abort-btn").waitFor();
1592
+ await this.page.getByTestId("abort-btn").click();
1593
+ await this.page.getByPlaceholder("Give feedback or place a").click();
1594
+ await this.page.getByPlaceholder("Give feedback or place a").fill(comment);
1595
+ await this.page.getByRole("button", {
1596
+ name: "Abort"
1128
1597
  }).click();
1129
- await this.page.locator(".modal textarea").fill(comment);
1130
- await this.page.locator(".modal .continue").click();
1598
+ await (0, $hOLA6$expect)(this.page.locator(".progress-status-and-percentage")).toContainText("Aborted");
1131
1599
  }
1132
1600
  getPhase(phaseName) {
1133
1601
  return new $43cbcdfccb6c2a76$var$Phase(this.page, phaseName);
@@ -1293,9 +1761,9 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
1293
1761
  await this.util.openSideNavMenu("Dashboard");
1294
1762
  await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Dashboard")).toBeVisible();
1295
1763
  }
1296
- async openActivityLogs() {
1297
- await this.util.openSideNavMenu("Activity logs");
1298
- await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Activity logs")).toBeVisible();
1764
+ async openHistory() {
1765
+ await this.util.openSideNavMenu("History");
1766
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("History")).toBeVisible();
1299
1767
  }
1300
1768
  async openReleaseMenu(menuItem) {
1301
1769
  await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
@@ -1337,6 +1805,12 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
1337
1805
  hasText: "TEMPLATE"
1338
1806
  })).not.toBeVisible();
1339
1807
  }
1808
+ async expectAbortedStatusToBePresent() {
1809
+ await this.page.locator(".progress-status-and-percentage").waitFor({
1810
+ timeout: 10000
1811
+ });
1812
+ (0, $hOLA6$expect)(await this.page.locator(".progress-status-and-percentage").textContent()).toContain("Aborted");
1813
+ }
1340
1814
  async openTableView() {
1341
1815
  await this.util.openSideNavMenu("Table");
1342
1816
  await (0, $hOLA6$expect)(this.page.locator(".release-grid-container")).toBeVisible();
@@ -1435,6 +1909,9 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
1435
1909
  hasText: title
1436
1910
  }).locator(`.task-infos .delay-count`)).toBeVisible();
1437
1911
  }
1912
+ async expectOnePhaseDisplayed() {
1913
+ (0, $hOLA6$expect)(await this.page.locator(".phase-content").count()).toBe(1);
1914
+ }
1438
1915
  }
1439
1916
  class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
1440
1917
  constructor(page, phaseName){
@@ -1565,10 +2042,12 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
1565
2042
  await this.dateUtil.expectDurationToBe(duration);
1566
2043
  }
1567
2044
  async setDurationFromPhaseDetails(days, hours, mins) {
2045
+ await this.page.locator(".duration-editor").click();
1568
2046
  await this.dateUtil.setDuration(days, hours, mins);
1569
2047
  }
1570
2048
  async expectDueTimeToBe(format, date) {
1571
- await this.dateUtil.expectTimeToBe(".modal .due-date .time-picker-holder input", format, date);
2049
+ const selector = this.page.locator(".modal .due-date .time-picker-holder input");
2050
+ await this.dateUtil.expectTimeToBe(selector, format, date);
1572
2051
  }
1573
2052
  async deleteTaskInPhase(taskName) {
1574
2053
  await this.page.locator(".task").filter({
@@ -2227,6 +2706,10 @@ class $50c91328c9110668$export$b453f08936c58edb extends (0, $9626bc9256ce31f7$ex
2227
2706
  await this.util.openSideNavMenu("Notifications");
2228
2707
  await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Notifications")).toBeVisible();
2229
2708
  }
2709
+ async openTemplates() {
2710
+ await this.util.openSideNavMenu("Templates");
2711
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Templates")).toBeVisible();
2712
+ }
2230
2713
  }
2231
2714
 
2232
2715
 
@@ -2712,7 +3195,7 @@ class $a5932af323ac015a$export$3cf9c90f870f31bd extends (0, $9626bc9256ce31f7$ex
2712
3195
  })).toBeVisible();
2713
3196
  await (0, $hOLA6$expect)(this.page.getByLabel("Delete token")).toContainText("Delete token");
2714
3197
  await this.page.getByRole("button", {
2715
- name: "delete icon Delete token"
3198
+ name: "delete icon Delete"
2716
3199
  }).click();
2717
3200
  await (0, $hOLA6$expect)(this.page.getByText(tokenName)).not.toBeVisible();
2718
3201
  }
@@ -3188,7 +3671,7 @@ class $3a340a3f4fd8f04d$export$43682cddead1dd78 extends (0, $9626bc9256ce31f7$ex
3188
3671
  await this.page.getByRole("button", {
3189
3672
  name: "Today"
3190
3673
  }).click();
3191
- await this.page.getByText(release_title).click();
3674
+ await this.page.locator(".tl-event-title").getByText(release_title).click();
3192
3675
  await this.page.locator(".release-modal-container").locator(".xl-icon.release-icon").click();
3193
3676
  const releaseurl = `/#/releases/${release_id}`;
3194
3677
  const currentURL = await this.page.url();
@@ -3370,6 +3853,7 @@ class $cc231ea61b77c7a2$export$1a0994e9c202d529 extends (0, $9626bc9256ce31f7$ex
3370
3853
 
3371
3854
 
3372
3855
 
3856
+
3373
3857
  class $c37c93912f458e81$export$60c3bfa6385e2a10 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
3374
3858
  constructor(page){
3375
3859
  super(page);
@@ -3588,6 +4072,8 @@ class $c37c93912f458e81$export$60c3bfa6385e2a10 extends (0, $9626bc9256ce31f7$ex
3588
4072
  class $880dec03c4eca8dc$export$ccf2756779bad715 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
3589
4073
  constructor(page){
3590
4074
  super(page);
4075
+ this.dateUtil = new (0, $71075ce65fcede1d$export$9b575f14aa5e09a1)(page);
4076
+ this.scheduledStartDate = this.page.locator(`.scheduled-start-date .date`);
3591
4077
  }
3592
4078
  async getAttachmentsListCount() {
3593
4079
  return await this.page.locator(".attachments tr").count();
@@ -3644,16 +4130,8 @@ class $880dec03c4eca8dc$export$ccf2756779bad715 extends (0, $9626bc9256ce31f7$ex
3644
4130
  await this.page.locator(".due-date .close-icon").click();
3645
4131
  }
3646
4132
  async setScheduledStartDate(date, monthYear) {
3647
- await this.page.locator(`.scheduled-start-date .date`).click();
3648
- const prev = this.page.locator(".datepicker-days .prev");
3649
- const next = this.page.locator(".datepicker-days .next");
3650
- const monYear = this.page.locator(".datepicker-days .datepicker-switch");
3651
- const thisMonth = (0, $hOLA6$moment)(monthYear, "MMMM YYYY").isBefore();
3652
- while(await monYear.textContent() != monthYear)if (thisMonth) await prev.click();
3653
- else await next.click();
3654
- await this.page.getByRole("cell", {
3655
- name: "" + date + ""
3656
- }).first().click();
4133
+ await this.scheduledStartDate.click();
4134
+ await this.dateUtil.setDate(date, monthYear);
3657
4135
  }
3658
4136
  async setDuration(days, hours, mins) {
3659
4137
  await this.page.locator(".duration-editor").click();
@@ -3755,6 +4233,30 @@ class $8f36d138075416d2$export$899a7095bab1879d extends (0, $9626bc9256ce31f7$ex
3755
4233
 
3756
4234
 
3757
4235
 
4236
+ class $527f56b2e41ad18d$export$e0f84914460c3382 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
4237
+ constructor(page){
4238
+ super(page);
4239
+ }
4240
+ async clickEditVariable(variableName) {
4241
+ await this.page.locator("[id='variables-filter']").fill(variableName);
4242
+ await this.page.getByText("Edit").click();
4243
+ return new $527f56b2e41ad18d$var$TemplateVariableModal(this.page);
4244
+ }
4245
+ }
4246
+ class $527f56b2e41ad18d$var$TemplateVariableModal extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
4247
+ async setLabel(label) {
4248
+ await this.page.locator(".variable-label input").fill(label);
4249
+ }
4250
+ async setDefalutValue(value) {
4251
+ await this.page.locator(".variable-value input").fill(value);
4252
+ }
4253
+ async save() {
4254
+ await this.page.locator("#modal .button.save").click();
4255
+ }
4256
+ }
4257
+
4258
+
4259
+
3758
4260
  class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
3759
4261
  constructor(page){
3760
4262
  super(page);
@@ -3764,6 +4266,7 @@ class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$ex
3764
4266
  this.createTemplatePage = new (0, $e83a7515970cee7f$export$98de9bca7d44fc1a)(page);
3765
4267
  this.triggers = new (0, $8f36d138075416d2$export$899a7095bab1879d)(page);
3766
4268
  this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
4269
+ this.variables = new (0, $527f56b2e41ad18d$export$e0f84914460c3382)(page);
3767
4270
  }
3768
4271
  async openTemplateMenu(menuItem) {
3769
4272
  await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
@@ -3808,9 +4311,9 @@ class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$ex
3808
4311
  await this.util.openSideNavMenu("Dashboard");
3809
4312
  await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Dashboard")).toBeVisible();
3810
4313
  }
3811
- async openActivityLogs() {
3812
- await this.util.openSideNavMenu("Activity logs");
3813
- await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Activity logs")).toBeVisible();
4314
+ async openHistory() {
4315
+ await this.util.openSideNavMenu("History");
4316
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("History")).toBeVisible();
3814
4317
  }
3815
4318
  async openTriggers() {
3816
4319
  await this.openTemplateMenu("Triggers");
@@ -3882,6 +4385,10 @@ class $0c4084f199d70d72$export$8c8e7207254accc2 extends (0, $9626bc9256ce31f7$ex
3882
4385
  hasText: newPhaseName
3883
4386
  })).toBeVisible();
3884
4387
  }
4388
+ async clickNewRelease() {
4389
+ await this.page.getByTestId("new-release-btn").click();
4390
+ await (0, $hOLA6$expect)(this.page.locator(".release-properties-form")).toBeVisible();
4391
+ }
3885
4392
  getPhase(phaseName) {
3886
4393
  return new $0c4084f199d70d72$var$Phase(this.page, phaseName);
3887
4394
  }
@@ -3964,9 +4471,11 @@ class $0c4084f199d70d72$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
3964
4471
 
3965
4472
 
3966
4473
 
4474
+
3967
4475
  class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
3968
4476
  constructor(page){
3969
4477
  super(page);
4478
+ this.templatePage = new (0, $0c4084f199d70d72$export$8c8e7207254accc2)(page);
3970
4479
  }
3971
4480
  async openTemplatesList(filter) {
3972
4481
  let url = "/templates";
@@ -4056,6 +4565,9 @@ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$ex
4056
4565
  await this.page.locator(".title").filter({
4057
4566
  hasText: title
4058
4567
  }).locator(".delete").click();
4568
+ await this.page.locator(".modal .modal-content").waitFor({
4569
+ state: "visible"
4570
+ });
4059
4571
  await this.page.getByRole("button", {
4060
4572
  name: "Delete"
4061
4573
  }).click();
@@ -4086,6 +4598,13 @@ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$ex
4086
4598
  name: "Create new release"
4087
4599
  })).toBeVisible();
4088
4600
  }
4601
+ async createTemplate(templateName, description) {
4602
+ await this.clickCreateNewTemplate();
4603
+ await this.templatePage.createTemplatePage.setName(templateName);
4604
+ await this.templatePage.createTemplatePage.setDescription(description);
4605
+ await this.templatePage.createTemplatePage.create();
4606
+ await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Flow")).toBeVisible();
4607
+ }
4089
4608
  async filterByTitle(templateName) {
4090
4609
  await this.page.getByPlaceholder("Filter by title...", {
4091
4610
  exact: true
@@ -4228,9 +4747,184 @@ class $208f399edeb35aa2$export$7a5b979a220f477c extends (0, $9626bc9256ce31f7$ex
4228
4747
 
4229
4748
 
4230
4749
 
4750
+ class $a4ba753fcd18eb4a$export$539d82a5d70c4909 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
4751
+ constructor(page){
4752
+ super(page);
4753
+ }
4754
+ async getValue(classIdentifier) {
4755
+ return await this.page.locator(`.rz-bubble.${classIdentifier}-label`).innerText();
4756
+ }
4757
+ async setPointerValue(elem, value, isIncrease) {
4758
+ await elem.waitFor({
4759
+ state: "visible"
4760
+ });
4761
+ await elem.click();
4762
+ for(let i = 0; i < value; i++){
4763
+ if (isIncrease) await this.page.keyboard.press("ArrowRight");
4764
+ else await this.page.keyboard.press("ArrowLeft");
4765
+ await elem.click();
4766
+ }
4767
+ }
4768
+ async setValue(identifier, newValue) {
4769
+ const value = await this.getValue(identifier);
4770
+ const initialDiff = newValue - parseInt(value);
4771
+ const elem = this.page.locator(`.rz-pointer-${identifier}`);
4772
+ const diffValue = Math.abs(initialDiff);
4773
+ await this.setPointerValue(elem, diffValue, initialDiff > 0);
4774
+ await this.checkValue(identifier, newValue);
4775
+ }
4776
+ async checkValue(identifier, value) {
4777
+ (0, $hOLA6$expect)(await this.getValue(identifier)).toEqual(value.toString());
4778
+ }
4779
+ async shouldHaveEditButton(present = true) {
4780
+ (0, $hOLA6$expect)(await this.page.locator("#editRisk").isVisible()).toBe(present);
4781
+ }
4782
+ async shouldHaveSaveButton(present = true) {
4783
+ (0, $hOLA6$expect)(await this.page.getByTestId("save-btn").isVisible()).toBe(present);
4784
+ }
4785
+ async startEditGlobalRiskThreshold() {
4786
+ await this.page.locator("#editRisk").click();
4787
+ }
4788
+ async setInitialValues() {
4789
+ await this.setValue("min", 10);
4790
+ await this.setValue("max", 50);
4791
+ }
4792
+ async changeValuesAndSave(minValue, maxValue) {
4793
+ await this.setValue("min", minValue);
4794
+ await this.setValue("max", maxValue);
4795
+ await this.page.locator("#submit").click();
4796
+ }
4797
+ async checkValuesChanged(minValue, maxValue) {
4798
+ await this.checkValue("min", minValue);
4799
+ await this.checkValue("max", maxValue);
4800
+ }
4801
+ async expectRiskProfileToBePresent(title, present = true) {
4802
+ await this.page.locator("#risk-profile-table").waitFor({
4803
+ state: "visible"
4804
+ });
4805
+ (0, $hOLA6$expect)(await this.page.locator(".risk-profile .data-row").filter({
4806
+ hasText: title
4807
+ }).isVisible()).toBe(present);
4808
+ }
4809
+ async expectDefaultRiskProfileToBeFirst() {
4810
+ await this.page.locator("#risk-profile-table").waitFor({
4811
+ state: "visible"
4812
+ });
4813
+ await (0, $hOLA6$expect)(this.page.locator(".risk-profile .data-row .ng-binding").first()).toHaveText("Default risk profile");
4814
+ }
4815
+ async openRiskProfile(title) {
4816
+ await this.page.locator("#risk-profile-table").waitFor({
4817
+ state: "visible"
4818
+ });
4819
+ await this.page.locator(".risk-profile .data-row").filter({
4820
+ hasText: title
4821
+ }).click();
4822
+ return new $a4ba753fcd18eb4a$var$RisksProfilePage(this.page);
4823
+ }
4824
+ async shouldHaveCopyButtonEnabledForRiskProfile(title, enabled = true) {
4825
+ await this.page.locator(".risk-profile .data-row").filter({
4826
+ hasText: title
4827
+ }).waitFor({
4828
+ state: "visible"
4829
+ });
4830
+ (0, $hOLA6$expect)(await this.page.locator(".risk-profile .data-row").filter({
4831
+ hasText: title
4832
+ }).locator(".copy-action").isVisible()).toBe(enabled);
4833
+ }
4834
+ async shouldHaveDeleteButtonEnabledForRiskProfile(title, enabled = true) {
4835
+ await this.page.locator(".risk-profile .data-row").filter({
4836
+ hasText: title
4837
+ }).waitFor({
4838
+ state: "visible"
4839
+ });
4840
+ (0, $hOLA6$expect)(await this.page.locator(`.risk-profile .data-row`).filter({
4841
+ hasText: title
4842
+ }).locator(`.remove-action`).isVisible()).toBe(enabled);
4843
+ }
4844
+ async clickNewRiskProfile() {
4845
+ await this.page.getByTestId("new-risk-btn").waitFor({
4846
+ state: "visible"
4847
+ });
4848
+ await this.page.getByTestId("new-risk-btn").click();
4849
+ return new $a4ba753fcd18eb4a$var$RisksProfilePage(this.page);
4850
+ }
4851
+ async deleteRiskProfile(title) {
4852
+ await this.page.locator(".risk-profile .data-row").filter({
4853
+ hasText: title
4854
+ }).locator(".remove-action").waitFor({
4855
+ state: "visible"
4856
+ });
4857
+ await this.page.locator(".risk-profile .data-row").filter({
4858
+ hasText: title
4859
+ }).locator(".remove-action").click();
4860
+ await this.page.locator(".modal-footer .button.save").click();
4861
+ }
4862
+ async expectSuccessMessageOnRisksPage() {
4863
+ await (0, $hOLA6$expect)(this.page.getByLabel("success")).toBeVisible();
4864
+ await (0, $hOLA6$expect)(this.page.locator(".success").filter({
4865
+ hasText: "Risk Profile Created Successfully"
4866
+ })).toBeVisible();
4867
+ }
4868
+ async copyRiskProfile(title) {
4869
+ await this.page.locator(".risk-profile .data-row").filter({
4870
+ hasText: title
4871
+ }).waitFor({
4872
+ state: "visible"
4873
+ });
4874
+ await this.page.locator(".risk-profile .data-row").filter({
4875
+ hasText: title
4876
+ }).locator(".copy-action").click();
4877
+ }
4878
+ async expectSuccessMessageOnUpdateRiskProfile() {
4879
+ await (0, $hOLA6$expect)(this.page.getByLabel("success")).toBeVisible();
4880
+ await (0, $hOLA6$expect)(this.page.locator(".success").filter({
4881
+ hasText: "Risk Profile Updated Successfully"
4882
+ })).toBeVisible();
4883
+ }
4884
+ async filter(filterText) {
4885
+ await this.page.locator("#risk-profile-filter").waitFor({
4886
+ state: "visible"
4887
+ });
4888
+ await this.page.locator("#risk-profile-filter").clear();
4889
+ await this.page.locator("#risk-profile-filter").fill(filterText);
4890
+ }
4891
+ async shouldHaveNVisibleRiskProfiles(numberOfVisibleRiskProfiles) {
4892
+ await this.page.locator("#risk-profile-table").waitFor({
4893
+ state: "visible"
4894
+ });
4895
+ (0, $hOLA6$expect)(await this.page.locator("#risk-profile-table .data-row").count()).toEqual(numberOfVisibleRiskProfiles);
4896
+ }
4897
+ async shouldHaveNewRiskProfileButton(present = true) {
4898
+ (0, $hOLA6$expect)(await this.page.getByTestId("new-risk-btn").isVisible()).toBe(present);
4899
+ }
4900
+ }
4901
+ class $a4ba753fcd18eb4a$var$RisksProfilePage extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
4902
+ async shouldBeEditable(editable) {
4903
+ const elem = this.page.locator("#riskProfileTitle");
4904
+ if (editable) await (0, $hOLA6$expect)(elem).toBeEnabled();
4905
+ else await (0, $hOLA6$expect)(elem).toBeDisabled();
4906
+ }
4907
+ async setName(name) {
4908
+ await this.page.locator("#riskProfileTitle").waitFor({
4909
+ state: "visible"
4910
+ });
4911
+ await this.page.locator("#riskProfileTitle").click();
4912
+ await this.page.locator("#riskProfileTitle").clear();
4913
+ await this.page.locator("#riskProfileTitle").fill(name);
4914
+ }
4915
+ async save() {
4916
+ await this.page.getByTestId("save-btn").click();
4917
+ await (0, $hOLA6$expect)(this.page.locator("#risk-profile-table")).toBeVisible();
4918
+ }
4919
+ }
4920
+
4921
+
4922
+
4923
+
4231
4924
  class $2cbb78eec86d0a9f$export$2edf430132ca35d0 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
4232
4925
  constructor(page){
4233
4926
  super(page);
4927
+ this.risksPage = new (0, $a4ba753fcd18eb4a$export$539d82a5d70c4909)(page);
4234
4928
  this.util = new (0, $87bbb6d35ad31a00$export$f8f26dd395d7e1bd)(page);
4235
4929
  }
4236
4930
  async openGeneralSettings() {
@@ -4264,6 +4958,7 @@ class $2cbb78eec86d0a9f$export$2edf430132ca35d0 extends (0, $9626bc9256ce31f7$ex
4264
4958
  async openRiskProfiles() {
4265
4959
  await this.util.openSideNavMenu("Risk profiles");
4266
4960
  await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Risk profiles")).toBeVisible();
4961
+ return new (0, $a4ba753fcd18eb4a$export$539d82a5d70c4909)(this.page);
4267
4962
  }
4268
4963
  async openWorkflowCategories() {
4269
4964
  await this.util.openSideNavMenu("Workflow categories");
@@ -4307,6 +5002,16 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
4307
5002
  async openTemplate(id) {
4308
5003
  return this.openReleaseOrTemplate(id, false);
4309
5004
  }
5005
+ async openFolder(id) {
5006
+ await this.page.goto(`./#/folders/${id}/releases`);
5007
+ await this.page.waitForSelector("#releases-content");
5008
+ return new (0, $50c91328c9110668$export$b453f08936c58edb)(this.page);
5009
+ }
5010
+ async openVariablesOnReleasePage(releaseId) {
5011
+ await this.page.goto(`./#/releases/${releaseId}/variables`);
5012
+ await this.page.waitForSelector("#release-variables");
5013
+ return new (0, $f48771b486a3eb8f$export$a87f0ae8695e74be)(this.page);
5014
+ }
4310
5015
  async openRelease(id) {
4311
5016
  return this.openReleaseOrTemplate(id, true);
4312
5017
  }
@@ -4316,83 +5021,88 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
4316
5021
  async openPersonalAccessTokenPage() {
4317
5022
  return new (0, $6720a523bcb1cce0$export$3cac5fd37ae64b91)(this.page).openPersonalAccessTokenPage();
4318
5023
  }
5024
+ async gotoHomePage() {
5025
+ await this.page.locator("ul.side-nav li").getByLabel("Home", {
5026
+ exact: true
5027
+ }).click();
5028
+ }
4319
5029
  async gotoFolderPage() {
4320
- await this.page.locator("ul.side-nav li").getByText("Folders", {
5030
+ await this.page.locator("ul.side-nav li").getByLabel("Folders", {
4321
5031
  exact: true
4322
5032
  }).click();
4323
5033
  }
4324
5034
  async gotoTaskPage() {
4325
- await this.page.locator("ul.side-nav li").getByText("Tasks", {
5035
+ await this.page.locator("ul.side-nav li").getByLabel("Tasks", {
4326
5036
  exact: true
4327
5037
  }).click();
4328
5038
  }
4329
5039
  async gotoReleasePage() {
4330
- await this.page.locator("ul.side-nav li").getByText("Releases", {
5040
+ await this.page.locator("ul.side-nav li").getByLabel("Releases", {
4331
5041
  exact: true
4332
5042
  }).click();
4333
5043
  }
4334
5044
  async gotoWorkflowCatalogPage() {
4335
- await this.page.locator("ul.side-nav li").getByText("Workflow catalog", {
5045
+ await this.page.locator("ul.side-nav li").getByLabel("Workflow catalog", {
4336
5046
  exact: true
4337
5047
  }).click();
4338
5048
  }
4339
5049
  async gotoWorkflowsPage() {
4340
- await this.page.locator("ul.side-nav li").getByText("Workflows", {
5050
+ await this.page.locator("ul.side-nav li").getByLabel("Workflows", {
4341
5051
  exact: true
4342
5052
  }).click();
4343
5053
  }
4344
5054
  async gotoGroupsPage() {
4345
- await this.page.locator("ul.side-nav li").getByText("Groups", {
5055
+ await this.page.locator("ul.side-nav li").getByLabel("Groups", {
4346
5056
  exact: true
4347
5057
  }).click();
4348
5058
  }
4349
5059
  async gotoReleaseCalenderPage() {
4350
- await this.page.locator("ul.side-nav li").getByText("Release calendar", {
5060
+ await this.page.locator("ul.side-nav li").getByLabel("Release calendar", {
4351
5061
  exact: true
4352
5062
  }).click();
4353
5063
  }
4354
5064
  async gotoDeliveriesPage() {
4355
- await this.page.locator("ul.side-nav li").getByText("Deliveries", {
5065
+ await this.page.locator("ul.side-nav li").getByLabel("Deliveries", {
4356
5066
  exact: true
4357
5067
  }).click();
4358
5068
  }
4359
5069
  async gotoTriggersPage() {
4360
- await this.page.locator("ul.side-nav li").getByText("Triggers", {
5070
+ await this.page.locator("ul.side-nav li").getByLabel("Triggers", {
4361
5071
  exact: true
4362
5072
  }).click();
4363
5073
  }
4364
5074
  async gotoDigitalAnalyticsPage() {
4365
- await this.page.locator("ul.side-nav li").getByText("Digital.ai Analytics", {
5075
+ await this.page.locator("ul.side-nav li").getByLabel("Digital.ai Analytics", {
4366
5076
  exact: true
4367
5077
  }).click();
4368
5078
  }
4369
5079
  async gotoReportsPage() {
4370
- await this.page.locator("ul.side-nav li").getByText("Reports", {
5080
+ await this.page.locator("ul.side-nav li").getByLabel("Reports", {
4371
5081
  exact: true
4372
5082
  }).click();
4373
5083
  }
4374
5084
  async gotoTemplatesPage() {
4375
- await this.page.locator("ul.side-nav li").getByText("Templates", {
5085
+ await this.page.locator("ul.side-nav li").getByLabel("Templates", {
4376
5086
  exact: true
4377
5087
  }).click();
4378
5088
  }
4379
5089
  async gotoEnvironmentsPage() {
4380
- await this.page.locator("ul.side-nav li").getByText("Environments", {
5090
+ await this.page.locator("ul.side-nav li").getByLabel("Environments", {
4381
5091
  exact: true
4382
5092
  }).click();
4383
5093
  }
4384
5094
  async gotoEnvironmentsCalenderPage() {
4385
- await this.page.locator("ul.side-nav li").getByText("Environments calendar", {
5095
+ await this.page.locator("ul.side-nav li").getByLabel("Environments calendar", {
4386
5096
  exact: true
4387
5097
  }).click();
4388
5098
  }
4389
5099
  async gotoGobalVariablesPage() {
4390
- await this.page.locator("ul.side-nav li").getByText("Global variables", {
5100
+ await this.page.locator("ul.side-nav li").getByLabel("Global variables", {
4391
5101
  exact: true
4392
5102
  }).click();
4393
5103
  }
4394
5104
  async gotoConnectionsPage() {
4395
- await this.page.locator("ul.side-nav li").getByText("Connections", {
5105
+ await this.page.locator("ul.side-nav li").getByLabel("Connections", {
4396
5106
  exact: true
4397
5107
  }).click();
4398
5108
  }
@@ -4410,6 +5120,9 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
4410
5120
  await this.page.getByLabel("Expand Q").click();
4411
5121
  await (0, $hOLA6$expect)(this.page.getByLabel("Expand Q")).not.toBeVisible();
4412
5122
  }
5123
+ async openRisksProfile() {
5124
+ await this.page.goto("./#/risks");
5125
+ }
4413
5126
  }
4414
5127
 
4415
5128
 
@@ -4656,6 +5369,12 @@ class $80c3ae34677b4324$var$Fixtures {
4656
5369
  ci
4657
5370
  ]);
4658
5371
  }
5372
+ ci(ci) {
5373
+ this.configurationIds.push(ci.id);
5374
+ return this.doPost("fixtures", [
5375
+ ci
5376
+ ]);
5377
+ }
4659
5378
  getParentId(id) {
4660
5379
  return id.substring(0, id.lastIndexOf("/"));
4661
5380
  }
@@ -4711,6 +5430,12 @@ class $80c3ae34677b4324$var$Fixtures {
4711
5430
  permissions(rolePermissions) {
4712
5431
  return this.doPost("fixtures/roles/permissions/global", rolePermissions);
4713
5432
  }
5433
+ globalRoles(rolePrincipals) {
5434
+ return this.doPost(`api/v1/roles/${rolePrincipals.name}`, rolePrincipals);
5435
+ }
5436
+ deleteGlobalRole(roleName) {
5437
+ return this.doDelete(`api/v1/roles/${roleName}`);
5438
+ }
4714
5439
  updateUserProfile(username, profile) {
4715
5440
  profile.id = username;
4716
5441
  profile.type = "xlrelease.UserProfile";