Files
Zero/packages/testing/package.json
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

38 lines
1009 B
JSON

{
"name": "@zero/testing",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"test:e2e": "playwright test",
"test:e2e:ui": "playwright test --ui",
"test:e2e:debug": "playwright test --debug",
"test:e2e:headed": "playwright test --headed"
},
"devDependencies": {
"@cloudflare/playwright": "0.0.11",
"@playwright/test": "^1.40.0",
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.5.1",
"@types/testing-library__jest-dom": "^6.0.0",
"@vitejs/plugin-react": "^4.7.0",
"@vitest/coverage-v8": "^1.0.4",
"@vitest/ui": "^1.0.4",
"happy-dom": "^12.10.3",
"jsdom": "^23.0.1",
"msw": "^2.0.8",
"dotenv": "^16.3.1",
"typescript": "^5.4.0",
"vitest": "^1.0.4"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "*",
"react-dom": "*"
},
"dependencies": {
"@tanstack/react-query": "^5.81.5"
}
}