💬 Update email subject lines

This commit is contained in:
Luke Vella 2023-03-07 09:42:27 +00:00
parent e06c55c131
commit 611d04eaaa
5 changed files with 6 additions and 8 deletions

View file

@ -150,7 +150,7 @@ export const polls = router({
if (poll.verified) { if (poll.verified) {
await sendEmail("NewPollEmail", { await sendEmail("NewPollEmail", {
to: input.user.email, to: input.user.email,
subject: `Your poll for ${poll.title} has been created`, subject: `${poll.title} has been created`,
props: { props: {
title: poll.title, title: poll.title,
name: input.user.name, name: input.user.name,
@ -165,7 +165,7 @@ export const polls = router({
await sendEmail("NewPollVerificationEmail", { await sendEmail("NewPollVerificationEmail", {
to: input.user.email, to: input.user.email,
subject: `Your poll for ${poll.title} has been created`, subject: `${poll.title} has been created`,
props: { props: {
title: poll.title, title: poll.title,
name: input.user.name, name: input.user.name,

View file

@ -100,7 +100,7 @@ export const participants = router({
emailsToSend.push( emailsToSend.push(
sendEmail("NewParticipantConfirmationEmail", { sendEmail("NewParticipantConfirmationEmail", {
to: email, to: email,
subject: `Response submitted: ${poll.title}`, subject: `Response submitted for ${poll.title}`,
props: { props: {
name, name,
title: poll.title, title: poll.title,

View file

@ -56,7 +56,7 @@ export const sendNotification = async (
case "newParticipant": case "newParticipant":
await sendEmail("NewParticipantEmail", { await sendEmail("NewParticipantEmail", {
to: poll.user.email, to: poll.user.email,
subject: `New participant on ${poll.title}`, subject: `Response received on ${poll.title}`,
props: { props: {
name: poll.user.name, name: poll.user.name,
participantName: action.participantName, participantName: action.participantName,

View file

@ -59,9 +59,7 @@ test.describe.serial(() => {
wait: 5000, wait: 5000,
}); });
expect(email.headers.subject).toBe( expect(email.headers.subject).toBe("Monthly Meetup has been created");
"Your poll for Monthly Meetup has been created",
);
const $ = load(email.html); const $ = load(email.html);
const verifyLink = $("#verifyEmailUrl").attr("href"); const verifyLink = $("#verifyEmailUrl").attr("href");

View file

@ -76,7 +76,7 @@ test.describe.parallel(() => {
wait: 5000, wait: 5000,
}); });
expect(email.headers.subject).toBe("Response submitted: Lunch Meeting"); expect(email.headers.subject).toBe("Response submitted for Lunch Meeting");
const $ = load(email.html); const $ = load(email.html);
const href = $("#editSubmissionUrl").attr("href"); const href = $("#editSubmissionUrl").attr("href");