@digital-ai/devops-page-object-release 0.0.59 → 0.0.61

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
@@ -3570,7 +3570,7 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
3570
3570
  }
3571
3571
  async expectSnackbarSuccessMessage(message) {
3572
3572
  const snackbar = this.page.locator('.dot-snackbar[severity="success"]');
3573
- await (0, $hOLA6$expect)(snackbar.locator("p")).toHaveText(message);
3573
+ await (0, $hOLA6$expect)(snackbar.locator('[aria-label="success"]')).toHaveText(message);
3574
3574
  await snackbar.getByRole("button").click();
3575
3575
  }
3576
3576
  async closeContextMenu() {
@@ -3579,6 +3579,12 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
3579
3579
  async expectTaskBorderWithColor(taskName, color) {
3580
3580
  await (0, $hOLA6$expect)(this.page.locator(`.task-box:has-text('${taskName}')`)).toHaveCSS("border-top-color", color);
3581
3581
  }
3582
+ async pasteTaskFromTaskGenerator() {
3583
+ await this.phaseLocator.getByText("Add task").click();
3584
+ const pasteButton = this.page.locator('button[data-testid="paste-copied-task-btn"]');
3585
+ await (0, $hOLA6$expect)(pasteButton).toBeEnabled();
3586
+ await pasteButton.click();
3587
+ }
3582
3588
  async addTaskInPhase(taskTitle, taskGroup, taskType) {
3583
3589
  await this.phaseLocator.getByText("Add task").click();
3584
3590
  await this.page.locator("#task-selector").hover();
@@ -5268,7 +5274,9 @@ class $f1bf370bb7f683ca$export$1d7840d5cdc861d5 extends (0, $9626bc9256ce31f7$ex
5268
5274
  await (0, $hOLA6$expect)(this.page.getByRole("heading", {
5269
5275
  name: "System message"
5270
5276
  })).toBeVisible();
5271
- await this.closeIcon.click();
5277
+ }
5278
+ async closeConfigureSystemMessage() {
5279
+ await this.closeIcon.first().click();
5272
5280
  }
5273
5281
  async configureSystemMessage(message) {
5274
5282
  await this.settingsIcon.click();
@@ -7355,53 +7363,20 @@ class $a4ba753fcd18eb4a$var$RisksProfilePage extends (0, $9626bc9256ce31f7$expor
7355
7363
 
7356
7364
 
7357
7365
 
7358
-
7359
7366
  class $d8a9b26df8057088$export$e0a0fc7a891dfa75 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
7360
7367
  constructor(page){
7361
7368
  super(page);
7362
7369
  }
7363
- async expectCards(cardTitles) {
7364
- await (0, $hOLA6$expect)(this.page.locator(`.settings-card`)).toHaveCount(cardTitles.length);
7365
- for(let i = 0; i < cardTitles.length; i++){
7366
- const cardTitle = cardTitles[i];
7367
- await (0, $hOLA6$expect)(this.page.locator(`.settings-card`).filter({
7368
- hasText: cardTitle
7369
- })).toBeVisible();
7370
- }
7371
- return this;
7372
- }
7373
- async save() {
7374
- await this.page.getByTestId(`save-button`).click();
7375
- await (0, $hOLA6$expect)(this.page.getByLabel("success")).toBeVisible();
7376
- await (0, $hOLA6$expect)(this.page.locator(".success").filter({
7377
- hasText: "Changes saved successfully"
7378
- })).toBeVisible();
7379
- await (0, $hOLA6$expect)(this.page.getByTestId(`save-button`)).toBeDisabled();
7380
- return this;
7381
- }
7382
- async reset() {
7383
- await this.page.getByTestId(`reset-button`).click();
7384
- await (0, $hOLA6$expect)(this.page.getByTestId("reset-button")).toBeDisabled();
7385
- return this;
7386
- }
7387
7370
  }
7388
7371
 
7389
7372
 
7390
7373
 
7391
7374
 
7375
+
7392
7376
  class $ffe2117ab68d6e97$export$c28592575acb4efc extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
7393
7377
  constructor(page){
7394
7378
  super(page);
7395
- }
7396
- async expectCards(cardTitles) {
7397
- await (0, $hOLA6$expect)(this.page.locator(`.settings-card .dot-card-header-title`)).toHaveCount(cardTitles.length);
7398
- for(let i = 0; i < cardTitles.length; i++){
7399
- const cardTitle = cardTitles[i];
7400
- await (0, $hOLA6$expect)(this.page.locator(`.settings-card .dot-card-header-title`).filter({
7401
- hasText: cardTitle
7402
- })).toBeVisible();
7403
- }
7404
- return this;
7379
+ this.settings = new (0, $2cbb78eec86d0a9f$export$2edf430132ca35d0)(page);
7405
7380
  }
7406
7381
  async getFeatureControl(feature, control) {
7407
7382
  return this.page.locator(`.settings-card`).filter({
@@ -7418,15 +7393,6 @@ class $ffe2117ab68d6e97$export$c28592575acb4efc extends (0, $9626bc9256ce31f7$ex
7418
7393
  else await (0, $hOLA6$expect)(this.page.getByTestId(`save-button`)).not.toBeEnabled();
7419
7394
  return this;
7420
7395
  }
7421
- async save() {
7422
- await this.page.getByTestId(`save-button`).click();
7423
- await (0, $hOLA6$expect)(this.page.getByLabel("success")).toBeVisible();
7424
- await (0, $hOLA6$expect)(this.page.locator(".success").filter({
7425
- hasText: "Changes saved successfully"
7426
- })).toBeVisible();
7427
- await (0, $hOLA6$expect)(this.page.getByTestId(`save-button`)).toBeDisabled();
7428
- return this;
7429
- }
7430
7396
  async expectResetToBeEnabled(state) {
7431
7397
  if (state) await (0, $hOLA6$expect)(this.page.getByTestId("reset-button")).toBeEnabled();
7432
7398
  else await (0, $hOLA6$expect)(this.page.getByTestId("reset-button")).not.toBeEnabled();
@@ -7445,6 +7411,508 @@ class $ffe2117ab68d6e97$export$c28592575acb4efc extends (0, $9626bc9256ce31f7$ex
7445
7411
  }
7446
7412
 
7447
7413
 
7414
+
7415
+
7416
+
7417
+ class $a736ba10591716ab$export$c33e44a4a9202d88 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
7418
+ constructor(page){
7419
+ super(page);
7420
+ this.settings = new (0, $2cbb78eec86d0a9f$export$2edf430132ca35d0)(page);
7421
+ }
7422
+ async setStatusPollingInterval(value) {
7423
+ await this.page.locator("#taskStatusInterval").clear();
7424
+ await this.page.locator("#taskStatusInterval").fill(value);
7425
+ return this;
7426
+ }
7427
+ async setListPollingInterval(value) {
7428
+ await this.page.locator("#taskListInterval").clear();
7429
+ await this.page.locator("#taskListInterval").fill(value);
7430
+ return this;
7431
+ }
7432
+ async expectStatusPollingInterval(value) {
7433
+ await (0, $hOLA6$expect)(this.page.locator("#taskStatusInterval")).toHaveValue(value);
7434
+ return this;
7435
+ }
7436
+ async expectListPollingInterval(value) {
7437
+ await (0, $hOLA6$expect)(this.page.locator("#taskListInterval")).toHaveValue(value);
7438
+ return this;
7439
+ }
7440
+ async restoreDefaultPollingSettings() {
7441
+ const defaultTaskStatusInterval = "1";
7442
+ const defaultTaskListInterval = "30";
7443
+ await this.setStatusPollingInterval(defaultTaskStatusInterval);
7444
+ await this.setListPollingInterval(defaultTaskListInterval);
7445
+ await this.settings.save();
7446
+ return this;
7447
+ }
7448
+ }
7449
+
7450
+
7451
+
7452
+
7453
+
7454
+ class $ff784d6668c5e820$export$5c92082c2afdcc2c extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
7455
+ constructor(page){
7456
+ super(page);
7457
+ this.settings = new (0, $2cbb78eec86d0a9f$export$2edf430132ca35d0)(page);
7458
+ }
7459
+ async setWarningThreshold(value) {
7460
+ await this.page.locator("#warningThreshold").clear();
7461
+ await this.page.locator("#warningThreshold").fill(value);
7462
+ return this;
7463
+ }
7464
+ async setErrorThreshold(value) {
7465
+ await this.page.locator("#errorThreshold").clear();
7466
+ await this.page.locator("#errorThreshold").fill(value);
7467
+ return this;
7468
+ }
7469
+ async setCriticalPhaseThreshold(value) {
7470
+ await this.page.locator("#criticalPhaseThreshold").clear();
7471
+ await this.page.locator("#criticalPhaseThreshold").fill(value);
7472
+ return this;
7473
+ }
7474
+ async expectWarningThreshold(value) {
7475
+ await (0, $hOLA6$expect)(this.page.locator("#warningThreshold")).toHaveValue(value);
7476
+ return this;
7477
+ }
7478
+ async expectErrorThreshold(value) {
7479
+ await (0, $hOLA6$expect)(this.page.locator("#errorThreshold")).toHaveValue(value);
7480
+ return this;
7481
+ }
7482
+ async expectCriticalPhaseThreshold(value) {
7483
+ await (0, $hOLA6$expect)(this.page.locator("#criticalPhaseThreshold")).toHaveValue(value);
7484
+ return this;
7485
+ }
7486
+ async restoreDefaultReportSettings() {
7487
+ const defaultWarningThreshold = "2";
7488
+ const defaultErrorThreshold = "4";
7489
+ const defaultCriticalPhaseThreshold = "6";
7490
+ await this.setWarningThreshold(defaultWarningThreshold);
7491
+ await this.setErrorThreshold(defaultErrorThreshold);
7492
+ await this.setCriticalPhaseThreshold(defaultCriticalPhaseThreshold);
7493
+ await this.settings.save();
7494
+ }
7495
+ }
7496
+
7497
+
7498
+
7499
+
7500
+
7501
+ class $4f618685ec16216c$export$3966fb3c0478db68 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
7502
+ constructor(page){
7503
+ super(page);
7504
+ this.settings = new (0, $2cbb78eec86d0a9f$export$2edf430132ca35d0)(page);
7505
+ }
7506
+ async setArchivingSettingsDeleteIntervalUnit(value) {
7507
+ const setDeleteInterval = this.page.locator("select#time-selector-releaseAgeToDeleteFromJcr");
7508
+ await setDeleteInterval.scrollIntoViewIfNeeded();
7509
+ await setDeleteInterval.selectOption(value);
7510
+ return this;
7511
+ }
7512
+ async expectArchivePurgeEnableState(value) {
7513
+ if (value) await (0, $hOLA6$expect)(this.page.locator("#purgingEnabled")).toBeChecked();
7514
+ else await (0, $hOLA6$expect)(this.page.locator("#purgingEnabled")).not.toBeChecked();
7515
+ return this;
7516
+ }
7517
+ async setArchivePurgeEnableState(value) {
7518
+ if (value) await this.page.locator("#purgingEnabled").check({
7519
+ force: true
7520
+ });
7521
+ else await this.page.locator("#purgingEnabled").uncheck({
7522
+ force: true
7523
+ });
7524
+ return this;
7525
+ }
7526
+ async expectConfirmEnableArchivePurgeModal() {
7527
+ await (0, $hOLA6$expect)(this.page.getByRole("heading", {
7528
+ name: "Verify archive purge change"
7529
+ })).toBeVisible();
7530
+ await (0, $hOLA6$expect)(this.page.locator(".dot-dialog")).toBeVisible();
7531
+ return this;
7532
+ }
7533
+ async confirmEnableArchivePurgeModal() {
7534
+ await (0, $hOLA6$expect)(this.page.getByRole("button", {
7535
+ name: "Confirm"
7536
+ })).toBeVisible();
7537
+ await this.page.getByRole("button", {
7538
+ name: "Confirm"
7539
+ }).click();
7540
+ return this;
7541
+ }
7542
+ async cancelEnableArchivePurgeModal() {
7543
+ await (0, $hOLA6$expect)(this.page.getByRole("button", {
7544
+ name: "Cancel"
7545
+ })).toBeVisible();
7546
+ await this.page.getByRole("button", {
7547
+ name: "Cancel"
7548
+ }).click();
7549
+ return this;
7550
+ }
7551
+ async setMaxArchiveRetentionPeriodIntervalUnit(value) {
7552
+ await this.page.locator("#time-selector-maximumArchiveRetentionPeriod").selectOption(value);
7553
+ return this;
7554
+ }
7555
+ async setMaxArchiveRetentionPeriodInterval(value) {
7556
+ await this.page.getByRole("spinbutton", {
7557
+ name: "Maximum archive retention"
7558
+ }).fill(value);
7559
+ return this;
7560
+ }
7561
+ async expectInputFieldToBeDisabled(fieldName) {
7562
+ await (0, $hOLA6$expect)(this.page.getByRole("spinbutton", {
7563
+ name: fieldName
7564
+ })).toHaveAttribute("readonly", "");
7565
+ return this;
7566
+ }
7567
+ }
7568
+
7569
+
7570
+
7571
+
7572
+
7573
+ class $57e4c422d5be5549$export$399378eed9c024e7 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
7574
+ constructor(page){
7575
+ super(page);
7576
+ }
7577
+ async getTasksTableElement() {
7578
+ return this.page.locator(".tasks-table table");
7579
+ }
7580
+ async getTasksTableRows() {
7581
+ return (await this.getTasksTableElement()).locator("tbody tr");
7582
+ }
7583
+ async getEventElement(eventName) {
7584
+ return this.page.locator(`tbody > tr `).filter({
7585
+ hasText: eventName
7586
+ });
7587
+ }
7588
+ async getEventRowElement(eventName) {
7589
+ return (await this.getEventElement(eventName)).locator("td");
7590
+ }
7591
+ async findAddTagInputElementOnRow(eventRowElement) {
7592
+ return eventRowElement.locator("input[type=text].tag-input");
7593
+ }
7594
+ async getTasksEventIdSearchInput() {
7595
+ return (await this.getTasksTableElement()).locator(".with-search > input[type=text]").first();
7596
+ }
7597
+ async getSuggestedRoleElement(roleName) {
7598
+ return this.page.locator(`.xlr-tags-suggestions .tag-label`).filter({
7599
+ hasText: roleName
7600
+ });
7601
+ }
7602
+ async getRoleElementFromEvent(eventName, roleName) {
7603
+ return (await this.getEventRowElement(eventName)).locator(`.role-cell .tag.role`).filter({
7604
+ hasText: roleName
7605
+ });
7606
+ }
7607
+ async getCloseTagElements() {
7608
+ return this.page.locator(".tag.role a.tag-close");
7609
+ }
7610
+ async getEditMessageElements() {
7611
+ return this.page.locator("a.action.link").filter({
7612
+ hasText: "Edit Message"
7613
+ });
7614
+ }
7615
+ async findEditMessageLinkElementOnRow(eventRowElement) {
7616
+ return eventRowElement.locator("a.action.link").filter({
7617
+ hasText: "Edit Message"
7618
+ });
7619
+ }
7620
+ async typeRoleTagNameInEventInput(eventName, roleName) {
7621
+ const eventRowElement = await this.getEventRowElement(eventName);
7622
+ await (await this.findAddTagInputElementOnRow(eventRowElement)).fill(roleName);
7623
+ return this;
7624
+ }
7625
+ async clearRoleTagNameInEventInput(eventName) {
7626
+ const eventRowElement = await this.getEventRowElement(eventName);
7627
+ await (await this.findAddTagInputElementOnRow(eventRowElement)).clear();
7628
+ return this;
7629
+ }
7630
+ async filterTaskTableByEventId(filterText) {
7631
+ await (await this.getTasksEventIdSearchInput()).fill(filterText);
7632
+ return this;
7633
+ }
7634
+ async expectSuggestedRoleToBeVisible(roleName, shouldBeVisible = true) {
7635
+ shouldBeVisible ? (0, $hOLA6$expect)(await this.getSuggestedRoleElement(roleName)).toBeTruthy() : (0, $hOLA6$expect)(await this.getSuggestedRoleElement(roleName)).toBeFalsy();
7636
+ return this;
7637
+ }
7638
+ async expectRoleTagToBePresentOnEvent(eventName, roleName, shouldBePresent = true) {
7639
+ shouldBePresent ? await (0, $hOLA6$expect)(await this.getRoleElementFromEvent(eventName, roleName)).toBeVisible() : await (0, $hOLA6$expect)(await this.getRoleElementFromEvent(eventName, roleName)).not.toBeVisible();
7640
+ return this;
7641
+ }
7642
+ async expectTaskEventTableToHaveNumberOfRows(numberOfRows) {
7643
+ await (0, $hOLA6$expect)(await this.getTasksTableRows()).toHaveCount(numberOfRows);
7644
+ return this;
7645
+ }
7646
+ async expectTablesToBeInReadOnlyMode(shouldBeReadOnly = true) {
7647
+ if (shouldBeReadOnly) {
7648
+ await (0, $hOLA6$expect)(await this.getEditMessageElements()).toHaveCount(0);
7649
+ await (0, $hOLA6$expect)(await this.getCloseTagElements()).toHaveCount(0);
7650
+ } else {
7651
+ (0, $hOLA6$expect)(await (await this.getEditMessageElements()).count()).toBeGreaterThan(0);
7652
+ (0, $hOLA6$expect)(await (await this.getCloseTagElements()).count()).toBeGreaterThan(0);
7653
+ }
7654
+ return this;
7655
+ }
7656
+ async removeRoleTagFromEvent(eventName, roleName) {
7657
+ await this.page.locator(`[data-test="${await this.toConstantFormat(eventName)}"] div .tag.role`).filter({
7658
+ hasText: roleName
7659
+ }).locator("a.tag-close").click();
7660
+ return this;
7661
+ }
7662
+ async toConstantFormat(input) {
7663
+ return input.trim().toUpperCase().replace(/\s+/g, "_");
7664
+ }
7665
+ }
7666
+ class $57e4c422d5be5549$export$6c8a73a99892a2a4 extends $57e4c422d5be5549$export$399378eed9c024e7 {
7667
+ constructor(page){
7668
+ super(page);
7669
+ }
7670
+ async findBodySaveElement() {
7671
+ return this.page.locator(`.modal-body .actions-wrapper button[data-testid="save-button"]`);
7672
+ }
7673
+ async findBodyCloseElement() {
7674
+ return this.page.locator(`.modal-body .actions-wrapper button[data-testid="cancel-button"]`);
7675
+ }
7676
+ async expectBodyTextareaControlsToExist(shouldExist = true) {
7677
+ if (shouldExist) {
7678
+ (0, $hOLA6$expect)(await (await this.findBodySaveElement()).count()).toBeGreaterThan(0);
7679
+ (0, $hOLA6$expect)(await (await this.findBodyCloseElement()).count()).toBeGreaterThan(0);
7680
+ } else {
7681
+ await (0, $hOLA6$expect)(await this.findBodySaveElement()).toHaveCount(0);
7682
+ await (0, $hOLA6$expect)(await this.findBodyCloseElement()).toHaveCount(0);
7683
+ }
7684
+ return this;
7685
+ }
7686
+ async getPriorityDropdownElement() {
7687
+ return this.page.locator(".priority-group .xlr-react-select");
7688
+ }
7689
+ async getPriorityDropdownItemElement(priority) {
7690
+ return this.page.locator(`.ant-select-dropdown .ant-select-dropdown-menu-item`).filter({
7691
+ hasText: priority
7692
+ });
7693
+ }
7694
+ async getModalCancelButtonElement() {
7695
+ return this.page.locator(".modal-footer .button.cancel");
7696
+ }
7697
+ async getModalSaveButtonElement() {
7698
+ return this.page.locator(".modal-footer .button.primary");
7699
+ }
7700
+ async setPriority(priority) {
7701
+ await (await this.getPriorityDropdownElement()).click();
7702
+ await (await this.getPriorityDropdownItemElement(priority)).click();
7703
+ return this;
7704
+ }
7705
+ async expectModalSaveButtonToBeEnabled(shouldBeEnabled = true) {
7706
+ if (shouldBeEnabled) await (0, $hOLA6$expect)(await this.getModalSaveButtonElement()).toBeEnabled();
7707
+ else await (0, $hOLA6$expect)(await this.getModalSaveButtonElement()).toBeDisabled();
7708
+ return this;
7709
+ }
7710
+ async expectModalCancelButtonToBeEnabled(shouldBeEnabled = true) {
7711
+ if (shouldBeEnabled) await (0, $hOLA6$expect)(await this.getModalCancelButtonElement()).toBeEnabled();
7712
+ else await (0, $hOLA6$expect)(await this.getModalCancelButtonElement()).toBeDisabled();
7713
+ return this;
7714
+ }
7715
+ async hasPriority(priority) {
7716
+ await (0, $hOLA6$expect)(this.page.locator(".ant-select-selection-selected-value")).toHaveText(priority);
7717
+ return this;
7718
+ }
7719
+ async setSubject(subject) {
7720
+ const subjectElem = this.page.getByRole("textbox");
7721
+ await subjectElem.click();
7722
+ await subjectElem.clear();
7723
+ await subjectElem.fill(subject);
7724
+ return this;
7725
+ }
7726
+ async hasSubject(subject) {
7727
+ await (0, $hOLA6$expect)(this.page.locator(`input[name="subject"]`)).toHaveValue(subject);
7728
+ return this;
7729
+ }
7730
+ async writeIntoBodyTextarea(bodyText) {
7731
+ await this.page.getByLabel("Double-click to edit").waitFor({
7732
+ timeout: 10000
7733
+ });
7734
+ await this.page.getByLabel("Double-click to edit").hover();
7735
+ await this.page.locator(".markdown-viewer-actions").getByTestId("edit-button").click();
7736
+ const bodyTextareaElem = this.page.locator(`textarea[id="body-input"]`);
7737
+ await bodyTextareaElem.clear();
7738
+ await bodyTextareaElem.fill(bodyText);
7739
+ return this;
7740
+ }
7741
+ async saveTextInsideOfBodyTextarea() {
7742
+ await (0, $hOLA6$expect)(this.page.getByTestId("save-button")).toBeVisible();
7743
+ await this.page.getByTestId("save-button").click();
7744
+ return this;
7745
+ }
7746
+ async setBody(body) {
7747
+ await this.writeIntoBodyTextarea(body);
7748
+ await this.expectBodyTextareaControlsToExist();
7749
+ await this.saveTextInsideOfBodyTextarea();
7750
+ return this;
7751
+ }
7752
+ async hasBody(body) {
7753
+ await (0, $hOLA6$expect)(this.page.locator(".markdown-wrapper")).toContainText(body);
7754
+ return this;
7755
+ }
7756
+ async save() {
7757
+ await (await this.getModalSaveButtonElement()).click();
7758
+ return this;
7759
+ }
7760
+ async cancel() {
7761
+ await (await this.getModalCancelButtonElement()).click();
7762
+ return this;
7763
+ }
7764
+ async confirmLeave() {
7765
+ await this.page.locator(".leave-confirmation-dialog").getByRole("button", {
7766
+ name: "Leave"
7767
+ }).click();
7768
+ return this;
7769
+ }
7770
+ async expectNotificationSettingsModalToBeVisible(shouldBeVisible = true) {
7771
+ const modal = this.page.locator(`[role='dialog'] .xl-react-widget-modal-dialog`);
7772
+ if (shouldBeVisible) await (0, $hOLA6$expect)(modal).toBeVisible();
7773
+ else await (0, $hOLA6$expect)(modal).toHaveCount(0);
7774
+ return this;
7775
+ }
7776
+ async expectModalControlButtonsToBeEnabled(shouldBeEnabled = true) {
7777
+ await this.expectModalSaveButtonToBeEnabled(shouldBeEnabled);
7778
+ await this.expectModalCancelButtonToBeEnabled(shouldBeEnabled);
7779
+ return this;
7780
+ }
7781
+ async changeEmailDataWithAssertion(priority, subject, body) {
7782
+ await this.expectBodyTextareaControlsToExist(false);
7783
+ await this.setPriority(priority);
7784
+ await this.expectModalCancelButtonToBeEnabled();
7785
+ await this.hasPriority(priority);
7786
+ await this.expectModalCancelButtonToBeEnabled();
7787
+ await this.setSubject(subject);
7788
+ await this.expectModalCancelButtonToBeEnabled();
7789
+ await this.hasSubject(subject);
7790
+ await this.setBody(body);
7791
+ await this.expectModalCancelButtonToBeEnabled();
7792
+ await this.hasBody(body);
7793
+ await this.expectModalControlButtonsToBeEnabled();
7794
+ return this;
7795
+ }
7796
+ async changeEmailDataSaveChangesAndAssert(priority, subject, body) {
7797
+ await this.changeEmailDataWithAssertion(priority, subject, body);
7798
+ await this.save();
7799
+ await this.expectNotificationSettingsModalToBeVisible(false);
7800
+ return this;
7801
+ }
7802
+ async changeEmailDataCancelChangesAndAssert(priority, subject, body) {
7803
+ await this.changeEmailDataWithAssertion(priority, subject, body);
7804
+ await this.cancel();
7805
+ await this.expectLeaveConfirmationModalToBeVisible();
7806
+ await this.confirmLeave();
7807
+ return this;
7808
+ }
7809
+ async expectLeaveConfirmationModalToBeVisible(shouldBeVisible = true) {
7810
+ shouldBeVisible ? await (0, $hOLA6$expect)(this.page.locator(".leave-confirmation-dialog")).toBeVisible() : await (0, $hOLA6$expect)(this.page.locator(".leave-confirmation-dialog")).toHaveCount(0);
7811
+ return this;
7812
+ }
7813
+ async openModalAndExpectData(priority, subject, body) {
7814
+ await this.hasPriority(priority);
7815
+ await this.hasSubject(subject);
7816
+ await this.hasBody(body);
7817
+ return this;
7818
+ }
7819
+ }
7820
+
7821
+
7822
+ class $1760f172a9c2896d$export$7a236355ab05cdda extends (0, $57e4c422d5be5549$export$399378eed9c024e7) {
7823
+ constructor(page){
7824
+ super(page);
7825
+ }
7826
+ async getResetButtonElement() {
7827
+ return this.page.getByTestId("reset-btn");
7828
+ }
7829
+ async getSaveButtonElement() {
7830
+ return this.page.getByTestId("save-btn");
7831
+ }
7832
+ async getSuggestionTag() {
7833
+ return this.page.locator(".xlr-tags-suggestions .tag-label");
7834
+ }
7835
+ async getSuggestedRoleElement(roleName) {
7836
+ return this.page.locator(`.xlr-tags-suggestions .tag-label`).filter({
7837
+ hasText: roleName
7838
+ });
7839
+ }
7840
+ async selectSuggestedRole(roleName) {
7841
+ await (await this.getSuggestedRoleElement(roleName)).click();
7842
+ return this;
7843
+ }
7844
+ async getEventElement(eventName) {
7845
+ return this.page.locator(`tbody > tr `).filter({
7846
+ hasText: eventName
7847
+ });
7848
+ }
7849
+ async getEventRowElement(eventName) {
7850
+ return (await this.getEventElement(eventName)).locator("td");
7851
+ }
7852
+ async getRoleElementFromEvent(eventName, roleName) {
7853
+ return (await this.getEventRowElement(eventName)).locator(`.role-cell .tag.role span`).filter({
7854
+ hasText: roleName
7855
+ });
7856
+ }
7857
+ async expectResetButtonToBeEnabled(shouldBeEnabled = true) {
7858
+ shouldBeEnabled ? await (0, $hOLA6$expect)(await this.getResetButtonElement()).toBeEnabled() : await (0, $hOLA6$expect)(await this.getResetButtonElement()).toBeDisabled();
7859
+ return this;
7860
+ }
7861
+ async expectSaveButtonToBeEnabled(shouldBeEnabled = true) {
7862
+ shouldBeEnabled ? await (0, $hOLA6$expect)(await this.getSaveButtonElement()).toBeEnabled() : await (0, $hOLA6$expect)(await this.getSaveButtonElement()).toBeDisabled();
7863
+ return this;
7864
+ }
7865
+ async expectTableWithRecipients(tableTitle, recipientEnabled) {
7866
+ const countElement = this.page.locator(`.collapsible-component`).filter({
7867
+ hasText: tableTitle
7868
+ }).locator(`.tags.react-tags-wrapper`);
7869
+ recipientEnabled ? (0, $hOLA6$expect)(await countElement.count()).toBeGreaterThan(0) : (0, $hOLA6$expect)(await countElement.count()).toBe(0);
7870
+ return this;
7871
+ }
7872
+ async typeRoleText(eventId, roleText) {
7873
+ await this.page.locator(`.events-permissions-table input#${eventId}`).fill(roleText);
7874
+ return this;
7875
+ }
7876
+ async addRoleToEvent(eventId, roleName) {
7877
+ await this.typeRoleText(eventId, roleName);
7878
+ await this.selectSuggestedRole(roleName);
7879
+ return this;
7880
+ }
7881
+ async removeRoleFromEvent(eventId, roleName) {
7882
+ const roleElem = await this.getRoleElementFromEvent(roleName, eventId);
7883
+ await roleElem.locator(".role .tag-close").click();
7884
+ return this;
7885
+ }
7886
+ async expectSuggestionTagToHaveText(expectedText) {
7887
+ await (0, $hOLA6$expect)(await this.getSuggestionTag()).toHaveText(expectedText);
7888
+ return this;
7889
+ }
7890
+ async expectCancelAndSaveButtonsToBeEnabled(shouldBeEnabled = true) {
7891
+ shouldBeEnabled ? await (0, $hOLA6$expect)(await this.getResetButtonElement()).toBeEnabled() : await (0, $hOLA6$expect)(await this.getSaveButtonElement()).toBeDisabled();
7892
+ return this;
7893
+ }
7894
+ async addRoleToEventWithAssertions(eventName, roleName) {
7895
+ await this.typeRoleTagNameInEventInput(eventName, roleName);
7896
+ await this.expectSuggestedRoleToBeVisible(roleName);
7897
+ await this.selectSuggestedRole(roleName);
7898
+ await this.expectRoleTagToBePresentOnEvent(eventName, roleName);
7899
+ await this.expectCancelAndSaveButtonsToBeEnabled();
7900
+ return this;
7901
+ }
7902
+ async removeRoleAndAssert(eventName, roleName) {
7903
+ await this.expectTablesToBeInReadOnlyMode(false);
7904
+ await this.removeRoleTagFromEvent(eventName, roleName);
7905
+ await this.expectRoleTagToBePresentOnEvent(eventName, roleName, false);
7906
+ await this.expectCancelAndSaveButtonsToBeEnabled();
7907
+ return this;
7908
+ }
7909
+ async openEditMessageFromEvent(eventName) {
7910
+ await this.page.locator(`[data-test="${await this.toConstantFormat(eventName)}"]`).getByText("Edit Message").click();
7911
+ return new (0, $57e4c422d5be5549$export$6c8a73a99892a2a4)(this.page);
7912
+ }
7913
+ }
7914
+
7915
+
7448
7916
  class $2cbb78eec86d0a9f$export$2edf430132ca35d0 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
7449
7917
  constructor(page){
7450
7918
  super(page);
@@ -7454,18 +7922,22 @@ class $2cbb78eec86d0a9f$export$2edf430132ca35d0 extends (0, $9626bc9256ce31f7$ex
7454
7922
  async openGeneralSettings() {
7455
7923
  await this.util.openSideNavMenu("General");
7456
7924
  await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("General")).toBeVisible();
7925
+ return new $2cbb78eec86d0a9f$export$b8732a8d21d8bf63(this.page);
7457
7926
  }
7458
7927
  async openReleasesAndTriggers() {
7459
7928
  await this.util.openSideNavMenu("Releases and Triggers");
7460
7929
  await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Releases and Triggers")).toBeVisible();
7930
+ return new (0, $4f618685ec16216c$export$3966fb3c0478db68)(this.page);
7461
7931
  }
7462
7932
  async openTasks() {
7463
7933
  await this.util.openSideNavMenu("Tasks");
7464
7934
  await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Tasks")).toBeVisible();
7935
+ return new (0, $a736ba10591716ab$export$c33e44a4a9202d88)(this.page);
7465
7936
  }
7466
7937
  async openReports() {
7467
7938
  await this.util.openSideNavMenu("Reports");
7468
7939
  await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Reports")).toBeVisible();
7940
+ return new (0, $ff784d6668c5e820$export$5c92082c2afdcc2c)(this.page);
7469
7941
  }
7470
7942
  async openAdvanced() {
7471
7943
  await this.util.openSideNavMenu("Advanced");
@@ -7480,6 +7952,7 @@ class $2cbb78eec86d0a9f$export$2edf430132ca35d0 extends (0, $9626bc9256ce31f7$ex
7480
7952
  async openNotifications() {
7481
7953
  await this.util.openSideNavMenu("Notifications");
7482
7954
  await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Notifications")).toBeVisible();
7955
+ return new (0, $1760f172a9c2896d$export$7a236355ab05cdda)(this.page);
7483
7956
  }
7484
7957
  async openRiskProfiles() {
7485
7958
  await this.util.openSideNavMenu("Risk profiles");
@@ -7494,6 +7967,110 @@ class $2cbb78eec86d0a9f$export$2edf430132ca35d0 extends (0, $9626bc9256ce31f7$ex
7494
7967
  await this.util.openSideNavMenu("SMTP server");
7495
7968
  await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("SMTP server")).toBeVisible();
7496
7969
  }
7970
+ async _saveDoNotAssert() {
7971
+ // Check if the "Save" button is enabled and save if needed
7972
+ const saveButton = await this.page.getByTestId("save-button").isDisabled();
7973
+ if (!saveButton) await this.page.getByTestId("save-button").click();
7974
+ }
7975
+ async expectCards(cardTitles) {
7976
+ await (0, $hOLA6$expect)(this.page.locator(`.settings-card .dot-card-header-title`)).toHaveCount(cardTitles.length);
7977
+ for(let i = 0; i < cardTitles.length; i++){
7978
+ const cardTitle = cardTitles[i];
7979
+ await (0, $hOLA6$expect)(this.page.locator(`.settings-card .dot-card-header-title`).filter({
7980
+ hasText: cardTitle
7981
+ })).toBeVisible();
7982
+ }
7983
+ return this;
7984
+ }
7985
+ async save() {
7986
+ await (0, $hOLA6$expect)(this.page.getByTestId("save-button")).toBeVisible();
7987
+ await this.page.getByTestId("save-button").click();
7988
+ await (0, $hOLA6$expect)(this.page.locator(".success").filter({
7989
+ hasText: "Changes saved successfully"
7990
+ })).toBeVisible();
7991
+ await this.page.locator(".success").getByRole("button").click();
7992
+ return this;
7993
+ }
7994
+ async reset() {
7995
+ await this.page.getByTestId(`reset-button`).click();
7996
+ await (0, $hOLA6$expect)(this.page.getByTestId("reset-button")).toBeDisabled();
7997
+ return this;
7998
+ }
7999
+ }
8000
+ class $2cbb78eec86d0a9f$export$b8732a8d21d8bf63 extends $2cbb78eec86d0a9f$export$2edf430132ca35d0 {
8001
+ constructor(page){
8002
+ super(page);
8003
+ }
8004
+ async setInstanceName(value) {
8005
+ await this.page.locator("input#headerName").click({
8006
+ force: true
8007
+ });
8008
+ await this.page.getByRole("textbox", {
8009
+ name: "Instance name"
8010
+ }).fill(value);
8011
+ return this;
8012
+ }
8013
+ async setLoginMessage(message) {
8014
+ await this.page.locator("div#loginMessage").click({
8015
+ force: true
8016
+ });
8017
+ const input = this.page.locator("input#loginMessage");
8018
+ const currentValue = await input.inputValue();
8019
+ if (currentValue.trim() !== "") await input.fill("");
8020
+ await input.fill(message);
8021
+ await input.press("Tab");
8022
+ return this;
8023
+ }
8024
+ async clearLoginMessage() {
8025
+ await this.page.locator("div#loginMessage").click({
8026
+ force: true
8027
+ });
8028
+ const input = this.page.locator("input#loginMessage");
8029
+ await input.fill("");
8030
+ await input.press("Tab");
8031
+ return this;
8032
+ }
8033
+ async setHeaderColor(colorName) {
8034
+ await this.page.locator(".color-picker button").click({
8035
+ force: true
8036
+ });
8037
+ await this.page.locator(`.color-picker-list-item`).getByText(colorName).click({
8038
+ force: true
8039
+ });
8040
+ return this;
8041
+ }
8042
+ async clickNotificationsMenu() {
8043
+ await this.util.openSideNavMenu("Notifications");
8044
+ }
8045
+ async expectInstanceName(value) {
8046
+ await (0, $hOLA6$expect)(this.page.locator("top-toolbar .dot-pill")).toHaveText(value);
8047
+ return this;
8048
+ }
8049
+ async restoreDefaultThemeSettings() {
8050
+ await this._clearHeaderInstanceName();
8051
+ await this.setHeaderColor("Green");
8052
+ await this._saveDoNotAssert();
8053
+ }
8054
+ async _clearHeaderInstanceName() {
8055
+ await this.page.locator("input#headerName").click({
8056
+ force: true
8057
+ });
8058
+ await this.page.locator("input#headerName").clear();
8059
+ }
8060
+ async expectHeaderColor(value) {
8061
+ await (0, $hOLA6$expect)(this.page.locator("top-toolbar .dot-app-toolbar")).toHaveAttribute("style", `border-bottom-color: ${value};`);
8062
+ return this;
8063
+ }
8064
+ async expectConfirmationPopUp() {
8065
+ await (0, $hOLA6$expect)(this.page.getByRole("heading", {
8066
+ name: "Confirm leave"
8067
+ })).toBeVisible();
8068
+ await (0, $hOLA6$expect)(this.page.getByRole("paragraph")).toContainText("You have unsaved changes that will be lost.");
8069
+ await this.page.getByRole("button", {
8070
+ name: "Leave without saving"
8071
+ }).click();
8072
+ return this;
8073
+ }
7497
8074
  }
7498
8075
 
7499
8076
 
@@ -7976,6 +8553,17 @@ class $4444bee76761dfb1$export$f14c0e3f98d164c0 extends (0, $9626bc9256ce31f7$ex
7976
8553
  await this.page.waitForTimeout(1000);
7977
8554
  await this.closePendoModalWindow();
7978
8555
  }
8556
+ async loginWithoutReload(userName, password) {
8557
+ let loadTriggered = false;
8558
+ this.page.on("load", ()=>{
8559
+ loadTriggered = true;
8560
+ });
8561
+ await this.page.evaluate(()=>{
8562
+ window.location.hash = "#tasks";
8563
+ });
8564
+ (0, $hOLA6$expect)(loadTriggered).toBe(false);
8565
+ await this.login(userName, password);
8566
+ }
7979
8567
  /**
7980
8568
  * Logout as authenticated user
7981
8569
  */ async logout() {
@@ -8001,6 +8589,18 @@ class $4444bee76761dfb1$export$f14c0e3f98d164c0 extends (0, $9626bc9256ce31f7$ex
8001
8589
  await this.page.waitForTimeout(1000);
8002
8590
  if (await this.page.locator("._pendo-close-guide").count() > 0) await this.page.locator("._pendo-close-guide").click();
8003
8591
  }
8592
+ async expectUserNotVisible() {
8593
+ const tooltip = this.page.locator("top-toolbar .avatar-wrapper .dot-tooltip");
8594
+ await tooltip.waitFor({
8595
+ state: "hidden"
8596
+ });
8597
+ }
8598
+ async expectUserVisible() {
8599
+ const tooltip = this.page.locator("top-toolbar .avatar-wrapper .dot-tooltip");
8600
+ await tooltip.waitFor({
8601
+ state: "visible"
8602
+ });
8603
+ }
8004
8604
  }
8005
8605
 
8006
8606