@digital-ai/devops-page-object-release 0.0.28 → 0.0.29
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 +7 -0
- package/dist/main.js +76 -5
- package/dist/main.js.map +1 -1
- package/dist/module.js +76 -5
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/main.js
CHANGED
|
@@ -2435,6 +2435,16 @@ class $6a21661eb4695574$export$e946776eae644790 extends (0, $f8721861c660dd88$ex
|
|
|
2435
2435
|
async expectStartDateToBeDisplayed() {
|
|
2436
2436
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("start-date-title")).toHaveCount(1);
|
|
2437
2437
|
}
|
|
2438
|
+
async expectStartDayToBeInAvatar(expectedDay) {
|
|
2439
|
+
const startDayAvatar = this.page.locator(`.task-date-content .MuiAvatar-root[aria-label] `).nth(0);
|
|
2440
|
+
const startDay = await startDayAvatar.locator("..").locator("h3").textContent();
|
|
2441
|
+
(0, $kKeXs$playwrighttest.expect)(startDay?.trim()).toBe(expectedDay);
|
|
2442
|
+
}
|
|
2443
|
+
async expectEndDayToBeInAvatar(expectedDay) {
|
|
2444
|
+
const endDayAvatar = this.page.locator(`.task-date-content .MuiAvatar-root[aria-label] `).nth(1);
|
|
2445
|
+
const endDay = await endDayAvatar.locator("..").locator("h3").textContent();
|
|
2446
|
+
(0, $kKeXs$playwrighttest.expect)(endDay?.trim()).toBe(expectedDay);
|
|
2447
|
+
}
|
|
2438
2448
|
async expectEndDateToBeDisplayed() {
|
|
2439
2449
|
await (0, $kKeXs$playwrighttest.expect)(this.page.getByTestId("end-date-title")).toHaveCount(1);
|
|
2440
2450
|
}
|
|
@@ -3216,6 +3226,13 @@ class $9b9a8c3da392d020$export$f43492e8ac3c566 extends (0, $f8721861c660dd88$exp
|
|
|
3216
3226
|
getPhase(phaseName) {
|
|
3217
3227
|
return new $9b9a8c3da392d020$var$Phase(this.page, phaseName);
|
|
3218
3228
|
}
|
|
3229
|
+
async expectPhaseCountToBe(expectedPhaseCount) {
|
|
3230
|
+
const phaseCount = await this.page.locator(".phase").count();
|
|
3231
|
+
(0, $kKeXs$playwrighttest.expect)(phaseCount).toBe(expectedPhaseCount);
|
|
3232
|
+
}
|
|
3233
|
+
async expectVariableToBeFound(variableName) {
|
|
3234
|
+
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(`span.variable:has-text("${variableName}")`)).toHaveCount(1);
|
|
3235
|
+
}
|
|
3219
3236
|
async expectNotFlagged() {
|
|
3220
3237
|
await (0, $kKeXs$playwrighttest.expect)(this.page.locator(".flag-none-icon")).toBeHidden();
|
|
3221
3238
|
}
|
|
@@ -3583,12 +3600,13 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
3583
3600
|
}
|
|
3584
3601
|
async isMenuItemDisabled(menuName, taskTitle) {
|
|
3585
3602
|
await this.openContextMenuForTask(taskTitle);
|
|
3586
|
-
|
|
3587
|
-
hasText: menuName
|
|
3588
|
-
})).toHaveClass(/disabled/);
|
|
3589
|
-
await (0, $kKeXs$playwrighttest.expect)(this.contextMenuButton.filter({
|
|
3603
|
+
const menuItem = this.contextMenuButton.filter({
|
|
3590
3604
|
hasText: menuName
|
|
3591
|
-
})
|
|
3605
|
+
});
|
|
3606
|
+
await (0, $kKeXs$playwrighttest.expect)(menuItem).toHaveClass(/disabled/);
|
|
3607
|
+
const anchorTag = menuItem.locator("a");
|
|
3608
|
+
const disabledAttribute = await anchorTag.getAttribute("disabled");
|
|
3609
|
+
await (0, $kKeXs$playwrighttest.expect)(disabledAttribute).not.toBeNull();
|
|
3592
3610
|
await this.closeContextMenu();
|
|
3593
3611
|
}
|
|
3594
3612
|
async expectMenuItemIsNotVisible(menuName, taskTitle) {
|
|
@@ -3753,6 +3771,51 @@ class $9b9a8c3da392d020$var$Phase extends (0, $f8721861c660dd88$export$2b65d1d97
|
|
|
3753
3771
|
hasText: taskName
|
|
3754
3772
|
})).toBeVisible();
|
|
3755
3773
|
}
|
|
3774
|
+
async expectContainingTask(taskName, exist = true) {
|
|
3775
|
+
const taskHeaderLocator = this.phaseLocator.locator(".task-header").filter({
|
|
3776
|
+
hasText: taskName
|
|
3777
|
+
});
|
|
3778
|
+
if (exist) await (0, $kKeXs$playwrighttest.expect)(taskHeaderLocator).toContainText(taskName);
|
|
3779
|
+
else await (0, $kKeXs$playwrighttest.expect)(taskHeaderLocator).not.toContainText(taskName);
|
|
3780
|
+
}
|
|
3781
|
+
// eslint-disable-next-line max-params
|
|
3782
|
+
async addTaskInGroup(currentGroupType, taskTitle, taskGroup, taskType) {
|
|
3783
|
+
const groupTaskLocator = this.phaseLocator.filter({
|
|
3784
|
+
hasText: "Dev.Phase"
|
|
3785
|
+
}).locator("li").filter({
|
|
3786
|
+
hasText: currentGroupType
|
|
3787
|
+
}).locator("a.add-task.link");
|
|
3788
|
+
await groupTaskLocator.click();
|
|
3789
|
+
await this.page.locator("#task-selector").hover();
|
|
3790
|
+
await this.page.locator('button[aria-label="Clear"]').click();
|
|
3791
|
+
await this.page.locator("#task-selector").fill(taskGroup);
|
|
3792
|
+
await this.page.getByTestId(taskType).click();
|
|
3793
|
+
await this.page.locator(".icon-close").click();
|
|
3794
|
+
await this.page.locator("#task-title").fill(taskTitle);
|
|
3795
|
+
await this.page.getByTestId("save-select-task-btn").click();
|
|
3796
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.filter({
|
|
3797
|
+
hasText: currentGroupType
|
|
3798
|
+
}).getByText(taskTitle)).toBeVisible();
|
|
3799
|
+
}
|
|
3800
|
+
async openContextMenuForTaskInGroup(taskTitle, groupName) {
|
|
3801
|
+
const taskLocator = this.phaseLocator.filter({
|
|
3802
|
+
hasText: groupName
|
|
3803
|
+
}).locator(".task").filter({
|
|
3804
|
+
hasText: taskTitle
|
|
3805
|
+
});
|
|
3806
|
+
await taskLocator.locator(".task-inner-active > .task-container > .task-box > .task > .context-menu-button").click();
|
|
3807
|
+
}
|
|
3808
|
+
async duplicatePhase() {
|
|
3809
|
+
await this.phaseLocator.locator(".duplicate-phase").click();
|
|
3810
|
+
}
|
|
3811
|
+
async expectActionsDisabled() {
|
|
3812
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".duplicate-phase")).toHaveCount(0);
|
|
3813
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".delete-phase")).toHaveCount(0);
|
|
3814
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task .duplicate-task")).toHaveCount(0);
|
|
3815
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task .delete-task")).toHaveCount(0);
|
|
3816
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".task-generator .add-task")).toHaveCount(0);
|
|
3817
|
+
await (0, $kKeXs$playwrighttest.expect)(this.phaseLocator.locator(".display")).toHaveCount(0);
|
|
3818
|
+
}
|
|
3756
3819
|
}
|
|
3757
3820
|
class $9b9a8c3da392d020$var$RestartPhaseModel extends (0, $f8721861c660dd88$export$2b65d1d97338f32b) {
|
|
3758
3821
|
constructor(page){
|
|
@@ -5011,6 +5074,14 @@ class $3ceab7c613cabfd6$export$107317390f5aa598 extends (0, $f8721861c660dd88$ex
|
|
|
5011
5074
|
await this.modal.setConfirmPassword(password);
|
|
5012
5075
|
await this.modal.save();
|
|
5013
5076
|
}
|
|
5077
|
+
async filterUser(username) {
|
|
5078
|
+
await this.page.getByPlaceholder("Filter...").fill(username);
|
|
5079
|
+
}
|
|
5080
|
+
async expectToHaveFilteredUser(username) {
|
|
5081
|
+
return await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("row", {
|
|
5082
|
+
name: "" + username + ""
|
|
5083
|
+
})).toBeVisible();
|
|
5084
|
+
}
|
|
5014
5085
|
async expectToHaveLoginPermission(username) {
|
|
5015
5086
|
return await (0, $kKeXs$playwrighttest.expect)(this.page.getByRole("row", {
|
|
5016
5087
|
name: "" + username + ""
|