@digital-ai/devops-page-object-release 0.0.83 → 0.0.85
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 +12 -0
- package/dist/main.js +90 -13
- package/dist/main.js.map +1 -1
- package/dist/module.js +90 -13
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +9 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -204,7 +204,7 @@ class $b34a21212642e54d$export$7034f81075184002 extends (0, $9626bc9256ce31f7$ex
|
|
|
204
204
|
return this;
|
|
205
205
|
}
|
|
206
206
|
async clearAllFilters() {
|
|
207
|
-
await this.page.locator(`${this.getHeaderSelector()} .
|
|
207
|
+
await this.page.locator(`${this.getHeaderSelector()} .filter-row button[data-testid="clear-all-btn"]`).click();
|
|
208
208
|
return this;
|
|
209
209
|
}
|
|
210
210
|
async clearAllStatusFilters() {
|
|
@@ -3343,7 +3343,6 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
3343
3343
|
}
|
|
3344
3344
|
async refresh() {
|
|
3345
3345
|
await this.page.reload();
|
|
3346
|
-
await this.page.waitForSelector("#release");
|
|
3347
3346
|
}
|
|
3348
3347
|
async start() {
|
|
3349
3348
|
await this.page.getByTestId("start-btn").click();
|
|
@@ -3534,6 +3533,92 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
3534
3533
|
await this.util.openSideNavMenu("Teams & Permissions");
|
|
3535
3534
|
await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Teams & Permissions")).toBeVisible();
|
|
3536
3535
|
}
|
|
3536
|
+
async expectMembersToHavePermission(permission, ...roles) {
|
|
3537
|
+
const row = this.page.locator("tr", {
|
|
3538
|
+
has: this.page.locator("td", {
|
|
3539
|
+
hasText: permission
|
|
3540
|
+
})
|
|
3541
|
+
});
|
|
3542
|
+
for (const roleName of roles){
|
|
3543
|
+
const roleLocator = row.locator("li.tag", {
|
|
3544
|
+
hasText: roleName
|
|
3545
|
+
});
|
|
3546
|
+
await (0, $hOLA6$expect)(roleLocator.first(), `Expected role "${roleName}" for permission "${permission}"`).toBeVisible();
|
|
3547
|
+
}
|
|
3548
|
+
}
|
|
3549
|
+
async expectMembersNotToHavePermission(permission, ...roles) {
|
|
3550
|
+
const row = this.page.locator("tr", {
|
|
3551
|
+
has: this.page.locator("td", {
|
|
3552
|
+
hasText: permission
|
|
3553
|
+
})
|
|
3554
|
+
});
|
|
3555
|
+
for (const roleName of roles){
|
|
3556
|
+
const roleLocator = row.locator("li.tag", {
|
|
3557
|
+
hasText: roleName
|
|
3558
|
+
});
|
|
3559
|
+
await (0, $hOLA6$expect)(roleLocator.first(), `Expected role "${roleName}" for permission "${permission}"`).not.toBeVisible();
|
|
3560
|
+
}
|
|
3561
|
+
}
|
|
3562
|
+
async save() {
|
|
3563
|
+
const saveButton = this.page.getByRole("button", {
|
|
3564
|
+
name: "Save",
|
|
3565
|
+
exact: true
|
|
3566
|
+
});
|
|
3567
|
+
await saveButton.click();
|
|
3568
|
+
}
|
|
3569
|
+
async grantPermissionToRoles(permission, ...roles) {
|
|
3570
|
+
const row = this.page.locator("tr", {
|
|
3571
|
+
has: this.page.locator("td", {
|
|
3572
|
+
hasText: permission
|
|
3573
|
+
})
|
|
3574
|
+
});
|
|
3575
|
+
for (const roleName of roles){
|
|
3576
|
+
const roleLocator = row.locator('input[placeholder="Add..."]');
|
|
3577
|
+
await roleLocator.first().click();
|
|
3578
|
+
await roleLocator.fill(roleName);
|
|
3579
|
+
await roleLocator.press("Enter");
|
|
3580
|
+
await (0, $hOLA6$expect)(roleLocator.first(), `Expected role "${roleName}" for permission "${permission}"`).toBeVisible();
|
|
3581
|
+
}
|
|
3582
|
+
}
|
|
3583
|
+
async revokeMembersPermission(permission, ...roles) {
|
|
3584
|
+
const row = this.page.locator("tr", {
|
|
3585
|
+
has: this.page.locator("td", {
|
|
3586
|
+
hasText: permission
|
|
3587
|
+
})
|
|
3588
|
+
});
|
|
3589
|
+
for (const roleName of roles){
|
|
3590
|
+
const roleLocator = row.locator("li.tag", {
|
|
3591
|
+
hasText: roleName
|
|
3592
|
+
});
|
|
3593
|
+
const closeBtn = roleLocator.locator("a.tag-close, .tag-close, a > .xl-icon.close-icon, i.xl-icon.close-icon").first();
|
|
3594
|
+
await (0, $hOLA6$expect)(closeBtn, `Expected close button for role "${roleName}" to be visible`).toBeVisible();
|
|
3595
|
+
await closeBtn.click();
|
|
3596
|
+
await (0, $hOLA6$expect)(roleLocator.first(), `Expected role "${roleName}" for permission "${permission}"`).not.toBeVisible();
|
|
3597
|
+
}
|
|
3598
|
+
}
|
|
3599
|
+
async expectResetIsEnabled(expected) {
|
|
3600
|
+
const resetButton = this.page.getByRole("button", {
|
|
3601
|
+
name: "Reset"
|
|
3602
|
+
});
|
|
3603
|
+
if (expected) await (0, $hOLA6$expect)(resetButton).toBeEnabled();
|
|
3604
|
+
else await (0, $hOLA6$expect)(resetButton).toBeDisabled();
|
|
3605
|
+
}
|
|
3606
|
+
async expectPermissionsTableCount(locatorName) {
|
|
3607
|
+
const table = this.page.locator(locatorName);
|
|
3608
|
+
await (0, $hOLA6$expect)(table).toHaveCount(1);
|
|
3609
|
+
}
|
|
3610
|
+
async openEditor() {
|
|
3611
|
+
await this.openSubPage("Flow");
|
|
3612
|
+
return this;
|
|
3613
|
+
}
|
|
3614
|
+
async reset() {
|
|
3615
|
+
const resetButton = this.page.getByRole("button", {
|
|
3616
|
+
name: "Reset",
|
|
3617
|
+
exact: true
|
|
3618
|
+
});
|
|
3619
|
+
await resetButton.click();
|
|
3620
|
+
return this;
|
|
3621
|
+
}
|
|
3537
3622
|
async openDashboard() {
|
|
3538
3623
|
await this.util.openSideNavMenu("Dashboard");
|
|
3539
3624
|
await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Dashboard")).toBeVisible();
|
|
@@ -7447,8 +7532,8 @@ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$ex
|
|
|
7447
7532
|
await this.page.goto(url);
|
|
7448
7533
|
}
|
|
7449
7534
|
async searchBy(criteria) {
|
|
7450
|
-
await this.page.locator("
|
|
7451
|
-
await this.page.locator("
|
|
7535
|
+
await this.page.locator("input#title-filter").clear();
|
|
7536
|
+
await this.page.locator("input#title-filter").fill(criteria);
|
|
7452
7537
|
}
|
|
7453
7538
|
async copy(originTitle, targetTitle) {
|
|
7454
7539
|
await this.page.locator(".title").filter({
|
|
@@ -7575,15 +7660,7 @@ class $171d52b372748c0b$export$7e1d435fa474ee21 extends (0, $9626bc9256ce31f7$ex
|
|
|
7575
7660
|
await (0, $hOLA6$expect)(this.page.getByLabel("breadcrumb").getByText("Flow")).toBeVisible();
|
|
7576
7661
|
}
|
|
7577
7662
|
async filterByTitle(templateName) {
|
|
7578
|
-
await this.
|
|
7579
|
-
exact: true
|
|
7580
|
-
}).click();
|
|
7581
|
-
await this.page.getByPlaceholder("Filter by title...", {
|
|
7582
|
-
exact: true
|
|
7583
|
-
}).fill(templateName);
|
|
7584
|
-
await this.page.getByPlaceholder("Filter by title...", {
|
|
7585
|
-
exact: true
|
|
7586
|
-
}).press("Enter");
|
|
7663
|
+
await this.searchBy(templateName);
|
|
7587
7664
|
}
|
|
7588
7665
|
}
|
|
7589
7666
|
|