Fix MATLAB E-I shard: companion toolbar tests for Phase 1040 bell#182
Closed
HanSur94 wants to merge 1 commit into
Closed
Fix MATLAB E-I shard: companion toolbar tests for Phase 1040 bell#182HanSur94 wants to merge 1 commit into
HanSur94 wants to merge 1 commit into
Conversation
PR #180 (Phase 1040: Companion Notification Center) added a notification bell to the FastSenseCompanion toolbar, growing it from a 1x9 to a 1x10 grid: the bell was inserted at col 8, pushing the flex spacer 8->9 and the gear 9->10 (all documented in FastSenseCompanion.m). #180 updated TestFastSenseCompanion and TestCompanionEventViewer but missed TestFastSenseCompanionPlantLogToolbar, whose findToolbarGrid_ still matched a 9-column grid and whose assertions still expected the gear at col 9. The grid was never found (verifyNotEmpty failed) and the gear-column check failed, turning MATLAB Tests (E-I) red on main and on every PR that merges with main. Updates the test to the shipped 1x10 layout {110,110,110,130,70,90,70,70,'1x',36}: col 8 = bell (70), col 9 = flex spacer, col 10 = gear (36). Test-only change matching the intentional, self-consistent implementation. Verified 11/11 pass in MATLAB R2020b+ (the two previously-failing methods testToolbarGridIs1x5 + testSettingsButtonMovedToCol5 now green); mlint clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Owner
Author
|
Superseded by #181, which now carries both this toolbar fix and the Octave-compat fix in one PR. Splitting them left each PR with the other half of #180's breakage still red (neither independently green), so consolidating into #181 for a clean, mergeable unblock-main PR. The toolbar commit (eca5251) was cherry-picked onto #181 unchanged. |
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.
Problem
PR #180 (Phase 1040: Companion Notification Center) landed on
mainand turned the MATLAB Tests (E-I) shard red — onmainitself and on every PR that merges with it. (Sibling to #181, which fixes #180's Octave breakage.)Confirmed it's a
mainregression, not PR-specific:main@c02e34d6(just before Phase 1040: Companion Notification Center — acknowledgeable inbox in the Event Viewer #180): E-I shard green.main@2a191c0b(Phase 1040: Companion Notification Center — acknowledgeable inbox in the Event Viewer #180 merge): E-I shard red —Tests failed: 2.Root cause
#180 added the notification bell to the
FastSenseCompaniontoolbar, growing it from a 1×9 to a 1×10 grid (documented inFastSenseCompanion.m):#180 updated
TestFastSenseCompanionandTestCompanionEventViewer, but missedTestFastSenseCompanionPlantLogToolbar:findToolbarGrid_matched only a 9-column grid → grid never found →verifyNotEmptyfailed intestToolbarGridIs1x5.testSettingsButtonMovedToCol5asserted the gear at col 9 → now col 10 →verifyEqualfailed.The implementation is intentional and self-consistent; only the test drifted.
Change
Test-only. Updates
tests/suite/TestFastSenseCompanionPlantLogToolbar.mto the shipped 1×10 layout{110,110,110,130,70,90,70,70,'1x',36}:findToolbarGrid_: 9→10 columns, matchcw{8}==70(bell) andcw{10}==36(gear).testToolbarGridIs1x5: assertcw{8}=70(bell),cw{9}='1x'(spacer),cw{10}=36(gear) + refreshed column map.testSettingsButtonMovedToCol5: gear now at col 10.Plant Log button assertions (col 4) are unaffected — the bell sits at col 8, after Plant Log.
Verification
mlint: clean.🤖 Generated with Claude Code