* add workflows to bookingScenario * activate sandbox mode for unit/integreation tests * add sendgrid specific code to SendgridProvider * Refactor WIP * remove duplicate sendgridProvider file * first implementation for testing workflows * revert unintended changes * comment out Workflow trigger tests * move sendgrid check after test mode * Update signup.tsx * fix esLint * test webhooks on all tests in fresh-booking.test.ts * fix subjectPattern as title can be different * add workflow tests to reschedule.test.ts * code clean up * code clean up * fix sendgrid credentials missing message * code clean up --------- Co-authored-by: CarinaWolli <wollencarina@gmail.com>
27 lines
585 B
TypeScript
27 lines
585 B
TypeScript
declare global {
|
|
// eslint-disable-next-line no-var
|
|
var testEmails: {
|
|
icalEvent?: {
|
|
filename: string;
|
|
content: string;
|
|
};
|
|
to: string;
|
|
from: string | { email: string; name: string };
|
|
subject: string;
|
|
html: string;
|
|
}[];
|
|
}
|
|
|
|
export const setTestEmail = (email: (typeof globalThis.testEmails)[number]) => {
|
|
globalThis.testEmails = globalThis.testEmails || [];
|
|
globalThis.testEmails.push(email);
|
|
};
|
|
|
|
export const getTestEmails = () => {
|
|
return globalThis.testEmails;
|
|
};
|
|
|
|
export const resetTestEmails = () => {
|
|
globalThis.testEmails = [];
|
|
};
|