mirror of
https://github.com/Mail-0/Zero.git
synced 2026-06-28 14:56:48 +00:00
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 -->
This commit is contained in:
@@ -29,6 +29,10 @@
|
||||
"db:studio": "dotenv -- pnpm run -C apps/server db:studio",
|
||||
"sentry:sourcemaps": "sentry-cli sourcemaps inject --org zero-7y --project nextjs ./apps/mail/.next && sentry-cli sourcemaps upload --org zero-7y --project nextjs ./apps/mail/.next",
|
||||
"scripts": "dotenv -- pnpx tsx ./scripts/run.ts",
|
||||
"test": "pnpm --filter=@zero/testing test",
|
||||
"test:watch": "pnpm --filter=@zero/testing test:watch",
|
||||
"test:coverage": "pnpm --filter=@zero/testing test:coverage",
|
||||
"test:ui": "pnpm --filter=@zero/testing test:ui",
|
||||
"test:ai": "dotenv -- pnpm --filter=@zero/server run test:ai",
|
||||
"eval": "dotenv -- pnpm --filter=@zero/server run eval",
|
||||
"eval:dev": "dotenv -- pnpm --filter=@zero/server run eval:dev",
|
||||
|
||||
Reference in New Issue
Block a user