@digital-ai/devops-page-object-release 0.0.39 → 0.0.40
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 +8 -0
- package/dist/main.js +143 -23
- package/dist/main.js.map +1 -1
- package/dist/module.js +143 -23
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +23 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @digital-ai/devops-page-object-release
|
|
2
2
|
|
|
3
|
+
## 0.0.40
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4067557: S-118970: Migrated task-lock-scenario in playwright
|
|
8
|
+
- 5d8b574: Reduce flaky v2
|
|
9
|
+
- b3befac: S-119232: Migrated parallel-task-scenario in playwright
|
|
10
|
+
|
|
3
11
|
## 0.0.39
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -1097,6 +1097,22 @@ class $87643f2d97b0644e$export$a678525e79c4ccc4 extends (0, $f8721861c660dd88$ex
|
|
|
1097
1097
|
});
|
|
1098
1098
|
await (0, $kKeXs$playwrighttest.expect)(releaseStatus).toBeVisible();
|
|
1099
1099
|
}
|
|
1100
|
+
async expectReleaseFailing(releaseTitle) {
|
|
1101
|
+
const releaseStatus = this.page.locator(".release").filter({
|
|
1102
|
+
hasText: releaseTitle
|
|
1103
|
+
}).locator(".release-status").filter({
|
|
1104
|
+
hasText: "Failing"
|
|
1105
|
+
});
|
|
1106
|
+
await (0, $kKeXs$playwrighttest.expect)(releaseStatus).toBeVisible();
|
|
1107
|
+
}
|
|
1108
|
+
async expectReleaseCompleted(releaseTitle) {
|
|
1109
|
+
const releaseStatus = this.page.locator(".release").filter({
|
|
1110
|
+
hasText: releaseTitle
|
|
1111
|
+
}).locator(".release-status").filter({
|
|
1112
|
+
hasText: "Completed"
|
|
1113
|
+
});
|
|
1114
|
+
await (0, $kKeXs$playwrighttest.expect)(releaseStatus).toBeVisible();
|
|
1115
|
+
}
|
|
1100
1116
|
async filterReleaseByAllStatus() {
|
|
1101
1117
|
await this.page.locator(".ci-status .remaining-tags").getByText("more").click();
|
|
1102
1118
|
await this.page.locator(".ci-status .xl-react-link").getByText("Select all").click();
|
|
@@ -1557,16 +1573,25 @@ class $59543fc69900e8db$var$VariableModal extends (0, $f8721861c660dd88$export$2
|
|
|
1557
1573
|
}
|
|
1558
1574
|
async createPossibleValuesVariable(variableName) {
|
|
1559
1575
|
await this.page.locator(".variable-toggle button").click();
|
|
1560
|
-
await
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1576
|
+
await (0, $kKeXs$playwrighttest.expect)(async ()=>{
|
|
1577
|
+
await this.page.locator(".ui-autocomplete-input").clear();
|
|
1578
|
+
await this.page.locator(".ui-autocomplete-input").fill(variableName);
|
|
1579
|
+
const check = await this.page.locator(".ui-menu-item-wrapper").getByText("${" + variableName + "}", {
|
|
1580
|
+
exact: true
|
|
1581
|
+
}).isVisible({
|
|
1582
|
+
timeout: 1000
|
|
1583
|
+
});
|
|
1584
|
+
if (check) await this.page.locator(".ui-menu-item-wrapper").getByText("${" + variableName + "}", {
|
|
1585
|
+
exact: true
|
|
1586
|
+
}).click({
|
|
1587
|
+
timeout: 1000
|
|
1588
|
+
});
|
|
1589
|
+
else await this.page.locator(".ui-menu-item-wrapper").filter({
|
|
1590
|
+
hasText: `${variableName}`
|
|
1591
|
+
}).click({
|
|
1592
|
+
timeout: 1000
|
|
1593
|
+
});
|
|
1594
|
+
}).toPass();
|
|
1570
1595
|
}
|
|
1571
1596
|
async expectVariableValueToBe(value) {
|
|
1572
1597
|
(0, $kKeXs$playwrighttest.expect)(await this.page.locator('.variable-value select option[selected="selected"]').textContent()).toBe(value);
|
|
@@ -2036,6 +2061,11 @@ class $eb81c1b930e440ff$export$519356f6c50361f7 extends (0, $f8721861c660dd88$ex
|
|
|
2036
2061
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`[data-test-id="${propertyName}"]`).getByText(value)).toBeVisible();
|
|
2037
2062
|
return this;
|
|
2038
2063
|
}
|
|
2064
|
+
async expectDisabledInputField(propertyName) {
|
|
2065
|
+
const inputField = this.railLocator.locator(`.task-input-property input[id="${propertyName}"]`);
|
|
2066
|
+
if (await inputField.isVisible()) await (0, $kKeXs$playwrighttest.expect)(inputField).toHaveAttribute("readonly", "");
|
|
2067
|
+
return this;
|
|
2068
|
+
}
|
|
2039
2069
|
async expectRiskProfileValue(value) {
|
|
2040
2070
|
await (0, $kKeXs$playwrighttest.expect)(this.railLocator.locator("#riskProfileId")).toHaveValue(value);
|
|
2041
2071
|
}
|
|
@@ -3458,6 +3488,8 @@ class $c5c393ea4aecca6c$export$649fde34d823ece7 extends (0, $f8721861c660dd88$ex
|
|
|
3458
3488
|
constructor(page){
|
|
3459
3489
|
super(page);
|
|
3460
3490
|
this.commentBox = this.page.locator(`.input-block-level`);
|
|
3491
|
+
this.contextMenuButton = this.page.locator("#context-menu-container li");
|
|
3492
|
+
this.completeButton = this.page.getByTestId("release-grid-complete-btn");
|
|
3461
3493
|
this.dateUtil = new (0, $880df57ffbf6e614$export$9b575f14aa5e09a1)(page);
|
|
3462
3494
|
this.refreshButton = this.page.getByTestId("refresh-btn");
|
|
3463
3495
|
this.taskDrawer = new (0, $6a21661eb4695574$export$e946776eae644790)(page);
|
|
@@ -3469,8 +3501,12 @@ class $c5c393ea4aecca6c$export$649fde34d823ece7 extends (0, $f8721861c660dd88$ex
|
|
|
3469
3501
|
}
|
|
3470
3502
|
// eslint-disable-next-line max-params
|
|
3471
3503
|
async callMenuOptionsForTask(taskTitle, option, taskGroup, taskType) {
|
|
3472
|
-
await
|
|
3473
|
-
|
|
3504
|
+
await (0, $kKeXs$playwrighttest.expect)(async ()=>{
|
|
3505
|
+
await this.openContextMenuForTask(taskTitle);
|
|
3506
|
+
await this.page.locator(".dropdown-menu li").getByText(option).click({
|
|
3507
|
+
timeout: 1000
|
|
3508
|
+
});
|
|
3509
|
+
}).toPass();
|
|
3474
3510
|
if (await this.commentBox.isVisible()) await this.commentBox.fill(" Automation Test Comment");
|
|
3475
3511
|
else if (await this.page.getByRole("heading", {
|
|
3476
3512
|
name: "Change task type"
|
|
@@ -3604,7 +3640,7 @@ class $c5c393ea4aecca6c$export$649fde34d823ece7 extends (0, $f8721861c660dd88$ex
|
|
|
3604
3640
|
return this;
|
|
3605
3641
|
}
|
|
3606
3642
|
async completeSelectedTasks(comment) {
|
|
3607
|
-
await this.
|
|
3643
|
+
await this.completeButton.click();
|
|
3608
3644
|
await this.page.getByPlaceholder("Give feedback or place a").fill(comment);
|
|
3609
3645
|
await this.page.locator(".modal-footer").getByRole("button", {
|
|
3610
3646
|
name: "Complete"
|
|
@@ -3661,6 +3697,47 @@ class $c5c393ea4aecca6c$export$649fde34d823ece7 extends (0, $f8721861c660dd88$ex
|
|
|
3661
3697
|
await this.page.keyboard.up("Shift");
|
|
3662
3698
|
return this;
|
|
3663
3699
|
}
|
|
3700
|
+
async isContextualMenuItemEnabled(menuName, taskTitle) {
|
|
3701
|
+
await this.openContextMenuForTask(taskTitle);
|
|
3702
|
+
await (0, $kKeXs$playwrighttest.expect)(this.contextMenuButton.filter({
|
|
3703
|
+
hasText: menuName
|
|
3704
|
+
})).not.toHaveClass(/disabled/);
|
|
3705
|
+
await (0, $kKeXs$playwrighttest.expect)(this.contextMenuButton.filter({
|
|
3706
|
+
hasText: menuName
|
|
3707
|
+
}).locator("a")).not.toBeDisabled();
|
|
3708
|
+
await this.closeContextMenu();
|
|
3709
|
+
}
|
|
3710
|
+
async isContextualMenuItemDisabled(menuName, taskTitle) {
|
|
3711
|
+
await this.openContextMenuForTask(taskTitle);
|
|
3712
|
+
const menuItem = this.contextMenuButton.filter({
|
|
3713
|
+
hasText: menuName
|
|
3714
|
+
});
|
|
3715
|
+
await (0, $kKeXs$playwrighttest.expect)(menuItem).toHaveClass(/disabled/);
|
|
3716
|
+
const anchorTag = menuItem.locator("a");
|
|
3717
|
+
const disabledAttribute = await anchorTag.getAttribute("disabled");
|
|
3718
|
+
(0, $kKeXs$playwrighttest.expect)(disabledAttribute).not.toBeNull();
|
|
3719
|
+
await this.closeContextMenu();
|
|
3720
|
+
}
|
|
3721
|
+
async closeContextMenu() {
|
|
3722
|
+
await this.page.locator("#release-header").click();
|
|
3723
|
+
}
|
|
3724
|
+
async expectDisabledActions(actionName) {
|
|
3725
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId(`release-grid-${actionName}-btn`)).toBeDisabled();
|
|
3726
|
+
return this;
|
|
3727
|
+
}
|
|
3728
|
+
async expectDisabledActionsOnMoreActionsMenu(menuItem) {
|
|
3729
|
+
await this.page.getByTestId("release-grid-dropdown-btn").click();
|
|
3730
|
+
if (menuItem instanceof Array) for (const val of menuItem)await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("button", {
|
|
3731
|
+
name: val,
|
|
3732
|
+
exact: true
|
|
3733
|
+
})).toBeDisabled();
|
|
3734
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("button", {
|
|
3735
|
+
name: menuItem,
|
|
3736
|
+
exact: true
|
|
3737
|
+
})).toBeDisabled();
|
|
3738
|
+
await this.closeContextMenu();
|
|
3739
|
+
return this;
|
|
3740
|
+
}
|
|
3664
3741
|
}
|
|
3665
3742
|
|
|
3666
3743
|
|
|
@@ -4108,12 +4185,12 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
4108
4185
|
await downloadPromise;
|
|
4109
4186
|
}
|
|
4110
4187
|
async expectTaskToBePresent(taskName) {
|
|
4111
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task").filter({
|
|
4188
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task .task-title").filter({
|
|
4112
4189
|
hasText: taskName
|
|
4113
4190
|
})).toBeVisible();
|
|
4114
4191
|
}
|
|
4115
4192
|
async expectTaskNotToBePresent(taskName) {
|
|
4116
|
-
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task").filter({
|
|
4193
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task .task-title").filter({
|
|
4117
4194
|
hasText: taskName
|
|
4118
4195
|
})).not.toBeVisible();
|
|
4119
4196
|
}
|
|
@@ -4151,6 +4228,12 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
4151
4228
|
async expectAddTaskNotVisible() {
|
|
4152
4229
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".add-task.link")).not.toBeVisible();
|
|
4153
4230
|
}
|
|
4231
|
+
async expectTaskCount(count) {
|
|
4232
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".task-container").count()).toBe(count);
|
|
4233
|
+
}
|
|
4234
|
+
async expectCurrentTaskCount(count) {
|
|
4235
|
+
(0, $kKeXs$playwrighttest.expect)(await this.page.locator(".task.active").count()).toBe(count);
|
|
4236
|
+
}
|
|
4154
4237
|
}
|
|
4155
4238
|
class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
4156
4239
|
constructor(page, phaseName){
|
|
@@ -4168,8 +4251,8 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
4168
4251
|
await this.phaseLocator.locator(".phase-header input").fill(title);
|
|
4169
4252
|
await this.phaseLocator.locator(".phase-header input").blur();
|
|
4170
4253
|
}
|
|
4171
|
-
async isMenuItemEnabled(menuName, taskTitle) {
|
|
4172
|
-
await this.openContextMenuForTask(taskTitle);
|
|
4254
|
+
async isMenuItemEnabled(menuName, taskTitle, group = false) {
|
|
4255
|
+
await this.openContextMenuForTask(taskTitle, group);
|
|
4173
4256
|
await (0, $kKeXs$playwrighttest.expect)(this.contextMenuButton.filter({
|
|
4174
4257
|
hasText: menuName
|
|
4175
4258
|
})).not.toHaveClass(/disabled/);
|
|
@@ -4178,8 +4261,8 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
4178
4261
|
}).locator("a")).not.toBeDisabled();
|
|
4179
4262
|
await this.closeContextMenu();
|
|
4180
4263
|
}
|
|
4181
|
-
async isMenuItemDisabled(menuName, taskTitle) {
|
|
4182
|
-
await this.openContextMenuForTask(taskTitle);
|
|
4264
|
+
async isMenuItemDisabled(menuName, taskTitle, group = false) {
|
|
4265
|
+
await this.openContextMenuForTask(taskTitle, group);
|
|
4183
4266
|
const menuItem = this.contextMenuButton.filter({
|
|
4184
4267
|
hasText: menuName
|
|
4185
4268
|
});
|
|
@@ -4232,8 +4315,11 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
4232
4315
|
async expectToHaveTitle(phaseTitle) {
|
|
4233
4316
|
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".phase-title")).toContainText(phaseTitle);
|
|
4234
4317
|
}
|
|
4235
|
-
async openContextMenuForTask(taskTitle) {
|
|
4236
|
-
await this.phaseLocator.locator(".task").filter({
|
|
4318
|
+
async openContextMenuForTask(taskTitle, group = false) {
|
|
4319
|
+
if (!group) await this.phaseLocator.locator(".task").filter({
|
|
4320
|
+
hasText: taskTitle
|
|
4321
|
+
}).locator(".context-menu-button").click();
|
|
4322
|
+
else await this.phaseLocator.locator(".task-group .task").filter({
|
|
4237
4323
|
hasText: taskTitle
|
|
4238
4324
|
}).locator(".context-menu-button").click();
|
|
4239
4325
|
}
|
|
@@ -4265,6 +4351,16 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
4265
4351
|
}).click();
|
|
4266
4352
|
return this;
|
|
4267
4353
|
}
|
|
4354
|
+
async unlockFromContextMenu(taskTitle, group = false) {
|
|
4355
|
+
await this.openContextMenuForTask(taskTitle, group);
|
|
4356
|
+
await this.page.locator(".dropdown-menu li").getByText("Unlock").click();
|
|
4357
|
+
await this.expectLockCheckMark(taskTitle, false);
|
|
4358
|
+
}
|
|
4359
|
+
async lockFromContextMenu(taskTitle, group = false) {
|
|
4360
|
+
await this.openContextMenuForTask(taskTitle, group);
|
|
4361
|
+
await this.page.locator(".dropdown-menu li").getByText("Lock").click();
|
|
4362
|
+
await this.expectLockCheckMark(taskTitle, true);
|
|
4363
|
+
}
|
|
4268
4364
|
async expectChangeTypeContextMenuDisabled(taskTitle, taskGroup, taskType) {
|
|
4269
4365
|
await this.openContextMenuForTask(taskTitle);
|
|
4270
4366
|
await this.page.locator(".dropdown-menu li").getByText("Change type").click();
|
|
@@ -4282,6 +4378,15 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
4282
4378
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-type-gatetask .marker-check-icon")).toBeVisible();
|
|
4283
4379
|
return this;
|
|
4284
4380
|
}
|
|
4381
|
+
async expectLockCheckMark(taskTitle, isVisible = true) {
|
|
4382
|
+
if (isVisible) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-header").filter({
|
|
4383
|
+
hasText: taskTitle
|
|
4384
|
+
}).locator(".lock-icon")).toBeVisible();
|
|
4385
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task-header").filter({
|
|
4386
|
+
hasText: taskTitle
|
|
4387
|
+
}).locator(".lock-icon")).not.toBeVisible();
|
|
4388
|
+
return this;
|
|
4389
|
+
}
|
|
4285
4390
|
async expectFailureHandlerCheckMar(taskTitle, isVisible = true) {
|
|
4286
4391
|
if (isVisible) await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".task").filter({
|
|
4287
4392
|
hasText: taskTitle
|
|
@@ -4394,10 +4499,10 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
4394
4499
|
await this.page.getByText("View all completed phases").click();
|
|
4395
4500
|
}
|
|
4396
4501
|
async expectTaskToBePresent(taskName, visible = true) {
|
|
4397
|
-
if (visible) await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task").filter({
|
|
4502
|
+
if (visible) await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task .task-title").filter({
|
|
4398
4503
|
hasText: taskName
|
|
4399
4504
|
})).toBeVisible();
|
|
4400
|
-
else await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task").filter({
|
|
4505
|
+
else await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task .task-title").filter({
|
|
4401
4506
|
hasText: taskName
|
|
4402
4507
|
})).not.toBeVisible();
|
|
4403
4508
|
}
|
|
@@ -4471,6 +4576,21 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
4471
4576
|
hasText: "Your request has been rejected, your permissions may have been revoked."
|
|
4472
4577
|
})).toBeVisible();
|
|
4473
4578
|
}
|
|
4579
|
+
async expectCurrentTaskCount(count) {
|
|
4580
|
+
(0, $kKeXs$playwrighttest.expect)(await this.phaseLocator.locator(".task.active").count()).toBe(count);
|
|
4581
|
+
}
|
|
4582
|
+
async expectCompletedTaskCount(count) {
|
|
4583
|
+
(0, $kKeXs$playwrighttest.expect)(await this.phaseLocator.locator(".task.completed").count()).toBe(count);
|
|
4584
|
+
}
|
|
4585
|
+
async expectFailedTaskCount(count) {
|
|
4586
|
+
(0, $kKeXs$playwrighttest.expect)(await this.phaseLocator.locator(".task.failed").count()).toBe(count);
|
|
4587
|
+
}
|
|
4588
|
+
async expectFailingTaskCount(count) {
|
|
4589
|
+
(0, $kKeXs$playwrighttest.expect)(await this.phaseLocator.locator(".task.failing").count()).toBe(count);
|
|
4590
|
+
}
|
|
4591
|
+
async expectSkippedTaskCount(count) {
|
|
4592
|
+
(0, $kKeXs$playwrighttest.expect)(await this.phaseLocator.locator(".task.skipped").count()).toBe(count);
|
|
4593
|
+
}
|
|
4474
4594
|
}
|
|
4475
4595
|
class $9b9a8c3da392d020$var$RestartPhaseModel extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
4476
4596
|
constructor(page){
|