Add more detail about SKIP_EMAIL_VERIFICATION_IN_DEV to e2e tests README (#373)

* Add more detail about SKIP_EMAIL_VERIFICATION_IN_DEV to e2e tests README

Fixes #363

Add `SKIP_EMAIL_VERIFICATION_IN_DEV=true` to `template/app/.env.server.example` file.

* Add a new section to the file to skip email verification in development mode.
* Add `SKIP_EMAIL_VERIFICATION_IN_DEV=true` to the new section.

* Update .env.server.example

Update README with SKIP_EMAIL_VERIFICATION_IN_DEV instructions and remove default from .env

* Update e2e-tests/README.md

Added more detailed explanations about the SKIP_EMAIL_VERIFICATION_IN_DEV variable in e2e-tests/README.md, including its significance, usage in CI pipelines, and troubleshooting tips. Let me know if any additional clarifications are needed!

* Remove SKIP_EMAIL_VERIFICATION_IN_DEV from .env
This commit is contained in:
Anish Roy 2025-04-02 17:58:05 +05:30 committed by GitHub
parent 6693d5156e
commit 60d757e704
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,13 +18,28 @@ Start your Wasp DB and leave it running:
cd ../app && wasp db start
```
### Skipping Email Verification in e2e Tests
Open another terminal and start the Wasp app with the environment variable set to skip email verification in development mode:
```shell
> [!IMPORTANT]
> When using the email auth method, a verification link is typically sent when a user registers. If you're using the default Dummy provider, this link is logged in the console.
>
> **However, during e2e tests, this manual step will cause the tests to hang and fail** because the link is never clicked. To prevent this, set the following environment variable when starting your app:
```bash
cd app && SKIP_EMAIL_VERIFICATION_IN_DEV=true wasp start
```
> [!IMPORTANT]
> When using the email auth method a verification link is sent when the user registers, or logged to the console if you're using the default Dummy provider. You must click this link to complete registration. Setting SKIP_EMAIL_VERIFICATION_IN_DEV to "true" skips this verification step, allowing you to automatically log in. This step must be skipped when running tests, otherwise the tests will hang and fail as the verification link is never clicked!
#### What this step will do:
- **Automated Testing:** Skipping email verification ensures e2e tests run uninterrupted.
- **Consistent Behavior:** It guarantees login flows wont break during automated test runs.
- **CI/CD Pipelines:** This variable should also be set in CI pipelines to avoid test failures.
```yaml
env:
SKIP_EMAIL_VERIFICATION_IN_DEV: "true"
```
In another terminal, run the local e2e tests:
```shell