fix(test): add textBetween/nodesBetween to plan-engine tr.doc mocks#2834
fix(test): add textBetween/nodesBetween to plan-engine tr.doc mocks#2834caio-pizzol merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 76f281c4bf
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Same root cause as the other three files — the word-diff trim in executor.ts calls tr.doc.textBetween and charOffsetToDocPos (which uses tr.doc.nodesBetween). The remap-length mock needs: - textBetween returning a range-sized unique string (no common prefix/suffix with any replacement) so the trim is a no-op - nodesBetween simulating a single text node so charOffsetToDocPos maps offsets correctly
c184165 to
a60bc0b
Compare
|
🎉 This PR is included in @superdoc-dev/react v1.2.0-next.16 The release is available on GitHub release |
|
🎉 This PR is included in vscode-ext v2.3.0-next.19 |
|
🎉 This PR is included in template-builder v1.5.0-next.19 The release is available on GitHub release |
|
🎉 This PR is included in esign v2.3.0-next.19 The release is available on GitHub release |
|
🎉 This PR is included in superdoc v1.26.0-next.19 The release is available on GitHub release |
|
🎉 This PR is included in superdoc-cli v0.7.0-next.20 The release is available on GitHub release |
|
🎉 This PR is included in superdoc-sdk v1.6.0-next.17 |
The word-diff executor added in #2817 calls
tr.doc.textBetween(...)andtr.doc.nodesBetween(...)in the text.rewrite trim path, but thetr.docmocks in determinism-stress, executor, and preview-parity tests were never updated. That's been breaking `unit-tests (super-editor, 2/4)` and `(super-editor, 3/4)` on every PR since #2817 landed.