@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/dist/module.js
CHANGED
|
@@ -1499,6 +1499,16 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
|
|
|
1499
1499
|
async expectStartDateToBeDisplayed() {
|
|
1500
1500
|
await (0, $hOLA6$expect)(this.page.getByTestId("start-date-title")).toHaveCount(1);
|
|
1501
1501
|
}
|
|
1502
|
+
async expectStartDayToBeInAvatar(expectedDay) {
|
|
1503
|
+
const startDayAvatar = this.page.locator(`.task-date-content .MuiAvatar-root[aria-label] `).nth(0);
|
|
1504
|
+
const startDay = await startDayAvatar.locator("..").locator("h3").textContent();
|
|
1505
|
+
(0, $hOLA6$expect)(startDay?.trim()).toBe(expectedDay);
|
|
1506
|
+
}
|
|
1507
|
+
async expectEndDayToBeInAvatar(expectedDay) {
|
|
1508
|
+
const endDayAvatar = this.page.locator(`.task-date-content .MuiAvatar-root[aria-label] `).nth(1);
|
|
1509
|
+
const endDay = await endDayAvatar.locator("..").locator("h3").textContent();
|
|
1510
|
+
(0, $hOLA6$expect)(endDay?.trim()).toBe(expectedDay);
|
|
1511
|
+
}
|
|
1502
1512
|
async expectEndDateToBeDisplayed() {
|
|
1503
1513
|
await (0, $hOLA6$expect)(this.page.getByTestId("end-date-title")).toHaveCount(1);
|
|
1504
1514
|
}
|
|
@@ -2280,6 +2290,13 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
2280
2290
|
getPhase(phaseName) {
|
|
2281
2291
|
return new $43cbcdfccb6c2a76$var$Phase(this.page, phaseName);
|
|
2282
2292
|
}
|
|
2293
|
+
async expectPhaseCountToBe(expectedPhaseCount) {
|
|
2294
|
+
const phaseCount = await this.page.locator(".phase").count();
|
|
2295
|
+
(0, $hOLA6$expect)(phaseCount).toBe(expectedPhaseCount);
|
|
2296
|
+
}
|
|
2297
|
+
async expectVariableToBeFound(variableName) {
|
|
2298
|
+
await (0, $hOLA6$expect)(this.page.locator(`span.variable:has-text("${variableName}")`)).toHaveCount(1);
|
|
2299
|
+
}
|
|
2283
2300
|
async expectNotFlagged() {
|
|
2284
2301
|
await (0, $hOLA6$expect)(this.page.locator(".flag-none-icon")).toBeHidden();
|
|
2285
2302
|
}
|
|
@@ -2647,12 +2664,13 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
|
|
|
2647
2664
|
}
|
|
2648
2665
|
async isMenuItemDisabled(menuName, taskTitle) {
|
|
2649
2666
|
await this.openContextMenuForTask(taskTitle);
|
|
2650
|
-
|
|
2651
|
-
hasText: menuName
|
|
2652
|
-
})).toHaveClass(/disabled/);
|
|
2653
|
-
await (0, $hOLA6$expect)(this.contextMenuButton.filter({
|
|
2667
|
+
const menuItem = this.contextMenuButton.filter({
|
|
2654
2668
|
hasText: menuName
|
|
2655
|
-
})
|
|
2669
|
+
});
|
|
2670
|
+
await (0, $hOLA6$expect)(menuItem).toHaveClass(/disabled/);
|
|
2671
|
+
const anchorTag = menuItem.locator("a");
|
|
2672
|
+
const disabledAttribute = await anchorTag.getAttribute("disabled");
|
|
2673
|
+
await (0, $hOLA6$expect)(disabledAttribute).not.toBeNull();
|
|
2656
2674
|
await this.closeContextMenu();
|
|
2657
2675
|
}
|
|
2658
2676
|
async expectMenuItemIsNotVisible(menuName, taskTitle) {
|
|
@@ -2817,6 +2835,51 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
|
|
|
2817
2835
|
hasText: taskName
|
|
2818
2836
|
})).toBeVisible();
|
|
2819
2837
|
}
|
|
2838
|
+
async expectContainingTask(taskName, exist = true) {
|
|
2839
|
+
const taskHeaderLocator = this.phaseLocator.locator(".task-header").filter({
|
|
2840
|
+
hasText: taskName
|
|
2841
|
+
});
|
|
2842
|
+
if (exist) await (0, $hOLA6$expect)(taskHeaderLocator).toContainText(taskName);
|
|
2843
|
+
else await (0, $hOLA6$expect)(taskHeaderLocator).not.toContainText(taskName);
|
|
2844
|
+
}
|
|
2845
|
+
// eslint-disable-next-line max-params
|
|
2846
|
+
async addTaskInGroup(currentGroupType, taskTitle, taskGroup, taskType) {
|
|
2847
|
+
const groupTaskLocator = this.phaseLocator.filter({
|
|
2848
|
+
hasText: "Dev.Phase"
|
|
2849
|
+
}).locator("li").filter({
|
|
2850
|
+
hasText: currentGroupType
|
|
2851
|
+
}).locator("a.add-task.link");
|
|
2852
|
+
await groupTaskLocator.click();
|
|
2853
|
+
await this.page.locator("#task-selector").hover();
|
|
2854
|
+
await this.page.locator('button[aria-label="Clear"]').click();
|
|
2855
|
+
await this.page.locator("#task-selector").fill(taskGroup);
|
|
2856
|
+
await this.page.getByTestId(taskType).click();
|
|
2857
|
+
await this.page.locator(".icon-close").click();
|
|
2858
|
+
await this.page.locator("#task-title").fill(taskTitle);
|
|
2859
|
+
await this.page.getByTestId("save-select-task-btn").click();
|
|
2860
|
+
await (0, $hOLA6$expect)(this.phaseLocator.filter({
|
|
2861
|
+
hasText: currentGroupType
|
|
2862
|
+
}).getByText(taskTitle)).toBeVisible();
|
|
2863
|
+
}
|
|
2864
|
+
async openContextMenuForTaskInGroup(taskTitle, groupName) {
|
|
2865
|
+
const taskLocator = this.phaseLocator.filter({
|
|
2866
|
+
hasText: groupName
|
|
2867
|
+
}).locator(".task").filter({
|
|
2868
|
+
hasText: taskTitle
|
|
2869
|
+
});
|
|
2870
|
+
await taskLocator.locator(".task-inner-active > .task-container > .task-box > .task > .context-menu-button").click();
|
|
2871
|
+
}
|
|
2872
|
+
async duplicatePhase() {
|
|
2873
|
+
await this.phaseLocator.locator(".duplicate-phase").click();
|
|
2874
|
+
}
|
|
2875
|
+
async expectActionsDisabled() {
|
|
2876
|
+
await (0, $hOLA6$expect)(this.phaseLocator.locator(".duplicate-phase")).toHaveCount(0);
|
|
2877
|
+
await (0, $hOLA6$expect)(this.phaseLocator.locator(".delete-phase")).toHaveCount(0);
|
|
2878
|
+
await (0, $hOLA6$expect)(this.phaseLocator.locator(".task .duplicate-task")).toHaveCount(0);
|
|
2879
|
+
await (0, $hOLA6$expect)(this.phaseLocator.locator(".task .delete-task")).toHaveCount(0);
|
|
2880
|
+
await (0, $hOLA6$expect)(this.phaseLocator.locator(".task-generator .add-task")).toHaveCount(0);
|
|
2881
|
+
await (0, $hOLA6$expect)(this.phaseLocator.locator(".display")).toHaveCount(0);
|
|
2882
|
+
}
|
|
2820
2883
|
}
|
|
2821
2884
|
class $43cbcdfccb6c2a76$var$RestartPhaseModel extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
2822
2885
|
constructor(page){
|
|
@@ -4075,6 +4138,14 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
|
|
|
4075
4138
|
await this.modal.setConfirmPassword(password);
|
|
4076
4139
|
await this.modal.save();
|
|
4077
4140
|
}
|
|
4141
|
+
async filterUser(username) {
|
|
4142
|
+
await this.page.getByPlaceholder("Filter...").fill(username);
|
|
4143
|
+
}
|
|
4144
|
+
async expectToHaveFilteredUser(username) {
|
|
4145
|
+
return await (0, $hOLA6$expect)(this.page.getByRole("row", {
|
|
4146
|
+
name: "" + username + ""
|
|
4147
|
+
})).toBeVisible();
|
|
4148
|
+
}
|
|
4078
4149
|
async expectToHaveLoginPermission(username) {
|
|
4079
4150
|
return await (0, $hOLA6$expect)(this.page.getByRole("row", {
|
|
4080
4151
|
name: "" + username + ""
|