Files
Zero/.env.example
amrit e1cdeb82c2 feat: add tests using playwright (#1877)
1. Get both the better auth session tokens from appliations/cookies in .env

<img width="852" height="316" alt="image" src="https://github.com/user-attachments/assets/0177c496-103c-4111-8a80-089d1f4a6f94" />

2. Enter the email you wish to send to in .env

3. `cd packages/testing`

3. run `npm test:e2e:headed`

thats it tbh

https://github.com/user-attachments/assets/b703e78c-2373-40a2-b431-f9ba53d5d871



    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Added Playwright end-to-end tests for the mail inbox flow, including authentication setup and email send/reply actions.

- **New Features**
  - Added Playwright config, test scripts, and environment variables for E2E testing.
  - Implemented tests to sign in, send an email, and reply within the same session.

<!-- End of auto-generated description by cubic. -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

## Summary by CodeRabbit

* **New Features**
  * Introduced a comprehensive testing package with support for unit, UI, and end-to-end tests.
  * Added Playwright-based authentication setup and mail inbox end-to-end test scripts.
  * Provided a dedicated test configuration and TypeScript setup for robust test execution.

* **Chores**
  * Updated environment variable examples to support Playwright testing.
  * Enhanced main project scripts to facilitate various testing modes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-08-01 08:29:43 -07:00

45 lines
983 B
Plaintext

VITE_PUBLIC_APP_URL=http://localhost:3000
VITE_PUBLIC_BACKEND_URL=http://localhost:8787
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/zerodotemail"
# Change this to a random string, use `openssl rand -hex 32` to generate a 32 character string
BETTER_AUTH_SECRET=my-better-auth-secret
BETTER_AUTH_URL=http://localhost:3000
COOKIE_DOMAIN="localhost"
# Change to your project's client ID and secret, these work with localhost:8787
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# Upstash/Local Redis Instance
REDIS_URL="http://localhost:8079"
REDIS_TOKEN="upstash-local-token"
# Resend API Key
RESEND_API_KEY=
# OpenAI API Key
OPENAI_API_KEY=
PERPLEXITY_API_KEY=
# OpenAI Model names (gpt-4o, gpt-4o-mini etc)
OPENAI_MODEL=
OPENAI_MINI_MODEL=
#AI PROMPT
AI_SYSTEM_PROMPT=""
NODE_ENV="development"
AUTUMN_SECRET_KEY=
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_PHONE_NUMBER=
# FOR PLAYWRIGHT E2E TESTING
PLAYWRIGHT_SESSION_TOKEN =
PLAYWRIGHT_SESSION_DATA =
EMAIL =