Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe test file Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run ghost:test:ci:integration:no-coverage |
✅ Succeeded | 2m 10s | View ↗ |
nx run ghost:test:ci:integration |
✅ Succeeded | 1m 19s | View ↗ |
nx run ghost:test:ci:e2e:no-coverage |
✅ Succeeded | 4m 3s | View ↗ |
nx run ghost:test:ci:e2e |
✅ Succeeded | 3m 41s | View ↗ |
nx run ghost:test:ci:legacy |
✅ Succeeded | 2m 17s | View ↗ |
nx run-many -t test:unit -p ghost |
✅ Succeeded | 33s | View ↗ |
nx run-many -t lint -p ghost |
✅ Succeeded | 43s | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-06-18 01:24:00 UTC
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ghost/core/test/e2e-api/members/automations.test.js`:
- Around line 284-304: The DomainEvents.dispatch stub is created at line 284 and
restored at line 293, which means the member creation that occurs between these
lines happens while dispatch is stubbed. This suppresses domain events that
should normally fire during member creation, invalidating the test scenario.
Move the sinon.stub(DomainEvents, 'dispatch') call to after the
membersService.api.members.create() call completes, so that the member creation
events are not suppressed and the automation enrollment can be properly
triggered before the scheduler poll at runSchedulerPoll().
- Around line 228-244: The test validates that inactive automations do nothing,
but it never calls runSchedulerPoll() before asserting zero email sends. Add a
call to runSchedulerPoll() after the DomainEvents.allSettled() call and before
the final assertion that checks getMemberWelcomeEmailSends().length equals zero.
This ensures the test actually verifies that the inactive status blocks email
sends, rather than just confirming that no poll was executed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d8efc952-3029-4d2f-84d0-61dc14883047
📒 Files selected for processing (1)
ghost/core/test/e2e-api/members/automations.test.js
closes https://linear.app/ghost/issue/NY-1327 This is a test-only change to give us some more confidence in automations.

closes https://linear.app/ghost/issue/NY-1327
This is a test-only change to give us some more confidence in automations.