@bigbinary/neeto-playwright-commons 1.13.12 → 1.13.14
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/index.cjs.js +26 -13
- package/index.cjs.js.map +1 -1
- package/index.d.ts +14 -2
- package/index.js +26 -13
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -3902,13 +3902,13 @@ class CustomCommands {
|
|
|
3902
3902
|
(await this.page.getByTestId(COMMON_SELECTORS.toastCloseButton).click());
|
|
3903
3903
|
await test$1.expect(this.page.locator(COMMON_SELECTORS.toastIcon)).toBeHidden();
|
|
3904
3904
|
};
|
|
3905
|
-
this.verifyToast = async ({ message = "", toastType = "success", closeAfterVerification = true, timeout = 10000, } = {}) => {
|
|
3906
|
-
const toastrCloseButton =
|
|
3905
|
+
this.verifyToast = async ({ message = "", toastType = "success", closeAfterVerification = true, timeout = 10000, customPageContext = this.page, } = {}) => {
|
|
3906
|
+
const toastrCloseButton = customPageContext.getByTestId(COMMON_SELECTORS.toastCloseButton);
|
|
3907
3907
|
if (!ramda.isEmpty(message)) {
|
|
3908
|
-
await test$1.expect(
|
|
3908
|
+
await test$1.expect(customPageContext.getByTestId(COMMON_SELECTORS.toastMessage(toastType))).toContainText(message, { timeout });
|
|
3909
3909
|
}
|
|
3910
3910
|
else {
|
|
3911
|
-
await test$1.expect(
|
|
3911
|
+
await test$1.expect(customPageContext.locator(COMMON_SELECTORS.toastIcon)).toContainText("👍", { timeout });
|
|
3912
3912
|
}
|
|
3913
3913
|
if (closeAfterVerification && (await toastrCloseButton.isVisible())) {
|
|
3914
3914
|
await toastrCloseButton.click();
|
|
@@ -12080,13 +12080,13 @@ class MailerUtils {
|
|
|
12080
12080
|
this.getEmails = async (ids) => {
|
|
12081
12081
|
const messageDetailsBody = {
|
|
12082
12082
|
ids,
|
|
12083
|
-
bodyProperties: ["type"],
|
|
12083
|
+
bodyProperties: ["type", "name"],
|
|
12084
12084
|
fetchHTMLBodyValues: true,
|
|
12085
12085
|
};
|
|
12086
12086
|
const { methodResponses: [[, { list }]], } = await this.fastmailApi.apiRequest("Email/get", messageDetailsBody);
|
|
12087
12087
|
const formattedList = list.map((listItem) => {
|
|
12088
12088
|
var _a;
|
|
12089
|
-
const { id, from, to, bodyValues, cc, bcc, replyTo, receivedAt, subject, } = listItem;
|
|
12089
|
+
const { id, from, to, bodyValues, cc, bcc, replyTo, receivedAt, subject, attachments, } = listItem;
|
|
12090
12090
|
const emailBody = Object.values(ramda.pluck("value", bodyValues)).join(" ");
|
|
12091
12091
|
const emailBodyWithStrippedHead = emailBody.split("</head>").at(-1);
|
|
12092
12092
|
const links = emailBodyWithStrippedHead.match(/(http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])/g);
|
|
@@ -12118,6 +12118,7 @@ class MailerUtils {
|
|
|
12118
12118
|
replyTo,
|
|
12119
12119
|
received: new Date(receivedAt),
|
|
12120
12120
|
subject,
|
|
12121
|
+
attachments,
|
|
12121
12122
|
};
|
|
12122
12123
|
});
|
|
12123
12124
|
return formattedList;
|
|
@@ -21267,10 +21268,15 @@ class EmbedBase {
|
|
|
21267
21268
|
this.clickOnPopupButton = async (popUpButtonSelectorOptions) => {
|
|
21268
21269
|
const popUpButton = this.embedTestPage.getByRole(this.embedTestPageType === "floatingPopup" ? "button" : "link", popUpButtonSelectorOptions);
|
|
21269
21270
|
await test$1.expect(popUpButton).toBeVisible();
|
|
21270
|
-
await
|
|
21271
|
-
|
|
21272
|
-
|
|
21273
|
-
|
|
21271
|
+
await test$1.expect(async () => {
|
|
21272
|
+
await popUpButton.click();
|
|
21273
|
+
await test$1.expect(this.embedTestPage.locator(EMBED_SELECTORS.loader(this.appName))).toBeHidden({
|
|
21274
|
+
timeout: 40000,
|
|
21275
|
+
});
|
|
21276
|
+
await test$1.expect(this.embedTestPage.locator(EMBED_SELECTORS.iframe(this.appName))).toBeVisible({
|
|
21277
|
+
timeout: 10000,
|
|
21278
|
+
});
|
|
21279
|
+
}).toPass({ timeout: 2 * 60 * 1000 });
|
|
21274
21280
|
};
|
|
21275
21281
|
this.copyEmbedScript = async ({ embedLabel }) => {
|
|
21276
21282
|
await this.page
|
|
@@ -23715,12 +23721,14 @@ class SlackPage extends IntegrationBase {
|
|
|
23715
23721
|
.textContent()) || "";
|
|
23716
23722
|
await allowButton.click();
|
|
23717
23723
|
await this.page.waitForURL(redirectUrl);
|
|
23718
|
-
await
|
|
23724
|
+
await this.neetoPlaywrightUtilities.waitForPageLoad({
|
|
23725
|
+
visibilityTimeout: 10000,
|
|
23726
|
+
});
|
|
23719
23727
|
await test$1.expect(this.page.getByRole("heading", {
|
|
23720
23728
|
name: this.t("neetoSlack.slack.configure.title", {
|
|
23721
23729
|
teamName: currentWorkspace,
|
|
23722
23730
|
}),
|
|
23723
|
-
})).toBeVisible();
|
|
23731
|
+
})).toBeVisible({ timeout: 10000 });
|
|
23724
23732
|
await this.neetoPlaywrightUtilities.selectOptionFromDropdown({
|
|
23725
23733
|
value: channelToConfigure,
|
|
23726
23734
|
});
|
|
@@ -24693,7 +24701,12 @@ class TeamMembers {
|
|
|
24693
24701
|
}
|
|
24694
24702
|
// eslint-disable-next-line playwright/no-standalone-expect
|
|
24695
24703
|
await test$1.expect(async () => {
|
|
24696
|
-
|
|
24704
|
+
const submitButton = this.page.getByTestId(MEMBER_SELECTORS.submitButton);
|
|
24705
|
+
await submitButton.click();
|
|
24706
|
+
// eslint-disable-next-line playwright/no-standalone-expect
|
|
24707
|
+
await test$1.expect(submitButton.locator(COMMON_SELECTORS.buttonSpinner)).toBeHidden({
|
|
24708
|
+
timeout: 15000,
|
|
24709
|
+
});
|
|
24697
24710
|
// eslint-disable-next-line playwright/no-standalone-expect
|
|
24698
24711
|
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.paneBody)).toBeHidden();
|
|
24699
24712
|
}).toPass({ timeout: 40000 });
|