@bigbinary/neeto-playwright-commons 1.13.11 → 1.13.13
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 +8 -4
- package/index.cjs.js.map +1 -1
- package/index.d.ts +7 -0
- package/index.js +8 -4
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -454,6 +454,10 @@ interface Identifier {
|
|
|
454
454
|
name: string;
|
|
455
455
|
email: string;
|
|
456
456
|
}
|
|
457
|
+
interface Attachment {
|
|
458
|
+
name: string;
|
|
459
|
+
type: string;
|
|
460
|
+
}
|
|
457
461
|
interface FindOtpFromEmailParams {
|
|
458
462
|
email: string;
|
|
459
463
|
subjectSubstring?: string;
|
|
@@ -481,6 +485,7 @@ interface FormattedList {
|
|
|
481
485
|
replyTo: Identifier[];
|
|
482
486
|
received: string;
|
|
483
487
|
subject: string;
|
|
488
|
+
attachments: Attachment[];
|
|
484
489
|
}
|
|
485
490
|
declare class MailerUtils {
|
|
486
491
|
private neetoPlaywrightUtilities;
|
|
@@ -535,6 +540,8 @@ declare class MailerUtils {
|
|
|
535
540
|
*
|
|
536
541
|
* subject: A string containing the subject of the email.
|
|
537
542
|
*
|
|
543
|
+
* attachments: An array of objects containing the name and type of the attachment of the email.
|
|
544
|
+
*
|
|
538
545
|
* @example
|
|
539
546
|
*
|
|
540
547
|
* test("sample test", async ({ mailerUtils }) => {
|
package/index.js
CHANGED
|
@@ -12060,13 +12060,13 @@ class MailerUtils {
|
|
|
12060
12060
|
this.getEmails = async (ids) => {
|
|
12061
12061
|
const messageDetailsBody = {
|
|
12062
12062
|
ids,
|
|
12063
|
-
bodyProperties: ["type"],
|
|
12063
|
+
bodyProperties: ["type", "name"],
|
|
12064
12064
|
fetchHTMLBodyValues: true,
|
|
12065
12065
|
};
|
|
12066
12066
|
const { methodResponses: [[, { list }]], } = await this.fastmailApi.apiRequest("Email/get", messageDetailsBody);
|
|
12067
12067
|
const formattedList = list.map((listItem) => {
|
|
12068
12068
|
var _a;
|
|
12069
|
-
const { id, from, to, bodyValues, cc, bcc, replyTo, receivedAt, subject, } = listItem;
|
|
12069
|
+
const { id, from, to, bodyValues, cc, bcc, replyTo, receivedAt, subject, attachments, } = listItem;
|
|
12070
12070
|
const emailBody = Object.values(pluck("value", bodyValues)).join(" ");
|
|
12071
12071
|
const emailBodyWithStrippedHead = emailBody.split("</head>").at(-1);
|
|
12072
12072
|
const links = emailBodyWithStrippedHead.match(/(http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])/g);
|
|
@@ -12098,6 +12098,7 @@ class MailerUtils {
|
|
|
12098
12098
|
replyTo,
|
|
12099
12099
|
received: new Date(receivedAt),
|
|
12100
12100
|
subject,
|
|
12101
|
+
attachments,
|
|
12101
12102
|
};
|
|
12102
12103
|
});
|
|
12103
12104
|
return formattedList;
|
|
@@ -24981,11 +24982,14 @@ class OrganizationPage {
|
|
|
24981
24982
|
}
|
|
24982
24983
|
}
|
|
24983
24984
|
};
|
|
24984
|
-
this.loginViaSSO = async (email = generateRandomBypassEmail(), loginTimeout =
|
|
24985
|
+
this.loginViaSSO = async (email = generateRandomBypassEmail(), loginTimeout = 2 * 60 * 1000) => {
|
|
24985
24986
|
await this.page.getByTestId(LOGIN_SELECTORS.emailTextField).fill(email);
|
|
24987
|
+
const unregisteredEmailError = this.page.getByTestId(SIGNUP_SELECTORS.unregisterdEmailError);
|
|
24986
24988
|
await expect(async () => {
|
|
24987
24989
|
await this.page.getByTestId(LOGIN_SELECTORS.submitButton).click();
|
|
24988
|
-
await expect(
|
|
24990
|
+
await expect(unregisteredEmailError).toBeHidden();
|
|
24991
|
+
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
24992
|
+
await expect(unregisteredEmailError).toBeHidden();
|
|
24989
24993
|
}).toPass({ timeout: loginTimeout });
|
|
24990
24994
|
await this.page
|
|
24991
24995
|
.getByTestId(SIGNUP_SELECTORS.otpTextBox)
|