Fixed testing cards snapshots for both user groups#22566
Conversation
daniellockyer
commented
Mar 19, 2025
- this test file is often flaky because the test sends out to both free and paid members at the same time, and depending on the ordering internally, the snapshots can be slightly different
- AFAIK, we don't have a way to run snapshots against multiple email sends at the same time
- to workaround that, and to add explicit testing for both groups, I've tweaked the test to run against each user group separately
- also includes the snapshot changes to make this pass
WalkthroughThe changes modify the email service integration tests by introducing a parameterized approach. Previously, a single test case existed for rendering the golden post without labs flags. The new implementation replaces this with a loop that creates separate test cases for two statuses: Suggested labels
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🧰 Additional context used🧬 Code Definitions (1)ghost/core/test/integration/services/email-service/cards.test.js (4)
⏰ Context from checks skipped due to timeout of 90000ms (4)
🔇 Additional comments (5)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
refs https://ghost.slack.com/archives/C02G9E68C/p1742391268195829 refs https://ghost.slack.com/archives/C02G9E68C/p1739197454830369 - this test file is often flaky because the test sends out to both free and paid members at the same time, and depending on the ordering internally, the snapshots can be slightly different - AFAIK, we don't have a way to run snapshots against multiple email sends at the same time - to workaround that, and to add explicit testing for both groups, I've tweaked the test to run against each user group separately - also includes the snapshot changes to make this pass
8db781e to
15a3887
Compare