@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/CHANGELOG.md +22 -0
- package/dist/main.js +646 -46
- package/dist/main.js.map +1 -1
- package/dist/module.js +646 -46
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +136 -10
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -4506,7 +4506,7 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
4506
4506
|
}
|
|
4507
4507
|
async expectSnackbarSuccessMessage(message) {
|
|
4508
4508
|
const snackbar = this.page.locator('.dot-snackbar[severity="success"]');
|
|
4509
|
-
await (0, $kKeXs$playwrighttest.expect)(snackbar.locator("
|
|
4509
|
+
await (0, $kKeXs$playwrighttest.expect)(snackbar.locator('[aria-label="success"]')).toHaveText(message);
|
|
4510
4510
|
await snackbar.getByRole("button").click();
|
|
4511
4511
|
}
|
|
4512
4512
|
async closeContextMenu() {
|
|
@@ -4515,6 +4515,12 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
4515
4515
|
async expectTaskBorderWithColor(taskName, color) {
|
|
4516
4516
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.task-box:has-text('${taskName}')`)).toHaveCSS("border-top-color", color);
|
|
4517
4517
|
}
|
|
4518
|
+
async pasteTaskFromTaskGenerator() {
|
|
4519
|
+
await this.phaseLocator.getByText("Add task").click();
|
|
4520
|
+
const pasteButton = this.page.locator('button[data-testid="paste-copied-task-btn"]');
|
|
4521
|
+
await (0, $kKeXs$playwrighttest.expect)(pasteButton).toBeEnabled();
|
|
4522
|
+
await pasteButton.click();
|
|
4523
|
+
}
|
|
4518
4524
|
async addTaskInPhase(taskTitle, taskGroup, taskType) {
|
|
4519
4525
|
await this.phaseLocator.getByText("Add task").click();
|
|
4520
4526
|
await this.page.locator("#task-selector").hover();
|
|
@@ -6204,7 +6210,9 @@ class $7867194f18360347$export$1d7840d5cdc861d5 extends (0, $f8721861c660dd88$ex
|
|
|
6204
6210
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
|
|
6205
6211
|
name: "System message"
|
|
6206
6212
|
})).toBeVisible();
|
|
6207
|
-
|
|
6213
|
+
}
|
|
6214
|
+
async closeConfigureSystemMessage() {
|
|
6215
|
+
await this.closeIcon.first().click();
|
|
6208
6216
|
}
|
|
6209
6217
|
async configureSystemMessage(message) {
|
|
6210
6218
|
await this.settingsIcon.click();
|
|
@@ -8291,53 +8299,20 @@ class $ea5452748687c9a2$var$RisksProfilePage extends (0, $f8721861c660dd88$expor
|
|
|
8291
8299
|
|
|
8292
8300
|
|
|
8293
8301
|
|
|
8294
|
-
|
|
8295
8302
|
class $a4875a75884c9da0$export$e0a0fc7a891dfa75 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
8296
8303
|
constructor(page){
|
|
8297
8304
|
super(page);
|
|
8298
8305
|
}
|
|
8299
|
-
async expectCards(cardTitles) {
|
|
8300
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.settings-card`)).toHaveCount(cardTitles.length);
|
|
8301
|
-
for(let i = 0; i < cardTitles.length; i++){
|
|
8302
|
-
const cardTitle = cardTitles[i];
|
|
8303
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.settings-card`).filter({
|
|
8304
|
-
hasText: cardTitle
|
|
8305
|
-
})).toBeVisible();
|
|
8306
|
-
}
|
|
8307
|
-
return this;
|
|
8308
|
-
}
|
|
8309
|
-
async save() {
|
|
8310
|
-
await this.page.getByTestId(`save-button`).click();
|
|
8311
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("success")).toBeVisible();
|
|
8312
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".success").filter({
|
|
8313
|
-
hasText: "Changes saved successfully"
|
|
8314
|
-
})).toBeVisible();
|
|
8315
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId(`save-button`)).toBeDisabled();
|
|
8316
|
-
return this;
|
|
8317
|
-
}
|
|
8318
|
-
async reset() {
|
|
8319
|
-
await this.page.getByTestId(`reset-button`).click();
|
|
8320
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("reset-button")).toBeDisabled();
|
|
8321
|
-
return this;
|
|
8322
|
-
}
|
|
8323
8306
|
}
|
|
8324
8307
|
|
|
8325
8308
|
|
|
8326
8309
|
|
|
8327
8310
|
|
|
8311
|
+
|
|
8328
8312
|
class $d68d07ad57a54349$export$c28592575acb4efc extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
8329
8313
|
constructor(page){
|
|
8330
8314
|
super(page);
|
|
8331
|
-
|
|
8332
|
-
async expectCards(cardTitles) {
|
|
8333
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.settings-card .dot-card-header-title`)).toHaveCount(cardTitles.length);
|
|
8334
|
-
for(let i = 0; i < cardTitles.length; i++){
|
|
8335
|
-
const cardTitle = cardTitles[i];
|
|
8336
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.settings-card .dot-card-header-title`).filter({
|
|
8337
|
-
hasText: cardTitle
|
|
8338
|
-
})).toBeVisible();
|
|
8339
|
-
}
|
|
8340
|
-
return this;
|
|
8315
|
+
this.settings = new (0, $dbc8f157e7b24b12$export$2edf430132ca35d0)(page);
|
|
8341
8316
|
}
|
|
8342
8317
|
async getFeatureControl(feature, control) {
|
|
8343
8318
|
return this.page.locator(`.settings-card`).filter({
|
|
@@ -8354,15 +8329,6 @@ class $d68d07ad57a54349$export$c28592575acb4efc extends (0, $f8721861c660dd88$ex
|
|
|
8354
8329
|
else await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId(`save-button`)).not.toBeEnabled();
|
|
8355
8330
|
return this;
|
|
8356
8331
|
}
|
|
8357
|
-
async save() {
|
|
8358
|
-
await this.page.getByTestId(`save-button`).click();
|
|
8359
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("success")).toBeVisible();
|
|
8360
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".success").filter({
|
|
8361
|
-
hasText: "Changes saved successfully"
|
|
8362
|
-
})).toBeVisible();
|
|
8363
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId(`save-button`)).toBeDisabled();
|
|
8364
|
-
return this;
|
|
8365
|
-
}
|
|
8366
8332
|
async expectResetToBeEnabled(state) {
|
|
8367
8333
|
if (state) await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("reset-button")).toBeEnabled();
|
|
8368
8334
|
else await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("reset-button")).not.toBeEnabled();
|
|
@@ -8381,6 +8347,508 @@ class $d68d07ad57a54349$export$c28592575acb4efc extends (0, $f8721861c660dd88$ex
|
|
|
8381
8347
|
}
|
|
8382
8348
|
|
|
8383
8349
|
|
|
8350
|
+
|
|
8351
|
+
|
|
8352
|
+
|
|
8353
|
+
class $867b32e9296b4f52$export$c33e44a4a9202d88 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
8354
|
+
constructor(page){
|
|
8355
|
+
super(page);
|
|
8356
|
+
this.settings = new (0, $dbc8f157e7b24b12$export$2edf430132ca35d0)(page);
|
|
8357
|
+
}
|
|
8358
|
+
async setStatusPollingInterval(value) {
|
|
8359
|
+
await this.page.locator("#taskStatusInterval").clear();
|
|
8360
|
+
await this.page.locator("#taskStatusInterval").fill(value);
|
|
8361
|
+
return this;
|
|
8362
|
+
}
|
|
8363
|
+
async setListPollingInterval(value) {
|
|
8364
|
+
await this.page.locator("#taskListInterval").clear();
|
|
8365
|
+
await this.page.locator("#taskListInterval").fill(value);
|
|
8366
|
+
return this;
|
|
8367
|
+
}
|
|
8368
|
+
async expectStatusPollingInterval(value) {
|
|
8369
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#taskStatusInterval")).toHaveValue(value);
|
|
8370
|
+
return this;
|
|
8371
|
+
}
|
|
8372
|
+
async expectListPollingInterval(value) {
|
|
8373
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#taskListInterval")).toHaveValue(value);
|
|
8374
|
+
return this;
|
|
8375
|
+
}
|
|
8376
|
+
async restoreDefaultPollingSettings() {
|
|
8377
|
+
const defaultTaskStatusInterval = "1";
|
|
8378
|
+
const defaultTaskListInterval = "30";
|
|
8379
|
+
await this.setStatusPollingInterval(defaultTaskStatusInterval);
|
|
8380
|
+
await this.setListPollingInterval(defaultTaskListInterval);
|
|
8381
|
+
await this.settings.save();
|
|
8382
|
+
return this;
|
|
8383
|
+
}
|
|
8384
|
+
}
|
|
8385
|
+
|
|
8386
|
+
|
|
8387
|
+
|
|
8388
|
+
|
|
8389
|
+
|
|
8390
|
+
class $249973ff3670aa42$export$5c92082c2afdcc2c extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
8391
|
+
constructor(page){
|
|
8392
|
+
super(page);
|
|
8393
|
+
this.settings = new (0, $dbc8f157e7b24b12$export$2edf430132ca35d0)(page);
|
|
8394
|
+
}
|
|
8395
|
+
async setWarningThreshold(value) {
|
|
8396
|
+
await this.page.locator("#warningThreshold").clear();
|
|
8397
|
+
await this.page.locator("#warningThreshold").fill(value);
|
|
8398
|
+
return this;
|
|
8399
|
+
}
|
|
8400
|
+
async setErrorThreshold(value) {
|
|
8401
|
+
await this.page.locator("#errorThreshold").clear();
|
|
8402
|
+
await this.page.locator("#errorThreshold").fill(value);
|
|
8403
|
+
return this;
|
|
8404
|
+
}
|
|
8405
|
+
async setCriticalPhaseThreshold(value) {
|
|
8406
|
+
await this.page.locator("#criticalPhaseThreshold").clear();
|
|
8407
|
+
await this.page.locator("#criticalPhaseThreshold").fill(value);
|
|
8408
|
+
return this;
|
|
8409
|
+
}
|
|
8410
|
+
async expectWarningThreshold(value) {
|
|
8411
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#warningThreshold")).toHaveValue(value);
|
|
8412
|
+
return this;
|
|
8413
|
+
}
|
|
8414
|
+
async expectErrorThreshold(value) {
|
|
8415
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#errorThreshold")).toHaveValue(value);
|
|
8416
|
+
return this;
|
|
8417
|
+
}
|
|
8418
|
+
async expectCriticalPhaseThreshold(value) {
|
|
8419
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#criticalPhaseThreshold")).toHaveValue(value);
|
|
8420
|
+
return this;
|
|
8421
|
+
}
|
|
8422
|
+
async restoreDefaultReportSettings() {
|
|
8423
|
+
const defaultWarningThreshold = "2";
|
|
8424
|
+
const defaultErrorThreshold = "4";
|
|
8425
|
+
const defaultCriticalPhaseThreshold = "6";
|
|
8426
|
+
await this.setWarningThreshold(defaultWarningThreshold);
|
|
8427
|
+
await this.setErrorThreshold(defaultErrorThreshold);
|
|
8428
|
+
await this.setCriticalPhaseThreshold(defaultCriticalPhaseThreshold);
|
|
8429
|
+
await this.settings.save();
|
|
8430
|
+
}
|
|
8431
|
+
}
|
|
8432
|
+
|
|
8433
|
+
|
|
8434
|
+
|
|
8435
|
+
|
|
8436
|
+
|
|
8437
|
+
class $346eca383b14ff13$export$3966fb3c0478db68 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
8438
|
+
constructor(page){
|
|
8439
|
+
super(page);
|
|
8440
|
+
this.settings = new (0, $dbc8f157e7b24b12$export$2edf430132ca35d0)(page);
|
|
8441
|
+
}
|
|
8442
|
+
async setArchivingSettingsDeleteIntervalUnit(value) {
|
|
8443
|
+
const setDeleteInterval = this.page.locator("select#time-selector-releaseAgeToDeleteFromJcr");
|
|
8444
|
+
await setDeleteInterval.scrollIntoViewIfNeeded();
|
|
8445
|
+
await setDeleteInterval.selectOption(value);
|
|
8446
|
+
return this;
|
|
8447
|
+
}
|
|
8448
|
+
async expectArchivePurgeEnableState(value) {
|
|
8449
|
+
if (value) await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#purgingEnabled")).toBeChecked();
|
|
8450
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.page.locator("#purgingEnabled")).not.toBeChecked();
|
|
8451
|
+
return this;
|
|
8452
|
+
}
|
|
8453
|
+
async setArchivePurgeEnableState(value) {
|
|
8454
|
+
if (value) await this.page.locator("#purgingEnabled").check({
|
|
8455
|
+
force: true
|
|
8456
|
+
});
|
|
8457
|
+
else await this.page.locator("#purgingEnabled").uncheck({
|
|
8458
|
+
force: true
|
|
8459
|
+
});
|
|
8460
|
+
return this;
|
|
8461
|
+
}
|
|
8462
|
+
async expectConfirmEnableArchivePurgeModal() {
|
|
8463
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
|
|
8464
|
+
name: "Verify archive purge change"
|
|
8465
|
+
})).toBeVisible();
|
|
8466
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".dot-dialog")).toBeVisible();
|
|
8467
|
+
return this;
|
|
8468
|
+
}
|
|
8469
|
+
async confirmEnableArchivePurgeModal() {
|
|
8470
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("button", {
|
|
8471
|
+
name: "Confirm"
|
|
8472
|
+
})).toBeVisible();
|
|
8473
|
+
await this.page.getByRole("button", {
|
|
8474
|
+
name: "Confirm"
|
|
8475
|
+
}).click();
|
|
8476
|
+
return this;
|
|
8477
|
+
}
|
|
8478
|
+
async cancelEnableArchivePurgeModal() {
|
|
8479
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("button", {
|
|
8480
|
+
name: "Cancel"
|
|
8481
|
+
})).toBeVisible();
|
|
8482
|
+
await this.page.getByRole("button", {
|
|
8483
|
+
name: "Cancel"
|
|
8484
|
+
}).click();
|
|
8485
|
+
return this;
|
|
8486
|
+
}
|
|
8487
|
+
async setMaxArchiveRetentionPeriodIntervalUnit(value) {
|
|
8488
|
+
await this.page.locator("#time-selector-maximumArchiveRetentionPeriod").selectOption(value);
|
|
8489
|
+
return this;
|
|
8490
|
+
}
|
|
8491
|
+
async setMaxArchiveRetentionPeriodInterval(value) {
|
|
8492
|
+
await this.page.getByRole("spinbutton", {
|
|
8493
|
+
name: "Maximum archive retention"
|
|
8494
|
+
}).fill(value);
|
|
8495
|
+
return this;
|
|
8496
|
+
}
|
|
8497
|
+
async expectInputFieldToBeDisabled(fieldName) {
|
|
8498
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("spinbutton", {
|
|
8499
|
+
name: fieldName
|
|
8500
|
+
})).toHaveAttribute("readonly", "");
|
|
8501
|
+
return this;
|
|
8502
|
+
}
|
|
8503
|
+
}
|
|
8504
|
+
|
|
8505
|
+
|
|
8506
|
+
|
|
8507
|
+
|
|
8508
|
+
|
|
8509
|
+
class $d1277b6afa4c07cc$export$399378eed9c024e7 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
8510
|
+
constructor(page){
|
|
8511
|
+
super(page);
|
|
8512
|
+
}
|
|
8513
|
+
async getTasksTableElement() {
|
|
8514
|
+
return this.page.locator(".tasks-table table");
|
|
8515
|
+
}
|
|
8516
|
+
async getTasksTableRows() {
|
|
8517
|
+
return (await this.getTasksTableElement()).locator("tbody tr");
|
|
8518
|
+
}
|
|
8519
|
+
async getEventElement(eventName) {
|
|
8520
|
+
return this.page.locator(`tbody > tr `).filter({
|
|
8521
|
+
hasText: eventName
|
|
8522
|
+
});
|
|
8523
|
+
}
|
|
8524
|
+
async getEventRowElement(eventName) {
|
|
8525
|
+
return (await this.getEventElement(eventName)).locator("td");
|
|
8526
|
+
}
|
|
8527
|
+
async findAddTagInputElementOnRow(eventRowElement) {
|
|
8528
|
+
return eventRowElement.locator("input[type=text].tag-input");
|
|
8529
|
+
}
|
|
8530
|
+
async getTasksEventIdSearchInput() {
|
|
8531
|
+
return (await this.getTasksTableElement()).locator(".with-search > input[type=text]").first();
|
|
8532
|
+
}
|
|
8533
|
+
async getSuggestedRoleElement(roleName) {
|
|
8534
|
+
return this.page.locator(`.xlr-tags-suggestions .tag-label`).filter({
|
|
8535
|
+
hasText: roleName
|
|
8536
|
+
});
|
|
8537
|
+
}
|
|
8538
|
+
async getRoleElementFromEvent(eventName, roleName) {
|
|
8539
|
+
return (await this.getEventRowElement(eventName)).locator(`.role-cell .tag.role`).filter({
|
|
8540
|
+
hasText: roleName
|
|
8541
|
+
});
|
|
8542
|
+
}
|
|
8543
|
+
async getCloseTagElements() {
|
|
8544
|
+
return this.page.locator(".tag.role a.tag-close");
|
|
8545
|
+
}
|
|
8546
|
+
async getEditMessageElements() {
|
|
8547
|
+
return this.page.locator("a.action.link").filter({
|
|
8548
|
+
hasText: "Edit Message"
|
|
8549
|
+
});
|
|
8550
|
+
}
|
|
8551
|
+
async findEditMessageLinkElementOnRow(eventRowElement) {
|
|
8552
|
+
return eventRowElement.locator("a.action.link").filter({
|
|
8553
|
+
hasText: "Edit Message"
|
|
8554
|
+
});
|
|
8555
|
+
}
|
|
8556
|
+
async typeRoleTagNameInEventInput(eventName, roleName) {
|
|
8557
|
+
const eventRowElement = await this.getEventRowElement(eventName);
|
|
8558
|
+
await (await this.findAddTagInputElementOnRow(eventRowElement)).fill(roleName);
|
|
8559
|
+
return this;
|
|
8560
|
+
}
|
|
8561
|
+
async clearRoleTagNameInEventInput(eventName) {
|
|
8562
|
+
const eventRowElement = await this.getEventRowElement(eventName);
|
|
8563
|
+
await (await this.findAddTagInputElementOnRow(eventRowElement)).clear();
|
|
8564
|
+
return this;
|
|
8565
|
+
}
|
|
8566
|
+
async filterTaskTableByEventId(filterText) {
|
|
8567
|
+
await (await this.getTasksEventIdSearchInput()).fill(filterText);
|
|
8568
|
+
return this;
|
|
8569
|
+
}
|
|
8570
|
+
async expectSuggestedRoleToBeVisible(roleName, shouldBeVisible = true) {
|
|
8571
|
+
shouldBeVisible ? (0, $kKeXs$playwrighttest.expect)(await this.getSuggestedRoleElement(roleName)).toBeTruthy() : (0, $kKeXs$playwrighttest.expect)(await this.getSuggestedRoleElement(roleName)).toBeFalsy();
|
|
8572
|
+
return this;
|
|
8573
|
+
}
|
|
8574
|
+
async expectRoleTagToBePresentOnEvent(eventName, roleName, shouldBePresent = true) {
|
|
8575
|
+
shouldBePresent ? await (0, $kKeXs$playwrighttest.expect)(await this.getRoleElementFromEvent(eventName, roleName)).toBeVisible() : await (0, $kKeXs$playwrighttest.expect)(await this.getRoleElementFromEvent(eventName, roleName)).not.toBeVisible();
|
|
8576
|
+
return this;
|
|
8577
|
+
}
|
|
8578
|
+
async expectTaskEventTableToHaveNumberOfRows(numberOfRows) {
|
|
8579
|
+
await (0, $kKeXs$playwrighttest.expect)(await this.getTasksTableRows()).toHaveCount(numberOfRows);
|
|
8580
|
+
return this;
|
|
8581
|
+
}
|
|
8582
|
+
async expectTablesToBeInReadOnlyMode(shouldBeReadOnly = true) {
|
|
8583
|
+
if (shouldBeReadOnly) {
|
|
8584
|
+
await (0, $kKeXs$playwrighttest.expect)(await this.getEditMessageElements()).toHaveCount(0);
|
|
8585
|
+
await (0, $kKeXs$playwrighttest.expect)(await this.getCloseTagElements()).toHaveCount(0);
|
|
8586
|
+
} else {
|
|
8587
|
+
(0, $kKeXs$playwrighttest.expect)(await (await this.getEditMessageElements()).count()).toBeGreaterThan(0);
|
|
8588
|
+
(0, $kKeXs$playwrighttest.expect)(await (await this.getCloseTagElements()).count()).toBeGreaterThan(0);
|
|
8589
|
+
}
|
|
8590
|
+
return this;
|
|
8591
|
+
}
|
|
8592
|
+
async removeRoleTagFromEvent(eventName, roleName) {
|
|
8593
|
+
await this.page.locator(`[data-test="${await this.toConstantFormat(eventName)}"] div .tag.role`).filter({
|
|
8594
|
+
hasText: roleName
|
|
8595
|
+
}).locator("a.tag-close").click();
|
|
8596
|
+
return this;
|
|
8597
|
+
}
|
|
8598
|
+
async toConstantFormat(input) {
|
|
8599
|
+
return input.trim().toUpperCase().replace(/\s+/g, "_");
|
|
8600
|
+
}
|
|
8601
|
+
}
|
|
8602
|
+
class $d1277b6afa4c07cc$export$6c8a73a99892a2a4 extends $d1277b6afa4c07cc$export$399378eed9c024e7 {
|
|
8603
|
+
constructor(page){
|
|
8604
|
+
super(page);
|
|
8605
|
+
}
|
|
8606
|
+
async findBodySaveElement() {
|
|
8607
|
+
return this.page.locator(`.modal-body .actions-wrapper button[data-testid="save-button"]`);
|
|
8608
|
+
}
|
|
8609
|
+
async findBodyCloseElement() {
|
|
8610
|
+
return this.page.locator(`.modal-body .actions-wrapper button[data-testid="cancel-button"]`);
|
|
8611
|
+
}
|
|
8612
|
+
async expectBodyTextareaControlsToExist(shouldExist = true) {
|
|
8613
|
+
if (shouldExist) {
|
|
8614
|
+
(0, $kKeXs$playwrighttest.expect)(await (await this.findBodySaveElement()).count()).toBeGreaterThan(0);
|
|
8615
|
+
(0, $kKeXs$playwrighttest.expect)(await (await this.findBodyCloseElement()).count()).toBeGreaterThan(0);
|
|
8616
|
+
} else {
|
|
8617
|
+
await (0, $kKeXs$playwrighttest.expect)(await this.findBodySaveElement()).toHaveCount(0);
|
|
8618
|
+
await (0, $kKeXs$playwrighttest.expect)(await this.findBodyCloseElement()).toHaveCount(0);
|
|
8619
|
+
}
|
|
8620
|
+
return this;
|
|
8621
|
+
}
|
|
8622
|
+
async getPriorityDropdownElement() {
|
|
8623
|
+
return this.page.locator(".priority-group .xlr-react-select");
|
|
8624
|
+
}
|
|
8625
|
+
async getPriorityDropdownItemElement(priority) {
|
|
8626
|
+
return this.page.locator(`.ant-select-dropdown .ant-select-dropdown-menu-item`).filter({
|
|
8627
|
+
hasText: priority
|
|
8628
|
+
});
|
|
8629
|
+
}
|
|
8630
|
+
async getModalCancelButtonElement() {
|
|
8631
|
+
return this.page.locator(".modal-footer .button.cancel");
|
|
8632
|
+
}
|
|
8633
|
+
async getModalSaveButtonElement() {
|
|
8634
|
+
return this.page.locator(".modal-footer .button.primary");
|
|
8635
|
+
}
|
|
8636
|
+
async setPriority(priority) {
|
|
8637
|
+
await (await this.getPriorityDropdownElement()).click();
|
|
8638
|
+
await (await this.getPriorityDropdownItemElement(priority)).click();
|
|
8639
|
+
return this;
|
|
8640
|
+
}
|
|
8641
|
+
async expectModalSaveButtonToBeEnabled(shouldBeEnabled = true) {
|
|
8642
|
+
if (shouldBeEnabled) await (0, $kKeXs$playwrighttest.expect)(await this.getModalSaveButtonElement()).toBeEnabled();
|
|
8643
|
+
else await (0, $kKeXs$playwrighttest.expect)(await this.getModalSaveButtonElement()).toBeDisabled();
|
|
8644
|
+
return this;
|
|
8645
|
+
}
|
|
8646
|
+
async expectModalCancelButtonToBeEnabled(shouldBeEnabled = true) {
|
|
8647
|
+
if (shouldBeEnabled) await (0, $kKeXs$playwrighttest.expect)(await this.getModalCancelButtonElement()).toBeEnabled();
|
|
8648
|
+
else await (0, $kKeXs$playwrighttest.expect)(await this.getModalCancelButtonElement()).toBeDisabled();
|
|
8649
|
+
return this;
|
|
8650
|
+
}
|
|
8651
|
+
async hasPriority(priority) {
|
|
8652
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".ant-select-selection-selected-value")).toHaveText(priority);
|
|
8653
|
+
return this;
|
|
8654
|
+
}
|
|
8655
|
+
async setSubject(subject) {
|
|
8656
|
+
const subjectElem = this.page.getByRole("textbox");
|
|
8657
|
+
await subjectElem.click();
|
|
8658
|
+
await subjectElem.clear();
|
|
8659
|
+
await subjectElem.fill(subject);
|
|
8660
|
+
return this;
|
|
8661
|
+
}
|
|
8662
|
+
async hasSubject(subject) {
|
|
8663
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`input[name="subject"]`)).toHaveValue(subject);
|
|
8664
|
+
return this;
|
|
8665
|
+
}
|
|
8666
|
+
async writeIntoBodyTextarea(bodyText) {
|
|
8667
|
+
await this.page.getByLabel("Double-click to edit").waitFor({
|
|
8668
|
+
timeout: 10000
|
|
8669
|
+
});
|
|
8670
|
+
await this.page.getByLabel("Double-click to edit").hover();
|
|
8671
|
+
await this.page.locator(".markdown-viewer-actions").getByTestId("edit-button").click();
|
|
8672
|
+
const bodyTextareaElem = this.page.locator(`textarea[id="body-input"]`);
|
|
8673
|
+
await bodyTextareaElem.clear();
|
|
8674
|
+
await bodyTextareaElem.fill(bodyText);
|
|
8675
|
+
return this;
|
|
8676
|
+
}
|
|
8677
|
+
async saveTextInsideOfBodyTextarea() {
|
|
8678
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("save-button")).toBeVisible();
|
|
8679
|
+
await this.page.getByTestId("save-button").click();
|
|
8680
|
+
return this;
|
|
8681
|
+
}
|
|
8682
|
+
async setBody(body) {
|
|
8683
|
+
await this.writeIntoBodyTextarea(body);
|
|
8684
|
+
await this.expectBodyTextareaControlsToExist();
|
|
8685
|
+
await this.saveTextInsideOfBodyTextarea();
|
|
8686
|
+
return this;
|
|
8687
|
+
}
|
|
8688
|
+
async hasBody(body) {
|
|
8689
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".markdown-wrapper")).toContainText(body);
|
|
8690
|
+
return this;
|
|
8691
|
+
}
|
|
8692
|
+
async save() {
|
|
8693
|
+
await (await this.getModalSaveButtonElement()).click();
|
|
8694
|
+
return this;
|
|
8695
|
+
}
|
|
8696
|
+
async cancel() {
|
|
8697
|
+
await (await this.getModalCancelButtonElement()).click();
|
|
8698
|
+
return this;
|
|
8699
|
+
}
|
|
8700
|
+
async confirmLeave() {
|
|
8701
|
+
await this.page.locator(".leave-confirmation-dialog").getByRole("button", {
|
|
8702
|
+
name: "Leave"
|
|
8703
|
+
}).click();
|
|
8704
|
+
return this;
|
|
8705
|
+
}
|
|
8706
|
+
async expectNotificationSettingsModalToBeVisible(shouldBeVisible = true) {
|
|
8707
|
+
const modal = this.page.locator(`[role='dialog'] .xl-react-widget-modal-dialog`);
|
|
8708
|
+
if (shouldBeVisible) await (0, $kKeXs$playwrighttest.expect)(modal).toBeVisible();
|
|
8709
|
+
else await (0, $kKeXs$playwrighttest.expect)(modal).toHaveCount(0);
|
|
8710
|
+
return this;
|
|
8711
|
+
}
|
|
8712
|
+
async expectModalControlButtonsToBeEnabled(shouldBeEnabled = true) {
|
|
8713
|
+
await this.expectModalSaveButtonToBeEnabled(shouldBeEnabled);
|
|
8714
|
+
await this.expectModalCancelButtonToBeEnabled(shouldBeEnabled);
|
|
8715
|
+
return this;
|
|
8716
|
+
}
|
|
8717
|
+
async changeEmailDataWithAssertion(priority, subject, body) {
|
|
8718
|
+
await this.expectBodyTextareaControlsToExist(false);
|
|
8719
|
+
await this.setPriority(priority);
|
|
8720
|
+
await this.expectModalCancelButtonToBeEnabled();
|
|
8721
|
+
await this.hasPriority(priority);
|
|
8722
|
+
await this.expectModalCancelButtonToBeEnabled();
|
|
8723
|
+
await this.setSubject(subject);
|
|
8724
|
+
await this.expectModalCancelButtonToBeEnabled();
|
|
8725
|
+
await this.hasSubject(subject);
|
|
8726
|
+
await this.setBody(body);
|
|
8727
|
+
await this.expectModalCancelButtonToBeEnabled();
|
|
8728
|
+
await this.hasBody(body);
|
|
8729
|
+
await this.expectModalControlButtonsToBeEnabled();
|
|
8730
|
+
return this;
|
|
8731
|
+
}
|
|
8732
|
+
async changeEmailDataSaveChangesAndAssert(priority, subject, body) {
|
|
8733
|
+
await this.changeEmailDataWithAssertion(priority, subject, body);
|
|
8734
|
+
await this.save();
|
|
8735
|
+
await this.expectNotificationSettingsModalToBeVisible(false);
|
|
8736
|
+
return this;
|
|
8737
|
+
}
|
|
8738
|
+
async changeEmailDataCancelChangesAndAssert(priority, subject, body) {
|
|
8739
|
+
await this.changeEmailDataWithAssertion(priority, subject, body);
|
|
8740
|
+
await this.cancel();
|
|
8741
|
+
await this.expectLeaveConfirmationModalToBeVisible();
|
|
8742
|
+
await this.confirmLeave();
|
|
8743
|
+
return this;
|
|
8744
|
+
}
|
|
8745
|
+
async expectLeaveConfirmationModalToBeVisible(shouldBeVisible = true) {
|
|
8746
|
+
shouldBeVisible ? await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".leave-confirmation-dialog")).toBeVisible() : await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".leave-confirmation-dialog")).toHaveCount(0);
|
|
8747
|
+
return this;
|
|
8748
|
+
}
|
|
8749
|
+
async openModalAndExpectData(priority, subject, body) {
|
|
8750
|
+
await this.hasPriority(priority);
|
|
8751
|
+
await this.hasSubject(subject);
|
|
8752
|
+
await this.hasBody(body);
|
|
8753
|
+
return this;
|
|
8754
|
+
}
|
|
8755
|
+
}
|
|
8756
|
+
|
|
8757
|
+
|
|
8758
|
+
class $5009000f2e5d0829$export$7a236355ab05cdda extends (0, $d1277b6afa4c07cc$export$399378eed9c024e7) {
|
|
8759
|
+
constructor(page){
|
|
8760
|
+
super(page);
|
|
8761
|
+
}
|
|
8762
|
+
async getResetButtonElement() {
|
|
8763
|
+
return this.page.getByTestId("reset-btn");
|
|
8764
|
+
}
|
|
8765
|
+
async getSaveButtonElement() {
|
|
8766
|
+
return this.page.getByTestId("save-btn");
|
|
8767
|
+
}
|
|
8768
|
+
async getSuggestionTag() {
|
|
8769
|
+
return this.page.locator(".xlr-tags-suggestions .tag-label");
|
|
8770
|
+
}
|
|
8771
|
+
async getSuggestedRoleElement(roleName) {
|
|
8772
|
+
return this.page.locator(`.xlr-tags-suggestions .tag-label`).filter({
|
|
8773
|
+
hasText: roleName
|
|
8774
|
+
});
|
|
8775
|
+
}
|
|
8776
|
+
async selectSuggestedRole(roleName) {
|
|
8777
|
+
await (await this.getSuggestedRoleElement(roleName)).click();
|
|
8778
|
+
return this;
|
|
8779
|
+
}
|
|
8780
|
+
async getEventElement(eventName) {
|
|
8781
|
+
return this.page.locator(`tbody > tr `).filter({
|
|
8782
|
+
hasText: eventName
|
|
8783
|
+
});
|
|
8784
|
+
}
|
|
8785
|
+
async getEventRowElement(eventName) {
|
|
8786
|
+
return (await this.getEventElement(eventName)).locator("td");
|
|
8787
|
+
}
|
|
8788
|
+
async getRoleElementFromEvent(eventName, roleName) {
|
|
8789
|
+
return (await this.getEventRowElement(eventName)).locator(`.role-cell .tag.role span`).filter({
|
|
8790
|
+
hasText: roleName
|
|
8791
|
+
});
|
|
8792
|
+
}
|
|
8793
|
+
async expectResetButtonToBeEnabled(shouldBeEnabled = true) {
|
|
8794
|
+
shouldBeEnabled ? await (0, $kKeXs$playwrighttest.expect)(await this.getResetButtonElement()).toBeEnabled() : await (0, $kKeXs$playwrighttest.expect)(await this.getResetButtonElement()).toBeDisabled();
|
|
8795
|
+
return this;
|
|
8796
|
+
}
|
|
8797
|
+
async expectSaveButtonToBeEnabled(shouldBeEnabled = true) {
|
|
8798
|
+
shouldBeEnabled ? await (0, $kKeXs$playwrighttest.expect)(await this.getSaveButtonElement()).toBeEnabled() : await (0, $kKeXs$playwrighttest.expect)(await this.getSaveButtonElement()).toBeDisabled();
|
|
8799
|
+
return this;
|
|
8800
|
+
}
|
|
8801
|
+
async expectTableWithRecipients(tableTitle, recipientEnabled) {
|
|
8802
|
+
const countElement = this.page.locator(`.collapsible-component`).filter({
|
|
8803
|
+
hasText: tableTitle
|
|
8804
|
+
}).locator(`.tags.react-tags-wrapper`);
|
|
8805
|
+
recipientEnabled ? (0, $kKeXs$playwrighttest.expect)(await countElement.count()).toBeGreaterThan(0) : (0, $kKeXs$playwrighttest.expect)(await countElement.count()).toBe(0);
|
|
8806
|
+
return this;
|
|
8807
|
+
}
|
|
8808
|
+
async typeRoleText(eventId, roleText) {
|
|
8809
|
+
await this.page.locator(`.events-permissions-table input#${eventId}`).fill(roleText);
|
|
8810
|
+
return this;
|
|
8811
|
+
}
|
|
8812
|
+
async addRoleToEvent(eventId, roleName) {
|
|
8813
|
+
await this.typeRoleText(eventId, roleName);
|
|
8814
|
+
await this.selectSuggestedRole(roleName);
|
|
8815
|
+
return this;
|
|
8816
|
+
}
|
|
8817
|
+
async removeRoleFromEvent(eventId, roleName) {
|
|
8818
|
+
const roleElem = await this.getRoleElementFromEvent(roleName, eventId);
|
|
8819
|
+
await roleElem.locator(".role .tag-close").click();
|
|
8820
|
+
return this;
|
|
8821
|
+
}
|
|
8822
|
+
async expectSuggestionTagToHaveText(expectedText) {
|
|
8823
|
+
await (0, $kKeXs$playwrighttest.expect)(await this.getSuggestionTag()).toHaveText(expectedText);
|
|
8824
|
+
return this;
|
|
8825
|
+
}
|
|
8826
|
+
async expectCancelAndSaveButtonsToBeEnabled(shouldBeEnabled = true) {
|
|
8827
|
+
shouldBeEnabled ? await (0, $kKeXs$playwrighttest.expect)(await this.getResetButtonElement()).toBeEnabled() : await (0, $kKeXs$playwrighttest.expect)(await this.getSaveButtonElement()).toBeDisabled();
|
|
8828
|
+
return this;
|
|
8829
|
+
}
|
|
8830
|
+
async addRoleToEventWithAssertions(eventName, roleName) {
|
|
8831
|
+
await this.typeRoleTagNameInEventInput(eventName, roleName);
|
|
8832
|
+
await this.expectSuggestedRoleToBeVisible(roleName);
|
|
8833
|
+
await this.selectSuggestedRole(roleName);
|
|
8834
|
+
await this.expectRoleTagToBePresentOnEvent(eventName, roleName);
|
|
8835
|
+
await this.expectCancelAndSaveButtonsToBeEnabled();
|
|
8836
|
+
return this;
|
|
8837
|
+
}
|
|
8838
|
+
async removeRoleAndAssert(eventName, roleName) {
|
|
8839
|
+
await this.expectTablesToBeInReadOnlyMode(false);
|
|
8840
|
+
await this.removeRoleTagFromEvent(eventName, roleName);
|
|
8841
|
+
await this.expectRoleTagToBePresentOnEvent(eventName, roleName, false);
|
|
8842
|
+
await this.expectCancelAndSaveButtonsToBeEnabled();
|
|
8843
|
+
return this;
|
|
8844
|
+
}
|
|
8845
|
+
async openEditMessageFromEvent(eventName) {
|
|
8846
|
+
await this.page.locator(`[data-test="${await this.toConstantFormat(eventName)}"]`).getByText("Edit Message").click();
|
|
8847
|
+
return new (0, $d1277b6afa4c07cc$export$6c8a73a99892a2a4)(this.page);
|
|
8848
|
+
}
|
|
8849
|
+
}
|
|
8850
|
+
|
|
8851
|
+
|
|
8384
8852
|
class $dbc8f157e7b24b12$export$2edf430132ca35d0 extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
8385
8853
|
constructor(page){
|
|
8386
8854
|
super(page);
|
|
@@ -8390,18 +8858,22 @@ class $dbc8f157e7b24b12$export$2edf430132ca35d0 extends (0, $f8721861c660dd88$ex
|
|
|
8390
8858
|
async openGeneralSettings() {
|
|
8391
8859
|
await this.util.openSideNavMenu("General");
|
|
8392
8860
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("General")).toBeVisible();
|
|
8861
|
+
return new $dbc8f157e7b24b12$export$b8732a8d21d8bf63(this.page);
|
|
8393
8862
|
}
|
|
8394
8863
|
async openReleasesAndTriggers() {
|
|
8395
8864
|
await this.util.openSideNavMenu("Releases and Triggers");
|
|
8396
8865
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Releases and Triggers")).toBeVisible();
|
|
8866
|
+
return new (0, $346eca383b14ff13$export$3966fb3c0478db68)(this.page);
|
|
8397
8867
|
}
|
|
8398
8868
|
async openTasks() {
|
|
8399
8869
|
await this.util.openSideNavMenu("Tasks");
|
|
8400
8870
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Tasks")).toBeVisible();
|
|
8871
|
+
return new (0, $867b32e9296b4f52$export$c33e44a4a9202d88)(this.page);
|
|
8401
8872
|
}
|
|
8402
8873
|
async openReports() {
|
|
8403
8874
|
await this.util.openSideNavMenu("Reports");
|
|
8404
8875
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Reports")).toBeVisible();
|
|
8876
|
+
return new (0, $249973ff3670aa42$export$5c92082c2afdcc2c)(this.page);
|
|
8405
8877
|
}
|
|
8406
8878
|
async openAdvanced() {
|
|
8407
8879
|
await this.util.openSideNavMenu("Advanced");
|
|
@@ -8416,6 +8888,7 @@ class $dbc8f157e7b24b12$export$2edf430132ca35d0 extends (0, $f8721861c660dd88$ex
|
|
|
8416
8888
|
async openNotifications() {
|
|
8417
8889
|
await this.util.openSideNavMenu("Notifications");
|
|
8418
8890
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("Notifications")).toBeVisible();
|
|
8891
|
+
return new (0, $5009000f2e5d0829$export$7a236355ab05cdda)(this.page);
|
|
8419
8892
|
}
|
|
8420
8893
|
async openRiskProfiles() {
|
|
8421
8894
|
await this.util.openSideNavMenu("Risk profiles");
|
|
@@ -8430,6 +8903,110 @@ class $dbc8f157e7b24b12$export$2edf430132ca35d0 extends (0, $f8721861c660dd88$ex
|
|
|
8430
8903
|
await this.util.openSideNavMenu("SMTP server");
|
|
8431
8904
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByLabel("breadcrumb").getByText("SMTP server")).toBeVisible();
|
|
8432
8905
|
}
|
|
8906
|
+
async _saveDoNotAssert() {
|
|
8907
|
+
// Check if the "Save" button is enabled and save if needed
|
|
8908
|
+
const saveButton = await this.page.getByTestId("save-button").isDisabled();
|
|
8909
|
+
if (!saveButton) await this.page.getByTestId("save-button").click();
|
|
8910
|
+
}
|
|
8911
|
+
async expectCards(cardTitles) {
|
|
8912
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.settings-card .dot-card-header-title`)).toHaveCount(cardTitles.length);
|
|
8913
|
+
for(let i = 0; i < cardTitles.length; i++){
|
|
8914
|
+
const cardTitle = cardTitles[i];
|
|
8915
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`.settings-card .dot-card-header-title`).filter({
|
|
8916
|
+
hasText: cardTitle
|
|
8917
|
+
})).toBeVisible();
|
|
8918
|
+
}
|
|
8919
|
+
return this;
|
|
8920
|
+
}
|
|
8921
|
+
async save() {
|
|
8922
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("save-button")).toBeVisible();
|
|
8923
|
+
await this.page.getByTestId("save-button").click();
|
|
8924
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".success").filter({
|
|
8925
|
+
hasText: "Changes saved successfully"
|
|
8926
|
+
})).toBeVisible();
|
|
8927
|
+
await this.page.locator(".success").getByRole("button").click();
|
|
8928
|
+
return this;
|
|
8929
|
+
}
|
|
8930
|
+
async reset() {
|
|
8931
|
+
await this.page.getByTestId(`reset-button`).click();
|
|
8932
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("reset-button")).toBeDisabled();
|
|
8933
|
+
return this;
|
|
8934
|
+
}
|
|
8935
|
+
}
|
|
8936
|
+
class $dbc8f157e7b24b12$export$b8732a8d21d8bf63 extends $dbc8f157e7b24b12$export$2edf430132ca35d0 {
|
|
8937
|
+
constructor(page){
|
|
8938
|
+
super(page);
|
|
8939
|
+
}
|
|
8940
|
+
async setInstanceName(value) {
|
|
8941
|
+
await this.page.locator("input#headerName").click({
|
|
8942
|
+
force: true
|
|
8943
|
+
});
|
|
8944
|
+
await this.page.getByRole("textbox", {
|
|
8945
|
+
name: "Instance name"
|
|
8946
|
+
}).fill(value);
|
|
8947
|
+
return this;
|
|
8948
|
+
}
|
|
8949
|
+
async setLoginMessage(message) {
|
|
8950
|
+
await this.page.locator("div#loginMessage").click({
|
|
8951
|
+
force: true
|
|
8952
|
+
});
|
|
8953
|
+
const input = this.page.locator("input#loginMessage");
|
|
8954
|
+
const currentValue = await input.inputValue();
|
|
8955
|
+
if (currentValue.trim() !== "") await input.fill("");
|
|
8956
|
+
await input.fill(message);
|
|
8957
|
+
await input.press("Tab");
|
|
8958
|
+
return this;
|
|
8959
|
+
}
|
|
8960
|
+
async clearLoginMessage() {
|
|
8961
|
+
await this.page.locator("div#loginMessage").click({
|
|
8962
|
+
force: true
|
|
8963
|
+
});
|
|
8964
|
+
const input = this.page.locator("input#loginMessage");
|
|
8965
|
+
await input.fill("");
|
|
8966
|
+
await input.press("Tab");
|
|
8967
|
+
return this;
|
|
8968
|
+
}
|
|
8969
|
+
async setHeaderColor(colorName) {
|
|
8970
|
+
await this.page.locator(".color-picker button").click({
|
|
8971
|
+
force: true
|
|
8972
|
+
});
|
|
8973
|
+
await this.page.locator(`.color-picker-list-item`).getByText(colorName).click({
|
|
8974
|
+
force: true
|
|
8975
|
+
});
|
|
8976
|
+
return this;
|
|
8977
|
+
}
|
|
8978
|
+
async clickNotificationsMenu() {
|
|
8979
|
+
await this.util.openSideNavMenu("Notifications");
|
|
8980
|
+
}
|
|
8981
|
+
async expectInstanceName(value) {
|
|
8982
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("top-toolbar .dot-pill")).toHaveText(value);
|
|
8983
|
+
return this;
|
|
8984
|
+
}
|
|
8985
|
+
async restoreDefaultThemeSettings() {
|
|
8986
|
+
await this._clearHeaderInstanceName();
|
|
8987
|
+
await this.setHeaderColor("Green");
|
|
8988
|
+
await this._saveDoNotAssert();
|
|
8989
|
+
}
|
|
8990
|
+
async _clearHeaderInstanceName() {
|
|
8991
|
+
await this.page.locator("input#headerName").click({
|
|
8992
|
+
force: true
|
|
8993
|
+
});
|
|
8994
|
+
await this.page.locator("input#headerName").clear();
|
|
8995
|
+
}
|
|
8996
|
+
async expectHeaderColor(value) {
|
|
8997
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator("top-toolbar .dot-app-toolbar")).toHaveAttribute("style", `border-bottom-color: ${value};`);
|
|
8998
|
+
return this;
|
|
8999
|
+
}
|
|
9000
|
+
async expectConfirmationPopUp() {
|
|
9001
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("heading", {
|
|
9002
|
+
name: "Confirm leave"
|
|
9003
|
+
})).toBeVisible();
|
|
9004
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("paragraph")).toContainText("You have unsaved changes that will be lost.");
|
|
9005
|
+
await this.page.getByRole("button", {
|
|
9006
|
+
name: "Leave without saving"
|
|
9007
|
+
}).click();
|
|
9008
|
+
return this;
|
|
9009
|
+
}
|
|
8433
9010
|
}
|
|
8434
9011
|
|
|
8435
9012
|
|
|
@@ -8912,6 +9489,17 @@ class $258749e0671c845a$export$f14c0e3f98d164c0 extends (0, $f8721861c660dd88$ex
|
|
|
8912
9489
|
await this.page.waitForTimeout(1000);
|
|
8913
9490
|
await this.closePendoModalWindow();
|
|
8914
9491
|
}
|
|
9492
|
+
async loginWithoutReload(userName, password) {
|
|
9493
|
+
let loadTriggered = false;
|
|
9494
|
+
this.page.on("load", ()=>{
|
|
9495
|
+
loadTriggered = true;
|
|
9496
|
+
});
|
|
9497
|
+
await this.page.evaluate(()=>{
|
|
9498
|
+
window.location.hash = "#tasks";
|
|
9499
|
+
});
|
|
9500
|
+
(0, $kKeXs$playwrighttest.expect)(loadTriggered).toBe(false);
|
|
9501
|
+
await this.login(userName, password);
|
|
9502
|
+
}
|
|
8915
9503
|
/**
|
|
8916
9504
|
* Logout as authenticated user
|
|
8917
9505
|
*/ async logout() {
|
|
@@ -8937,6 +9525,18 @@ class $258749e0671c845a$export$f14c0e3f98d164c0 extends (0, $f8721861c660dd88$ex
|
|
|
8937
9525
|
await this.page.waitForTimeout(1000);
|
|
8938
9526
|
if (await this.page.locator("._pendo-close-guide").count() > 0) await this.page.locator("._pendo-close-guide").click();
|
|
8939
9527
|
}
|
|
9528
|
+
async expectUserNotVisible() {
|
|
9529
|
+
const tooltip = this.page.locator("top-toolbar .avatar-wrapper .dot-tooltip");
|
|
9530
|
+
await tooltip.waitFor({
|
|
9531
|
+
state: "hidden"
|
|
9532
|
+
});
|
|
9533
|
+
}
|
|
9534
|
+
async expectUserVisible() {
|
|
9535
|
+
const tooltip = this.page.locator("top-toolbar .avatar-wrapper .dot-tooltip");
|
|
9536
|
+
await tooltip.waitFor({
|
|
9537
|
+
state: "visible"
|
|
9538
|
+
});
|
|
9539
|
+
}
|
|
8940
9540
|
}
|
|
8941
9541
|
|
|
8942
9542
|
|