Skip to content

Instantly share code, notes, and snippets.

@kevinbuhmann
Last active September 22, 2021 18:53
Show Gist options
  • Save kevinbuhmann/e5190190439f3adbac3cd3eb822401e9 to your computer and use it in GitHub Desktop.
Save kevinbuhmann/e5190190439f3adbac3cd3eb822401e9 to your computer and use it in GitHub Desktop.
email snapshots
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`SendEmailsWhenBuyerMessagedSellerAboutOrderEventHandler should generate the correct emails: email event 1`] = `
Id: 0000000-0000-0000-0000-000000000000
From: Bob Smith <feedback+0000000-0000-0000-0000-000000000000@transactional.example.com>
ReplyTo: Bob Smith <[email protected]>
To: [email protected]
UtcDateToSend: null
Archived: true
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title></title>
</head>
<body vlink="purple" style="mso-line-height-rule: exactly; background-color: #fff; margin: 0; padding: 1%">
<center>
<table
style="
mso-table-lspace: 0;
mso-table-rspace: 0;
width: 100%;
background-color: #f6f6f6;
color: #2d2d2d;
font-family: Open Sans, sans-serif;
max-width: 650px;
"
width="100%"
bgcolor="#f6f6f6"
>
<tbody>
<tr>
<td style="color: #2d2d2d; font-size: 14px; line-height: 22px; padding: 5px 20px">
<table style="mso-table-lspace: 0; mso-table-rspace: 0; width: 100%" width="100%">
<tbody>
<tr>
<td style="background-color: #fff; border-radius: 5px; padding: 20px; width: 100%" width="100%" bgcolor="#fff">
<table style="mso-table-lspace: 0; mso-table-rspace: 0; width: 100%" width="100%">
<tbody>
<tr>
<td style="vertical-align: top; max-height: 80px; width: 100px" width="100" valign="top">
<img
width="80"
src="https://placehold.co/80x60?text=Gold+Button"
alt="Gold Button"
style="border-radius: 5px"
/>
</td>
<td style="vertical-align: top" valign="top">
<a
href="https://public.example.com/account/marketplace/company/orders?searchTerm=12345"
style="color: #396bb4; text-decoration: none; font-weight: 700; font-size: 17px"
>
Gold Button
</a>
<br />
<span style="font-weight: 700">Order #12345</span>
<br />
<span style="font-weight: 700">Buyer's name: Bob Smith</span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr><td style="line-height: 4px">&nbsp;</td></tr>
</tbody>
</table>
<table style="mso-table-lspace: 0; mso-table-rspace: 0; width: 100%" width="100%">
<tbody>
<tr>
<td style="background-color: #fff; border-radius: 5px; padding: 20px; width: 100%" width="100%" bgcolor="#fff">
<span>the message</span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</center>
</body>
</html>
`;
exports[`SendEmailsWhenBuyerMessagedSellerAboutOrderEventHandler should generate the correct emails: email event 2`] = `
Id: 1111111-1111-1111-1111-111111111111
From: EstateSales.NET <[email protected]>
ReplyTo: null
To: [email protected]
UtcDateToSend: null
Archived: true
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title></title>
</head>
<body vlink="purple" style="mso-line-height-rule: exactly; background-color: #fff; margin: 0; padding: 1%">
<center>
<table
style="
mso-table-lspace: 0;
mso-table-rspace: 0;
width: 100%;
background-color: #f6f6f6;
color: #2d2d2d;
font-family: Open Sans, sans-serif;
max-width: 650px;
"
width="100%"
bgcolor="#f6f6f6"
>
<tbody>
<tr>
<td style="color: #2d2d2d; font-size: 14px; line-height: 22px; padding: 5px 20px">
<table style="mso-table-lspace: 0; mso-table-rspace: 0; width: 100%" width="100%">
<tbody>
<tr>
<td style="background-color: #fff; border-radius: 5px; padding: 20px; width: 100%" width="100%" bgcolor="#fff">
<div style="text-align: center; font-weight: 700; font-size: 17px; padding-bottom: 10px">Hello Bob,</div>
You sent the following message to
<strong>Buttons Estate Sales</strong>
via EstateSales.NET. Most companies on our site are very good to respond promptly. If you do not receive a prompt
reply, you may consider calling the company directly.
</td>
</tr>
<tr><td style="line-height: 4px">&nbsp;</td></tr>
</tbody>
</table>
<table style="mso-table-lspace: 0; mso-table-rspace: 0; width: 100%" width="100%">
<tbody>
<tr>
<td style="background-color: #fff; border-radius: 5px; padding: 20px; width: 100%" width="100%" bgcolor="#fff">
<table style="mso-table-lspace: 0; mso-table-rspace: 0; width: 100%" width="100%">
<tbody>
<tr>
<td style="vertical-align: top; max-height: 80px; width: 100px" width="100" valign="top">
<img
width="80"
src="https://placehold.co/80x60?text=Gold+Button"
alt="Gold Button"
style="border-radius: 5px"
/>
</td>
<td style="vertical-align: top" valign="top">
<a
href="https://public.example.com/account/marketplace/subscriber/orders?searchTerm=12345"
style="color: #396bb4; text-decoration: none; font-weight: 700; font-size: 17px"
>
Gold Button
</a>
<br />
<span style="font-weight: 700">Order #12345</span>
<br />
<span style="font-weight: 700">Buyer's name: Bob Smith</span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr><td style="line-height: 4px">&nbsp;</td></tr>
</tbody>
</table>
<table style="mso-table-lspace: 0; mso-table-rspace: 0; width: 100%" width="100%">
<tbody>
<tr>
<td style="background-color: #fff; border-radius: 5px; padding: 20px; width: 100%" width="100%" bgcolor="#fff">
<span>the message</span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</center>
</body>
</html>
`;
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`SendEmailsWhenBuyerMessagedSellerAboutOrderEventHandler should generate the correct emails: email event 1`] = `
Object {
"archiveEmail": true,
"email": Object {
"body": "<!DOCTYPE html><html><head><meta http-equiv=\\"Content-Type\\" content=\\"text/html; charset=UTF-8\\"><meta name=\\"viewport\\" content=\\"width=device-width,initial-scale=1\\"><title></title></head><body vlink=\\"purple\\" style=\\"mso-line-height-rule:exactly;background-color:#fff;margin:0;padding:1%\\"><center><table style=\\"mso-table-lspace:0;mso-table-rspace:0;width:100%;background-color:#f6f6f6;color:#2d2d2d;font-family:Open Sans,sans-serif;max-width:650px\\" width=\\"100%\\" bgcolor=\\"#f6f6f6\\"><tbody><tr><td style=\\"color:#2d2d2d;font-size:14px;line-height:22px;padding:5px 20px\\"><table style=\\"mso-table-lspace:0;mso-table-rspace:0;width:100%\\" width=\\"100%\\"><tbody><tr><td style=\\"background-color:#fff;border-radius:5px;padding:20px;width:100%\\" width=\\"100%\\" bgcolor=\\"#fff\\"><table style=\\"mso-table-lspace:0;mso-table-rspace:0;width:100%\\" width=\\"100%\\"><tbody><tr><td style=\\"vertical-align:top;max-height:80px;width:100px\\" width=\\"100\\" valign=\\"top\\"><img width=\\"80\\" src=\\"https://placehold.co/80x60?text=Gold+Button\\" alt=\\"Gold Button\\" style=\\"border-radius:5px\\"></td><td style=\\"vertical-align:top\\" valign=\\"top\\"><a href=\\"https://public.example.com/account/marketplace/company/orders?searchTerm=12345\\" style=\\"color:#396bb4;text-decoration:none;font-weight:700;font-size:17px\\">Gold Button</a><br><span style=\\"font-weight:700\\">Order #12345</span><br><span style=\\"font-weight:700\\">Buyer's name: Bob Smith</span></td></tr></tbody></table></td></tr><tr><td style=\\"line-height:4px\\">&nbsp;</td></tr></tbody></table><table style=\\"mso-table-lspace:0;mso-table-rspace:0;width:100%\\" width=\\"100%\\"><tbody><tr><td style=\\"background-color:#fff;border-radius:5px;padding:20px;width:100%\\" width=\\"100%\\" bgcolor=\\"#fff\\"><span>the message</span></td></tr></tbody></table></td></tr></tbody></table></center></body></html>",
"from": Object {
"emailAddress": "feedback+0000000-0000-0000-0000-000000000000@transactional.example.com",
"name": "Bob Smith",
},
"replyTo": Object {
"emailAddress": "[email protected]",
"name": "Bob Smith",
},
"subject": "Bob Smith Sent a Message About Order #12345 (Gold Button)",
"to": Object {
"emailAddress": "[email protected]",
},
"utcDateToSend": null,
},
"emailId": "0000000-0000-0000-0000-000000000000",
}
`;
exports[`SendEmailsWhenBuyerMessagedSellerAboutOrderEventHandler should generate the correct emails: email event 2`] = `
Object {
"archiveEmail": true,
"email": Object {
"body": "<!DOCTYPE html><html><head><meta http-equiv=\\"Content-Type\\" content=\\"text/html; charset=UTF-8\\"><meta name=\\"viewport\\" content=\\"width=device-width,initial-scale=1\\"><title></title></head><body vlink=\\"purple\\" style=\\"mso-line-height-rule:exactly;background-color:#fff;margin:0;padding:1%\\"><center><table style=\\"mso-table-lspace:0;mso-table-rspace:0;width:100%;background-color:#f6f6f6;color:#2d2d2d;font-family:Open Sans,sans-serif;max-width:650px\\" width=\\"100%\\" bgcolor=\\"#f6f6f6\\"><tbody><tr><td style=\\"color:#2d2d2d;font-size:14px;line-height:22px;padding:5px 20px\\"><table style=\\"mso-table-lspace:0;mso-table-rspace:0;width:100%\\" width=\\"100%\\"><tbody><tr><td style=\\"background-color:#fff;border-radius:5px;padding:20px;width:100%\\" width=\\"100%\\" bgcolor=\\"#fff\\"><div style=\\"text-align:center;font-weight:700;font-size:17px;padding-bottom:10px\\">Hello Bob,</div>You sent the following message to <strong>Buttons Estate Sales</strong> via EstateSales.NET. Most companies on our site are very good to respond promptly. If you do not receive a prompt reply, you may consider calling the company directly.</td></tr><tr><td style=\\"line-height:4px\\">&nbsp;</td></tr></tbody></table><table style=\\"mso-table-lspace:0;mso-table-rspace:0;width:100%\\" width=\\"100%\\"><tbody><tr><td style=\\"background-color:#fff;border-radius:5px;padding:20px;width:100%\\" width=\\"100%\\" bgcolor=\\"#fff\\"><table style=\\"mso-table-lspace:0;mso-table-rspace:0;width:100%\\" width=\\"100%\\"><tbody><tr><td style=\\"vertical-align:top;max-height:80px;width:100px\\" width=\\"100\\" valign=\\"top\\"><img width=\\"80\\" src=\\"https://placehold.co/80x60?text=Gold+Button\\" alt=\\"Gold Button\\" style=\\"border-radius:5px\\"></td><td style=\\"vertical-align:top\\" valign=\\"top\\"><a href=\\"https://public.example.com/account/marketplace/subscriber/orders?searchTerm=12345\\" style=\\"color:#396bb4;text-decoration:none;font-weight:700;font-size:17px\\">Gold Button</a><br><span style=\\"font-weight:700\\">Order #12345</span><br><span style=\\"font-weight:700\\">Buyer's name: Bob Smith</span></td></tr></tbody></table></td></tr><tr><td style=\\"line-height:4px\\">&nbsp;</td></tr></tbody></table><table style=\\"mso-table-lspace:0;mso-table-rspace:0;width:100%\\" width=\\"100%\\"><tbody><tr><td style=\\"background-color:#fff;border-radius:5px;padding:20px;width:100%\\" width=\\"100%\\" bgcolor=\\"#fff\\"><span>the message</span></td></tr></tbody></table></td></tr></tbody></table></center></body></html>",
"from": Object {
"emailAddress": "[email protected]",
"name": "EstateSales.NET",
},
"subject": "Your Message About Order #12345 (Gold Button)",
"to": Object {
"emailAddress": "[email protected]",
},
"utcDateToSend": null,
},
"emailId": "1111111-1111-1111-1111-111111111111",
}
`;
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`SendEmailsWhenBuyerMessagedSellerAboutOrderEventHandler should generate the correct emails: email event 1`] = `
Object {
"archiveEmail": true,
"email": Object {
"body": "<!DOCTYPE html>
<html>
<head>
<meta http-equiv=\\"Content-Type\\" content=\\"text/html; charset=UTF-8\\" />
<meta name=\\"viewport\\" content=\\"width=device-width,initial-scale=1\\" />
<title></title>
</head>
<body vlink=\\"purple\\" style=\\"mso-line-height-rule: exactly; background-color: #fff; margin: 0; padding: 1%\\">
<center>
<table
style=\\"
mso-table-lspace: 0;
mso-table-rspace: 0;
width: 100%;
background-color: #f6f6f6;
color: #2d2d2d;
font-family: Open Sans, sans-serif;
max-width: 650px;
\\"
width=\\"100%\\"
bgcolor=\\"#f6f6f6\\"
>
<tbody>
<tr>
<td style=\\"color: #2d2d2d; font-size: 14px; line-height: 22px; padding: 5px 20px\\">
<table style=\\"mso-table-lspace: 0; mso-table-rspace: 0; width: 100%\\" width=\\"100%\\">
<tbody>
<tr>
<td style=\\"background-color: #fff; border-radius: 5px; padding: 20px; width: 100%\\" width=\\"100%\\" bgcolor=\\"#fff\\">
<table style=\\"mso-table-lspace: 0; mso-table-rspace: 0; width: 100%\\" width=\\"100%\\">
<tbody>
<tr>
<td style=\\"vertical-align: top; max-height: 80px; width: 100px\\" width=\\"100\\" valign=\\"top\\">
<img
width=\\"80\\"
src=\\"https://placehold.co/80x60?text=Gold+Button\\"
alt=\\"Gold Button\\"
style=\\"border-radius: 5px\\"
/>
</td>
<td style=\\"vertical-align: top\\" valign=\\"top\\">
<a
href=\\"https://public.example.com/account/marketplace/company/orders?searchTerm=12345\\"
style=\\"color: #396bb4; text-decoration: none; font-weight: 700; font-size: 17px\\"
>
Gold Button
</a>
<br />
<span style=\\"font-weight: 700\\">Order #12345</span>
<br />
<span style=\\"font-weight: 700\\">Buyer's name: Bob Smith</span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr><td style=\\"line-height: 4px\\">&nbsp;</td></tr>
</tbody>
</table>
<table style=\\"mso-table-lspace: 0; mso-table-rspace: 0; width: 100%\\" width=\\"100%\\">
<tbody>
<tr>
<td style=\\"background-color: #fff; border-radius: 5px; padding: 20px; width: 100%\\" width=\\"100%\\" bgcolor=\\"#fff\\">
<span>the message</span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</center>
</body>
</html>
",
"from": Object {
"emailAddress": "feedback+0000000-0000-0000-0000-000000000000@transactional.example.com",
"name": "Bob Smith",
},
"replyTo": Object {
"emailAddress": "[email protected]",
"name": "Bob Smith",
},
"subject": "Bob Smith Sent a Message About Order #12345 (Gold Button)",
"to": Object {
"emailAddress": "[email protected]",
},
"utcDateToSend": null,
},
"emailId": "0000000-0000-0000-0000-000000000000",
}
`;
exports[`SendEmailsWhenBuyerMessagedSellerAboutOrderEventHandler should generate the correct emails: email event 2`] = `
Object {
"archiveEmail": true,
"email": Object {
"body": "<!DOCTYPE html>
<html>
<head>
<meta http-equiv=\\"Content-Type\\" content=\\"text/html; charset=UTF-8\\" />
<meta name=\\"viewport\\" content=\\"width=device-width,initial-scale=1\\" />
<title></title>
</head>
<body vlink=\\"purple\\" style=\\"mso-line-height-rule: exactly; background-color: #fff; margin: 0; padding: 1%\\">
<center>
<table
style=\\"
mso-table-lspace: 0;
mso-table-rspace: 0;
width: 100%;
background-color: #f6f6f6;
color: #2d2d2d;
font-family: Open Sans, sans-serif;
max-width: 650px;
\\"
width=\\"100%\\"
bgcolor=\\"#f6f6f6\\"
>
<tbody>
<tr>
<td style=\\"color: #2d2d2d; font-size: 14px; line-height: 22px; padding: 5px 20px\\">
<table style=\\"mso-table-lspace: 0; mso-table-rspace: 0; width: 100%\\" width=\\"100%\\">
<tbody>
<tr>
<td style=\\"background-color: #fff; border-radius: 5px; padding: 20px; width: 100%\\" width=\\"100%\\" bgcolor=\\"#fff\\">
<div style=\\"text-align: center; font-weight: 700; font-size: 17px; padding-bottom: 10px\\">Hello Bob,</div>
You sent the following message to
<strong>Buttons Estate Sales</strong>
via EstateSales.NET. Most companies on our site are very good to respond promptly. If you do not receive a prompt
reply, you may consider calling the company directly.
</td>
</tr>
<tr><td style=\\"line-height: 4px\\">&nbsp;</td></tr>
</tbody>
</table>
<table style=\\"mso-table-lspace: 0; mso-table-rspace: 0; width: 100%\\" width=\\"100%\\">
<tbody>
<tr>
<td style=\\"background-color: #fff; border-radius: 5px; padding: 20px; width: 100%\\" width=\\"100%\\" bgcolor=\\"#fff\\">
<table style=\\"mso-table-lspace: 0; mso-table-rspace: 0; width: 100%\\" width=\\"100%\\">
<tbody>
<tr>
<td style=\\"vertical-align: top; max-height: 80px; width: 100px\\" width=\\"100\\" valign=\\"top\\">
<img
width=\\"80\\"
src=\\"https://placehold.co/80x60?text=Gold+Button\\"
alt=\\"Gold Button\\"
style=\\"border-radius: 5px\\"
/>
</td>
<td style=\\"vertical-align: top\\" valign=\\"top\\">
<a
href=\\"https://public.example.com/account/marketplace/subscriber/orders?searchTerm=12345\\"
style=\\"color: #396bb4; text-decoration: none; font-weight: 700; font-size: 17px\\"
>
Gold Button
</a>
<br />
<span style=\\"font-weight: 700\\">Order #12345</span>
<br />
<span style=\\"font-weight: 700\\">Buyer's name: Bob Smith</span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr><td style=\\"line-height: 4px\\">&nbsp;</td></tr>
</tbody>
</table>
<table style=\\"mso-table-lspace: 0; mso-table-rspace: 0; width: 100%\\" width=\\"100%\\">
<tbody>
<tr>
<td style=\\"background-color: #fff; border-radius: 5px; padding: 20px; width: 100%\\" width=\\"100%\\" bgcolor=\\"#fff\\">
<span>the message</span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</center>
</body>
</html>
",
"from": Object {
"emailAddress": "[email protected]",
"name": "EstateSales.NET",
},
"subject": "Your Message About Order #12345 (Gold Button)",
"to": Object {
"emailAddress": "[email protected]",
},
"utcDateToSend": null,
},
"emailId": "1111111-1111-1111-1111-111111111111",
}
`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment