test: realign nav-wiring integration tests with current BuildNavGroups#855
Merged
Conversation
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.
Summary
The
MainWindowViewModelTestsnav-wiring assertions had drifted from the currentMainWindowViewModel.BuildNavGroups()— they described an older sidebar layout. Theintegration-test project is compile-checked in CI but not executed, so the stale
assertions went unnoticed. This brings every assertion back in lock-step with the
live graph and adds two data-driven guards so future drift fails automatically.
Drift corrected (verified against
BuildNavGroups())nav-restore-points).nav-file-shredderlives under Privacy & Security, not Cleanup).nav-dns-changer+nav-hosts-editorwith themerged
nav-dns-hoststab.Privacy & Security 9, Info 5 (now lists
nav-system-report), Advanced 2.Per-group counts re-derived from source: dashboard 1, system 9, gaming 5, monitor 6,
cleanup 4, storage 2, network 5, apps 3, privacy 9, customization 4, info 5,
advanced 2 = 55.
Anti-drift guards added
NavLeaf_EveryItemHasContentAndResolvableView— enumerates the liveNavItemsandasserts each leaf has a non-empty id, non-null
Content, and aViewTypethat is areal
UserControlsubclass (so the lazyViewgetter can instantiate it).NavGroups_EveryLeafBelongsToExactlyOneGroup— asserts each flatNavItemis ownedby exactly one group, catching duplicate/orphan wiring.
These enumerate the real tree rather than hard-coding ids, so a future nav change that
breaks the contract fails the suite instead of being silently re-baselined.
Verification
SysManager.IntegrationTestsbuilds 0 warnings / 0 errors.BuildNavGroups()(MainWindowViewModel.cs).test:only — touches no product code, no release.