Hi all,
For my project I have created a self-register endpoint for users. This way, in the frontend of my app, users can create an account with email and password. They will then receive the verification email from the Users collection. In that email there is a link to verify their email.
I want to write integration tests to test the whole flow. However, I do not know how to check the email step.
I have used the test setup example from https://github.com/payloadcms/payload/pull/3333 that has been set up in this thread #1146098441810870463 message.
There are two issues I am running into:
- How to access whether an email has been sent, and how to access the content (body and subject) of that email.
- The payload I am using to compare the verification token is not the same as the one I initialized in my
globalSetup.ts. This one does not have any collections, whereas the payload inglobalSetup.tsdoes have the collections.
Can anyone please help me with this?
Thanks in advance 🙂
Description
This adds a new testing folder inside the examples directory. The purpose is to show users how to get up and running with testing within their own payload projects.
I have read and un...
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.