feat: add e2e tests for insights charts#23777
Conversation
- Test that all ChartCard components render with expected titles - Test graceful handling of TRPC call failures - Test ChartCard rendering for organization users - Wait for page load and TRPC calls before checking chart presence - Use text-based selectors to find ChartCard titles in h2 elements - Remove page.waitForTimeout() calls to comply with ESLint rules Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Walkthrough
Possibly related PRs
Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (4)
🧰 Additional context used📓 Path-based instructions (4)**/*.ts📄 CodeRabbit inference engine (.cursor/rules/review.mdc)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/review.mdc)
Files:
**/*.{ts,tsx,js,jsx}⚙️ CodeRabbit configuration file
Files:
**/*.tsx📄 CodeRabbit inference engine (.cursor/rules/review.mdc)
Files:
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
🔇 Additional comments (4)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
E2E results are ready! |
What does this PR do?
Adds comprehensive e2e tests for ChartCard components on the insights page to verify that charts render correctly with their expected titles. This is a bare minimum test to see if tRPC calls for the charts fail or not.
Requested by: @eunjae-lee
Link to Devin run: https://app.devin.ai/sessions/88f67fafda5344e19b0ae5b4053bc593
Test Coverage
This PR adds three test scenarios:
Full chart rendering test - Verifies all 16 ChartCard components render with correct titles
How should this be tested?
Testing steps:
PLAYWRIGHT_HEADLESS=1 yarn e2e insights-chartcard.e2e.ts/insightsh2.text-emphasisselectors work correctly in the browserExpected behavior:
Mandatory Tasks