@digital-ai/devops-page-object-release 0.0.95 → 0.0.97
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 +13 -0
- package/dist/main.js +56 -1
- package/dist/main.js.map +1 -1
- package/dist/module.js +56 -1
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +10 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -2759,6 +2759,24 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
|
|
|
2759
2759
|
hasText: filename
|
|
2760
2760
|
})).not.toBeVisible();
|
|
2761
2761
|
}
|
|
2762
|
+
async expectSubscribeLinkIsPublic() {
|
|
2763
|
+
await (0, $hOLA6$expect)(this.page.getByRole("checkbox", {
|
|
2764
|
+
name: "Publish Link"
|
|
2765
|
+
})).toBeChecked();
|
|
2766
|
+
}
|
|
2767
|
+
async expectSubscribeLinkIsPrivate() {
|
|
2768
|
+
await (0, $hOLA6$expect)(this.page.getByRole("checkbox", {
|
|
2769
|
+
name: "Publish Link"
|
|
2770
|
+
})).not.toBeChecked();
|
|
2771
|
+
}
|
|
2772
|
+
async setSubscribeLink(isPublic) {
|
|
2773
|
+
const isChecked = await this.page.getByRole("checkbox", {
|
|
2774
|
+
name: "Publish Link"
|
|
2775
|
+
}).isChecked();
|
|
2776
|
+
if (isChecked !== isPublic) await this.page.getByRole("checkbox", {
|
|
2777
|
+
name: "Publish Link"
|
|
2778
|
+
}).click();
|
|
2779
|
+
}
|
|
2762
2780
|
async downloadFile(filename) {
|
|
2763
2781
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2764
2782
|
const downloadPromise1 = this.page.waitForEvent("download");
|
|
@@ -2768,6 +2786,19 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
|
|
|
2768
2786
|
await download.saveAs("./core/xlr-ui/build/playwright/" + download.suggestedFilename());
|
|
2769
2787
|
(0, $hOLA6$expect)(download.suggestedFilename()).toBe(filename);
|
|
2770
2788
|
}
|
|
2789
|
+
async verifyCalendarEventDownload(releaseName) {
|
|
2790
|
+
// Start listening for download event
|
|
2791
|
+
const downloadPromise1 = this.page.waitForEvent("download");
|
|
2792
|
+
const expectedFilename = `${releaseName}.ics`;
|
|
2793
|
+
// Trigger the download
|
|
2794
|
+
await this.page.getByRole("button", {
|
|
2795
|
+
name: "Download calendar event"
|
|
2796
|
+
}).click();
|
|
2797
|
+
// Wait for the download to complete
|
|
2798
|
+
const download = await downloadPromise1;
|
|
2799
|
+
// Validate the file name
|
|
2800
|
+
(0, $hOLA6$expect)(download.suggestedFilename()).toBe(expectedFilename);
|
|
2801
|
+
}
|
|
2771
2802
|
async deleteAttachment(fileName) {
|
|
2772
2803
|
await this.page.getByRole("row", {
|
|
2773
2804
|
name: fileName
|
|
@@ -2906,6 +2937,27 @@ class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$ex
|
|
|
2906
2937
|
async expectReleaseTaggedWith(tagName) {
|
|
2907
2938
|
await (0, $hOLA6$expect)(this.page.locator("#tags")).toContainText(tagName);
|
|
2908
2939
|
}
|
|
2940
|
+
async expectReleaseNotTaggedWith(tagName) {
|
|
2941
|
+
await (0, $hOLA6$expect)(this.page.locator(`#tags`, {
|
|
2942
|
+
hasText: tagName
|
|
2943
|
+
})).toHaveCount(0);
|
|
2944
|
+
}
|
|
2945
|
+
async addTag(tagName) {
|
|
2946
|
+
const tagInput = this.page.locator('input[placeholder="Add a tag..."]');
|
|
2947
|
+
await tagInput.fill(tagName);
|
|
2948
|
+
await tagInput.press("Enter");
|
|
2949
|
+
await (0, $hOLA6$expect)(this.page.locator(`#tags`, {
|
|
2950
|
+
hasText: tagName
|
|
2951
|
+
})).toBeVisible();
|
|
2952
|
+
}
|
|
2953
|
+
async removeTag(tagName) {
|
|
2954
|
+
const tag = this.page.locator(`#tags`, {
|
|
2955
|
+
hasText: tagName
|
|
2956
|
+
});
|
|
2957
|
+
const removeIcon = tag.locator(".tag-close");
|
|
2958
|
+
await removeIcon.click();
|
|
2959
|
+
await (0, $hOLA6$expect)(tag).toHaveCount(0);
|
|
2960
|
+
}
|
|
2909
2961
|
async expectTemplateTitleToBe(templateTitle) {
|
|
2910
2962
|
await (0, $hOLA6$expect)(this.page.locator('[data-test="created-from-template"]')).toContainText(templateTitle);
|
|
2911
2963
|
}
|
|
@@ -5904,6 +5956,9 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
|
|
|
5904
5956
|
}).locator(`td`).filter({
|
|
5905
5957
|
hasText: type
|
|
5906
5958
|
}).count()).toBeGreaterThan(0);
|
|
5959
|
+
if (user.accountLocked) (0, $hOLA6$expect)(await this.page.locator(`tr`).filter({
|
|
5960
|
+
hasText: user.name
|
|
5961
|
+
}).locator('[data-testid="user-account-lock"]')).toBeVisible();
|
|
5907
5962
|
if (user.email) (0, $hOLA6$expect)(await this.page.locator(`tr`).filter({
|
|
5908
5963
|
hasText: user.name
|
|
5909
5964
|
}).locator(`td`).filter({
|
|
@@ -5968,7 +6023,7 @@ class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$ex
|
|
|
5968
6023
|
return this;
|
|
5969
6024
|
}
|
|
5970
6025
|
async expectUserUnlockedToaster(user) {
|
|
5971
|
-
await (0, $hOLA6$expect)(this.page.getByText(`User ${user} unlocked
|
|
6026
|
+
await (0, $hOLA6$expect)(this.page.getByText(`User ${user} was unlocked and can now login in again.`)).toBeVisible({
|
|
5972
6027
|
timeout: 10000
|
|
5973
6028
|
});
|
|
5974
6029
|
}
|