test(vtank): slice 7 fix round C item F13 — drop the control-count change detector
EveryInteractiveControlDeclaresARealHandlerBinding asserted an exact
Assert.Equal(156, controls.Length), backed by ~60 lines of running
commentary recording every markup edit that ever bumped the number. That
count was a pure change detector: it carried no signal the test's own
per-control handler/enabled loop couldn't already catch on its own, and
it forced an edit to THIS test file every time an unrelated tab gained
or lost a single control.
Replaced the exact count with Assert.NotEmpty(controls) — it still
guards the selector itself (a broken interactive-element-name filter
that matched nothing would otherwise pass the loop vacuously) — and kept
the real assertion (the per-control handler/enabled loop) unchanged.
Moved the removed count's full history into this same commit's ledger
entry in docs/plans/2026-09-07-campaign-vt-slice7-tabs.md, per item
F13's own instruction.
Mutation named: temporarily broke the controls selector (appended
`&& false` to the interactive-element filter) and confirmed
Assert.NotEmpty fails ("Collection was empty") before restoring it.
MossTank suite holds at 678 (no test added or removed, one assertion
replaced). Full solution build green; App markup/plugin filter 203/203.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
d20ad47c51
commit
6b42fd68ed
2 changed files with 14 additions and 69 deletions
|
|
@ -134,3 +134,6 @@ re-review, merge to the campaign branch, then the owner's visual gate.
|
|||
- 2026-09-07 09:10 S7.3 Monsters landed on the panel worktree (`57ced0aff`, `c3b4f7862`; MossTank suite 645 → 651): the 23-column grid with VTank's exact cycle lists (P −1…4; Dmg type 14 values; Ex. Vuln 9; PetDmg 10; name click deletes; arrows reorder with DEFAULT pinned). Implementer deviations for the review: Weapon/Offhand cycle MossTank's registered item roster instead of VTank's opaque weapon-type ids (MossTank models concrete owned items); the move-up/down DEFAULT guard is symmetric. Fix round A (grid scaling, Profiles leftovers, 260-tall window, Advanced Options / Loot Editor as their own panels, blank trailing slots, fresh screenshots) dispatched on the same worktree after merging the plain-menu style in. S7.4–S7.6 follow.
|
||||
- 2026-09-07 10:10 fix round A landed on the panel worktree (`045cd0a19` merge of the plain menu, `565a33d78` column shifts + Profiles cleanup + 236-tall window + popup panel files, `e414b2f56` csproj plugin-copy fix, `78b42a519` popups actually render (`StartVisible` gotcha) + fresh screenshots, `66b070def` ledger; MossTank suite 651 → 654). Owner's two complaints verified fixed on the new screenshots. Deviation for the review: Macro/Nav CopyTo lost their in-UI target-name field with the deleted block (VTank has none either). S7.4–S7.6 dispatched on the same worktree.
|
||||
- 2026-09-07 10:20 owner, live: "Drop down menus look horrible, there is also a checkmark on the text there." — the OPEN popup still draws retail art (tan gradient panel, ornate gold scrollbar, checkmark on the selected row). Plain open state (dark list rows, selected fill, plain scrollbar, no checkmark) dispatched on the plain-menu worktree; merges to the campaign branch, then into the panel worktree at fix round B.
|
||||
- 2026-09-07 fix round B item 16 landed on the panel worktree at `8d3c6ad7c` (dedupe, tab-switch popup cleanup, slider validation).
|
||||
- 2026-09-07 fix round C (architecture re-check of fix round B `8d3c6ad7c`) landed on the panel worktree, seven commits: `466fac426` (D1 — Advanced Options popup's four bindings, previously re-filtering the 163-entry VtankOptionCatalog and re-running GetMetaOption/ToDisplayString per row on every draw, materialized once by a new RefreshAdvancedOptions() called from category toggle/edit-apply/selection-change/profile-load), `23d4376cc` (D4 — AdvancedOptionCategoryEnabled no longer hands out the mutable backing bool[] directly; a ReadOnlyCollection view built once over the same array), `f15667db5` (D2 — `/mt refresh` now calls RefreshMonsterEditor after EnsureDefaultMonsterRule, the one gap found auditing every `_combatSettings.Rules` mutation site in the plugin), `3b8d02194` (D3 — AssertWithinParent's bottom-band check now counts each widget kind's own implicit default height when `h` is absent, label/field 16 toggle 20 button 16, instead of reading an absent `h` as zero), `37055bddc` (F7+F12 — ItemHandsColumn materialized once in RefreshItemEditors from the SAME base-name array that builds the decorated `_itemRows`, replacing a per-frame `.Select().ToArray()` plus a suffix-reparsing BaseItemName helper with one forward-only decoration; CycleItemHandsAtCore now refreshes the cache it mutates), `0724761ad` (F3 — SecondaryPopupPanelsFitTheirOwnBoundsAndEveryBindingResolves discovers popup files with the same glob the sibling-overlap and arrow-glyph tests already use instead of a hand-maintained InlineData list), `d20ad47c5` (F4 — the ExtraBuffSpellNames/BlacklistedBuffFamilyNames field comments and their two Buffs-tab tooltips now cite issue #491). D3's grep audit of every real `mosstank*.xml` file found no label/toggle/field/button missing `h`, so the stricter bottom-band check introduced zero new failures against shipped markup. Every new/changed pin was shown to fail against a targeted mutation (property/getter reverted, or the assertion target broken) before the fix was restored; D1's own fix broke one PRE-EXISTING test (`AdvancedOptionValueColumnMirrorsTheLiveSettingValue`, which expected a setting toggled OUTSIDE the popup's own mutators to appear on the very next read) — updated it to exercise the "selection change" mutator afterward, with a comment explaining the narrowed contract. MossTank suite 677 (D1) → 678 (D4) → 679 (D2) → 680 (D3) → 681 (F7+F12) → 678 (F3, four InlineData cases collapsed into one Fact, no coverage loss) → 678 (F4, comment/tooltip only) → 678 (F13, no new test, an assertion removed). Full solution build green after every commit; App markup/plugin filter held 203/203 throughout.
|
||||
- 2026-09-07 fix round C item F13 folded the `EveryInteractiveControlDeclaresARealHandlerBinding` test's exact-control-count history here, in the same commit that removed it from the test file: Round 3 item 10 added +3 for the Route/Loot/Meta Delete buttons (Settings already had one from round 2 step 5). Campaign VT slice 7 S7.1/S7.2 transcribed Options/Profiles/Vitals control-for-control from VTank's own tabs (docs/research/vtank-kb/08-ui-views.md §1) and repositioned the Advanced Options/Loot Editor popups to VTank's exact 392x300/268x300 geometry — net 194 → 205. The Options tab gained four direct checkboxes for settings that already existed but were only reachable through the generic Advanced Options key-value editor (Enable Autostack, Fastcast Buffs, Don't Shoot at Walls, Fallback Debuffs if Blocked); the Profiles tab gained a real Meta-profile combo/CopyTo row (previously a stub label) and per-type name fields/New buttons, and lost the Loot Priority Boost toggle as a duplicate of the Options-tab control of the same name; the Loot Editor popup lost LootEditorNotice (a status label, not an action). S7.3 replaced the whole Monsters tab body with VTank's own 23-column grid: the select-then-edit surface (1 list + 1 field + 8 buttons + 3 menus + 14 toggles + 3 equip buttons = 30 controls) is gone, replaced by 1 list + 23 columns + 1 field + 2 buttons (27) — net 205 → 202. Fix round A (2026-09-07) moved the Advanced Options and Loot Editor groups OUT of mosstank.xml entirely into their own plugin panels and deleted the Profiles tab's three stacked name-draft field+"New"-button rows and the acdream-only "Loot engine" classifier menu — net 202 → 167. S7.4 replaced the Items tab's single-column list with VTank's own clWeaponName/clHandedness 2-column grid (+2), added the Consumables tab's "Excluded Scarab Types" 2-column grid plus its "Add Selected" button (+4), and added the Buffs tab's Extra Buff Spells / Blacklisted Buff Families lists plus their two "Add..." buttons (+4) — net 167 → 177. S7.5 replaced the Route tab's single-column waypoint list with VTank's own clWP/clWPc 2-column grid (+2) and added the "Select Nearest Point" button (+1) — net 177 → 180. S7.6 replaced the Meta tab's single-column rules list with VTank's own 6-column lstMetaRules grid (+6) — net 180 → 186. Fix round B item 5: VTank's real Meta tab is only 5 controls (the grid, "Create", a caption, and the settable current-state menu). Removed entirely: the profile toolbar (menu/name-draft/New/CopyTo/Clear/Delete, 6) and "Enable Meta" (1) — 7 controls gone for good. Moved into mosstank-metaeditor.xml (a separate file this test doesn't scan): the State/Condition/Action editor (2 fields + 2 menus + 1 field for state + 1 secondary-text field + 4 numeric-stepper buttons + Apply/Remove/MoveUp/MoveDown, 14). Added: the settable cmbMetaCurrentState menu (+1). Net 186 → 166 (-7 -14 +1). Fix round B item 8: the Route tab collapses to VTank's own 2-across button grid + bottom nav-control row, 28 → 18 interactive controls within mosstank.xml. Checkpoint/Jump/Remove/Set Follow Target/Follow Corners/Open Doors/Nav Priority/the Follow-Nav-Min-Distance stepper moved to mosstank-advanced.xml's own new "MossTank Extras" section. The 2-state ToggleRouteAddPosition button became the real 3-option cmbNavInsertMode `<menu>`, and the pause "-"/"+" stepper became one editable field. Net 166 → 156 (the count the test asserted immediately before this fix round removed the assertion). The test's own per-control handler/enabled loop remains the live guarantee; a bare `Assert.NotEmpty(controls)` guards the selector itself.
|
||||
|
|
|
|||
|
|
@ -164,75 +164,17 @@ public sealed class MossTankMarkupContractTests
|
|||
XElement[] controls = root.Descendants()
|
||||
.Where(element => interactive.Contains(element.Name.LocalName))
|
||||
.ToArray();
|
||||
// Round 3 item 10: +3 for the Route/Loot/Meta Delete buttons
|
||||
// (Settings already had one from round 2 step 5). Campaign VT
|
||||
// slice 7 S7.1/S7.2 transcribed Options/Profiles/Vitals
|
||||
// control-for-control from VTank's own tabs (docs/research/
|
||||
// vtank-kb/08-ui-views.md §1) and repositioned the Advanced
|
||||
// Options/Loot Editor popups to VTank's exact 392x300/268x300
|
||||
// geometry — net 194 -> 205. The Options tab gained four direct
|
||||
// checkboxes for settings that already existed but were only
|
||||
// reachable through the generic Advanced Options key-value editor
|
||||
// (Enable Autostack, Fastcast Buffs, Don't Shoot at Walls, Fallback
|
||||
// Debuffs if Blocked); the Profiles tab gained a real Meta-profile
|
||||
// combo/CopyTo row (previously a stub label) and per-type name
|
||||
// fields/New buttons, and lost the Loot Priority Boost toggle as a
|
||||
// duplicate of the Options-tab control of the same name; the Loot
|
||||
// Editor popup lost LootEditorNotice (a status label, not an
|
||||
// action — dropped to fit VTank's 268x300 footprint without
|
||||
// clipping, see the group's own comment).
|
||||
// S7.3 replaced the whole Monsters tab body with VTank's own
|
||||
// 23-column grid (docs/research/vtank-kb/08-ui-views.md §1 "Tab:
|
||||
// Monsters"): the select-then-edit surface (1 list + 1 field + 8
|
||||
// buttons + 3 menus + 14 toggles + 3 equip buttons = 30 controls)
|
||||
// is gone, replaced by 1 list + 23 columns + 1 field + 2 buttons
|
||||
// (27) — net 205 -> 202.
|
||||
// Fix round A (2026-09-07) moved the Advanced Options and Loot
|
||||
// Editor groups OUT of mosstank.xml entirely into their own plugin
|
||||
// panels (mosstank-advanced.xml / mosstank-loot-editor.xml, this
|
||||
// contract only scans mosstank.xml) and deleted the Profiles tab's
|
||||
// three stacked name-draft field+"New"-button rows and the
|
||||
// acdream-only "Loot engine" classifier menu (owner: legacy
|
||||
// leftovers) — net 202 -> 167.
|
||||
// S7.4 replaced the Items tab's single-column list with VTank's own
|
||||
// clWeaponName/clHandedness 2-column grid (+2: the list itself plus
|
||||
// 2 <column> elements, vs. 1 for the old single-column list), added
|
||||
// the Consumables tab's "Excluded Scarab Types" 2-column grid plus
|
||||
// its "Add Selected" button (+4: 1 list + 2 columns + 1 button),
|
||||
// and added the Buffs tab's Extra Buff Spells / Blacklisted Buff
|
||||
// Families lists plus their two "Add..." buttons (+4: 2 lists + 2
|
||||
// buttons) — net 167 -> 177.
|
||||
// S7.5 replaced the Route tab's single-column waypoint list with
|
||||
// VTank's own clWP/clWPc 2-column grid (+2) and added the
|
||||
// "Select Nearest Point" button (+1) — net 177 -> 180.
|
||||
// S7.6 replaced the Meta tab's single-column rules list with
|
||||
// VTank's own 6-column lstMetaRules grid (+6: the list itself was
|
||||
// already counted, now 6 <column> children) — net 180 -> 186.
|
||||
// Fix round B item 5: VTank's real Meta tab is only 5 controls (the
|
||||
// grid, "Create", a caption, and the settable current-state menu —
|
||||
// docs/research/vtank-kb/08-ui-views.md §1). Removed entirely (no
|
||||
// Profiles-tab equivalent, or already on Options): the profile
|
||||
// toolbar (menu/name-draft/New/CopyTo/Clear/Delete, 6) and "Enable
|
||||
// Meta" (1) — 7 controls gone for good. Moved into
|
||||
// mosstank-metaeditor.xml (a separate file this test doesn't scan):
|
||||
// the State/Condition/Action editor (2 fields + 2 menus + 1 field
|
||||
// for state + 1 secondary-text field + 4 numeric-stepper buttons +
|
||||
// Apply/Remove/MoveUp/MoveDown, 14). "Add" is renamed "Create" and
|
||||
// stays in place (same slot, no count change). Added: the settable
|
||||
// cmbMetaCurrentState menu (+1). Net 186 -> 166 (-7 -14 +1).
|
||||
// Fix round B item 8: the Route tab collapses to VTank's own
|
||||
// 2-across button grid + bottom nav-control row (docs/research/
|
||||
// vtank-kb/08-ui-views.md §1 "Tab: Route"), 28 -> 18 interactive
|
||||
// controls within mosstank.xml. Checkpoint/Jump/Remove/Set Follow
|
||||
// Target/Follow Corners/Open Doors/Nav Priority/the Follow-Nav-Min-
|
||||
// Distance stepper (no VTank Route-tab counterpart) moved to
|
||||
// mosstank-advanced.xml's own new "MossTank Extras" section — a
|
||||
// separate file this scan doesn't cover. The 2-state
|
||||
// ToggleRouteAddPosition button became the real 3-option
|
||||
// cmbNavInsertMode <menu>, and the pause "-"/"+" stepper became one
|
||||
// editable field, matching VTank's own txtPauseWaypointTime. Net
|
||||
// 166 -> 156.
|
||||
Assert.Equal(156, controls.Length);
|
||||
// Fix round C item F13: this used to also assert an exact control
|
||||
// count, with ~60 lines of running commentary on every markup edit
|
||||
// that bumped the number. That count was a pure change detector —
|
||||
// it carried no signal EveryInteractiveControlDeclaresARealHandlerBinding
|
||||
// couldn't already fail on its own, and it forced an edit to THIS
|
||||
// test every time an unrelated tab gained or lost a control. The
|
||||
// per-tab control-count history now lives in the slice 7 plan
|
||||
// ledger (docs/plans/2026-09-07-campaign-vt-slice7-tabs.md)
|
||||
// instead. The loop below is the real assertion: every interactive
|
||||
// control must have a real handler and must not be disabled.
|
||||
Assert.NotEmpty(controls);
|
||||
|
||||
foreach (XElement control in controls)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue