Removed markdownToMobiledoc test helper#29075
Conversation
ref https://linear.app/ghost/issue/GVA-816 - Ghost renders lexical only; content stored as mobiledoc is converted on save, so test fixtures seeded via markdownToMobiledoc ended up stored as lexical anyway - replaced the helper with markdownToLexical, which produces the same markdown-card lexical doc that the mobiledoc converter emitted, keeping stored content and rendered HTML identical - DataGenerator.forKnex.createPost now defaults to lexical content while still accepting explicit mobiledoc for tests covering the legacy input path (importer v1, force re-render conversion), which now build their mobiledoc locally to make the legacy intent explicit Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
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 (2)
WalkthroughThis PR updates test fixtures and helper utilities to use Lexical content instead of Mobiledoc across admin, content, frontend, webhook, importer, model, and unit test coverage. The shared fixture generator adds Changes
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ 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 |
✅ Succeeded | 2m 45s | View ↗ |
nx run ghost:test:integration |
✅ Succeeded | 2m 50s | View ↗ |
nx run ghost:test:legacy |
✅ Succeeded | 2m 53s | View ↗ |
nx run ghost:test:e2e |
✅ Succeeded | 2m 29s | View ↗ |
nx run-many -t lint -p ghost |
✅ Succeeded | 35s | View ↗ |
nx run-many -t test:unit -p ghost |
✅ Succeeded | 29s | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-07-03 10:46:16 UTC
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09e6adee1a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ref https://linear.app/ghost/issue/GVA-816 - the e2e-webhooks tests built API payloads from fixtureManager.get('posts', 1).mobiledoc, which is undefined now that the fixture stores lexical, so posts were created blank and the webhook body snapshots failed in CI - the rendered html in the snapshots is unchanged as the lexical fixture carries the same markdown card the mobiledoc version did Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

ref https://linear.app/ghost/issue/GVA-816
Follow-up to #28906, which removed mobiledoc rendering and HTML-to-mobiledoc conversion. Test fixtures were still seeding post content as mobiledoc via the
markdownToMobiledochelper — since the model now converts any mobiledoc input to lexical on save, that content ended up stored as lexical anyway, so the helper was just a roundabout way of producing lexical content.Changes
DataGenerator.markdownToMobiledocwithDataGenerator.markdownToLexical, which produces the exact markdown-card lexical doc thatmobiledocToLexical()emitted for these fixtures — stored content and rendered HTML are unchanged, so no snapshot updates are needed.DataGenerator.forKnex.createPostnow defaults to lexical content (still accepts an explicitmobiledocoverride), andDataGenerator.forModel.postspickslexicalinstead ofmobiledoc.force_rerendermobiledoc→lexical conversion test inposts-legacy.test.jspost-with-all-media-types-mobiledocfixture andrestoreLegacyMobiledocPostsare untouched — they still cover the legacy mobiledoc read/render paths.Testing
test:unit,test:integration,test:e2eandtest:legacyrun locally; every changed file passes in isolation (123/123 across the changed e2e files, 76/76 model-posts, 42/42 importer)🤖 Generated with Claude Code