Commit Graph

5 Commits

Author SHA1 Message Date
amrit
cdb3d25993 feat: add playwright tests to check search bar functions (#1921)
goes through the cmd+k search shortcut and runs:

1. last seven days of emails
2. starred emails
3. with attachments

run w `pnpm test:e2e:headed search-bar.spec.ts`
    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Added Playwright end-to-end tests to verify that the search bar correctly applies and clears filters for "Last 7 Days," "Starred Emails," and "With Attachments" using the command palette.

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



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

## Summary by CodeRabbit

* **Tests**
  * Added a new end-to-end test to verify that search bar filters ("With Attachments", "Last 7 Days", "Starred Emails") can be applied and cleared using the command palette. The test also checks for the correct display and removal of the "Clear" button in the search bar.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-08-06 21:02:16 -07:00
amrit
066edbc77b feat: add playwright tests to check for zero summary of past emails in sidebar (#1920)
# READ CAREFULLY THEN REMOVE

Remove bullet points that are not relevant.

PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.

- Pull requests that do not follow these guidelines will be closed without review or comment.
- If you use AI to write your PR description your pr will be close without review or comment.
- If you are unsure about anything, feel free to ask for clarification.

## Description

Please provide a clear description of your changes.

---

## Type of Change

Please delete options that are not relevant.

- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ]  New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature with breaking changes)
- [ ] 📝 Documentation update
- [ ] 🎨 UI/UX improvement
- [ ] 🔒 Security enhancement
- [ ]  Performance improvement

## Areas Affected

Please check all that apply:

- [ ] Email Integration (Gmail, IMAP, etc.)
- [ ] User Interface/Experience
- [ ] Authentication/Authorization
- [ ] Data Storage/Management
- [ ] API Endpoints
- [ ] Documentation
- [ ] Testing Infrastructure
- [ ] Development Workflow
- [ ] Deployment/Infrastructure

## Testing Done

Describe the tests you've done:

- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] Cross-browser testing (if UI changes)
- [ ] Mobile responsiveness verified (if UI changes)

## Security Considerations

For changes involving data or authentication:

- [ ] No sensitive data is exposed
- [ ] Authentication checks are in place
- [ ] Input validation is implemented
- [ ] Rate limiting is considered (if applicable)

## Checklist

- [ ] I have read the [CONTRIBUTING](https://github.com/Mail-0/Zero/blob/staging/.github/CONTRIBUTING.md) document
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in complex areas
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] All tests pass locally
- [ ] Any dependent changes are merged and published

## Additional Notes

Add any other context about the pull request here.

## Screenshots/Recordings

Add screenshots or recordings here if applicable.

---

_By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._

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

## Summary by cubic
Added Playwright end-to-end tests to verify that the sidebar correctly summarizes the past five emails.

- **Testing**
  - Checks that the AI chat sidebar opens and displays a summary when prompted.
  - Confirms the summary is visible and contains content.

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



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

## Summary by CodeRabbit

* **New Features**
  * Added an end-to-end test to verify that the AI chat can summarize recent emails and display the result in the inbox sidebar.

* **Style**
  * Added a data attribute to each AI chat message for improved message role identification.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-08-06 21:02:07 -07:00
amrit
68a1714ca1 feat: add tests for optimistic actions (#1922)
added playwright tests for marking an email as read, unread and starring it upon right clicking
    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Added Playwright tests to cover marking an email as read, unread, and favoriting it using right-click actions in the inbox.

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



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

## Summary by CodeRabbit

* **Tests**
  * Added a new end-to-end test verifying that users can mark emails as favorite, read, and unread in the inbox. The test ensures proper UI interactions and state changes for these mail actions.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-08-06 21:01:46 -07:00
amrit
17bdc34406 feat: add playwright tests for bulk actions and search (#1923)
<!-- This is an auto-generated description by cubic. -->

## Summary by cubic
Added Playwright end-to-end tests for bulk actions and search in the AI chat sidebar to ensure key workflows work as expected.

- **New Features**
  - Added tests that simulate sending bulk action and search commands in the chat sidebar.
  - Updated chat message markup to support easier test targeting.

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



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

## Summary by CodeRabbit

* **Bug Fixes**
  * Improved identification of message roles in the AI chat component for enhanced accessibility and testing.

* **Tests**
  * Added a new end-to-end test suite to verify AI Chat Sidebar functionality, including user interactions and AI responses.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-08-06 21:01:16 -07:00
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