test(frontend): extend CoeditorPresenceService coverage#6386
Conversation
Automated Reviewer SuggestionsBased on the
|
There was a problem hiding this comment.
Pull request overview
This PR expands the frontend unit test coverage for CoeditorPresenceService by exercising it against a real Yjs Awareness instance and a real WorkflowGraph/SharedModel, verifying collaboration-presence behaviors without changing production code.
Changes:
- Added comprehensive
Awareness-driven tests for co-editor add/update/remove, including local-client filtering and stale-removal handling. - Added coverage for yDoc reload re-observation, shadowing mode behaviors, highlight/currently-editing propagation, and code-editor open/close event emission.
- Added coverage for cursor pointer creation/move/removal and property-changed flash timeout behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6386 +/- ##
=========================================
Coverage 66.04% 66.04%
Complexity 3380 3380
=========================================
Files 1142 1142
Lines 44980 44980
Branches 4948 4948
=========================================
Hits 29709 29709
Misses 13631 13631
Partials 1640 1640
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What changes were proposed in this PR?
Extends the
CoeditorPresenceServicespec (was ~19% covered), driving the real yjs Awareness object: join/leave/update handling, yDoc-reload re-registration, shadowing start/stop, cursor pointer branches, incremental highlight diffing, currently-editing tracking, property-changed flash timeout, and code-editor open/close emissions.Any related issues, documentation, discussions?
Closes #6383.
How was this PR tested?
Extended the spec from 1 to 24 tests against the real WorkflowGraph/SharedModel with spied joint-wrapper coeditor methods. Verified locally with Vitest and CI's
format:cigate clean. Test-only change — no production code is modified.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8 [1M context])