[21/N] Add unit tests for ObjectManager - #112
Open
karkir0003 wants to merge 21 commits into
Open
karkir0003 wants to merge 21 commits into
karkir0003 wants to merge 21 commits into
Conversation
…de, and AnimatedCircularlyLinkedListNode
This was referenced Oct 3, 2026
Open
This was referenced Oct 3, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🥞 Stack
Addresses #93
Context
Adds unit test coverage for
ObjectManager.js, the central scene graph manager responsible for object registry, layer routing, edge tracking, cardinal alignment, and canvas render ordering.Changes Made
• Introduced
src/anim/__tests__/ObjectManager.test.jscovering:• Instantiation and registration across all 9 visual entity types (
Circle,HighlightCircle,Rectangle,Label,LinkedListNode,DoublyLinkedListNode,CircularlyLinkedListNode,SkipListNode,BTreeNode) with duplicate ID detection.• Node property modification and retrieval (coordinates, dimensions, text labels, colors, alpha, alwaysOnTop, and edge thicknesses).
• Edge connection management (forward and back edges, customizable color/thickness/curve, edge property updates, disconnection undo creation, and incident deletion).
• Layer management (activation, toggling, bulk setting, and recursive visibility propagation to connected edges).
• Alignment algorithms (
alignTop,alignBottom,alignLeft,alignRight, and relative coordinate helpers).• The full canvas
drawpipeline across unhighlighted, highlighted, alwaysOnTop nodes, pulsing edges, and status report.Test Plan
• Ran
npm test -- --watchAll=false• Ran
npm run lintandnpm run prettier• Verified 100% statement, function, and line coverage across
ObjectManager.js