test: e2e for workflows (#9657)
* create test files * add first e2e test * finish first e2e test * code clean up * fix event type create button data-testid * enable sandbox mode for non production environments * comment out code for testing * Revert "comment out code for testing" This reverts commit 5553dacce23cd85c27e41b76f99fc31ce69499b7. * clean up comments * prettier * use NEXT_PUBLIC_IS_E2E * use todo fn --------- Co-authored-by: CarinaWolli <[email protected]> Co-authored-by: Alan <[email protected]> Co-authored-by: Keith Williams <[email protected]> Co-authored-by: Shivam Kalra <[email protected]>
This commit is contained in:
8 files changed
+108
-2
No files matched your search
@@ -32,6 +32,8 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
return;
|
||||
}
|
||||
|
||||
const sandboxMode = process.env.NEXT_PUBLIC_IS_E2E ? true : false;
|
||||
|
||||
//delete batch_ids with already past scheduled date from scheduled_sends
|
||||
const remindersToDelete = await prisma.workflowReminder.findMany({
|
||||
where: {
|
||||
@@ -251,6 +253,11 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
batchId: batchId,
|
||||
sendAt: dayjs(reminder.scheduledDate).unix(),
|
||||
replyTo: reminder.booking.user?.email || senderEmail,
|
||||
mailSettings: {
|
||||
sandboxMode: {
|
||||
enable: sandboxMode,
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user