Skip to content

test: realign nav-wiring integration tests with current BuildNavGroups#855

Merged
laurentiu021 merged 1 commit into
mainfrom
test/r5-realign-nav-wiring-tests
Jun 11, 2026
Merged

test: realign nav-wiring integration tests with current BuildNavGroups#855
laurentiu021 merged 1 commit into
mainfrom
test/r5-realign-nav-wiring-tests

Conversation

@laurentiu021

Copy link
Copy Markdown
Owner

Summary

The MainWindowViewModelTests nav-wiring assertions had drifted from the current
MainWindowViewModel.BuildNavGroups() — they described an older sidebar layout. The
integration-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())

  • Total leaf count: 56 → 55.
  • System group: 8 → 9 (it includes nav-restore-points).
  • Cleanup group: 5 → 4 (nav-file-shredder lives under Privacy & Security, not Cleanup).
  • Network: replaced the separate nav-dns-changer + nav-hosts-editor with the
    merged nav-dns-hosts tab.
  • Re-bucketed the per-group id assertions to match reality: Monitor 6, Apps 3,
    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 live NavItems and
    asserts each leaf has a non-empty id, non-null Content, and a ViewType that is a
    real UserControl subclass (so the lazy View getter can instantiate it).
  • NavGroups_EveryLeafBelongsToExactlyOneGroup — asserts each flat NavItem is owned
    by 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.IntegrationTests builds 0 warnings / 0 errors.
  • Assertion numbers cross-checked against BuildNavGroups() (MainWindowViewModel.cs).

test: only — touches no product code, no release.

@laurentiu021 laurentiu021 merged commit b73e1ae into main Jun 11, 2026
4 checks passed
@laurentiu021 laurentiu021 deleted the test/r5-realign-nav-wiring-tests branch June 11, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant