fix: update the tests from trainrunsections.view.spec and data.view.s… #625
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.
Description
This PR updates unit tests to accommodate the changes made to
TrainrunSectionViewObjectin the collapsed nodes feature implementation.Changes
Modified Test Files
trainrunsections.view.spec.ts: Updated tests for methods that now expectTrainrunSectionViewObjectinstead ofTrainrunSection:getPosition()- 2 tests updatedenforceStartTextAnchor()- 8 tests updatedgetAdditionTextCloseToNodePositioningValue()- 4 tests updatedgetTrainrunSectionNextAndDestinationNodeToShow()- 1 test updateddata.view.spec.ts:TrainrunSectionViewObjectconstructor call to use array of sections ([ts]instead ofts)Key Changes
The main model change was:
TrainrunSectionViewObject.trainrunSection: TrainrunSection→TrainrunSectionViewObject.trainrunSections: TrainrunSection[]This change supports grouping multiple sections together when intermediate nodes are collapsed, allowing the view layer to render direct paths between expanded nodes.
Test Pattern
All updated tests now follow this pattern:
Test Results
✅ All 514 tests passing
✅ No TypeScript compilation errors
Issues
Related to #554 - Part of the collapsed nodes feature implementation
Checklist
This PR contains a description of the changes I'm making
I've read the Contribution Guidelines
I've added tests for changes or features I've introduced (updated existing tests to match new signatures)
I documented any high-level concepts I'm introducing in documentation (test updates don't require documentation)
CI is currently green and this is ready for review