test(editor): prove per-operation highlighting with a status sentinel

The reorder event snapshot could previously show the reverse pass's
stale timeout label. Set a sentinel before each click so the
ProgramChanged handler can only observe the label applied by the
current operation's highlighting pass.
This commit is contained in:
aj
2026-09-30 01:39:26 -04:00
parent 132bb07bc9
commit 38324628b0
@@ -68,6 +68,9 @@ public class ProgramEditorControlTests
var oldPreview = preview.Entities.ToArray(); var oldPreview = preview.Entities.ToArray();
beforeClick = oldPreview; beforeClick = oldPreview;
// Overwrite any stale indication so the event snapshot can only show the label
// applied by THIS operation's highlighting pass.
status.Text = "<stale>";
GetControl<Button>(control, "reverseButton").PerformClick(); GetControl<Button>(control, "reverseButton").PerformClick();
Assert.NotSame(oldProgram, control.Program); Assert.NotSame(oldProgram, control.Program);
@@ -84,6 +87,7 @@ public class ProgramEditorControlTests
oldProgram = control.Program; oldProgram = control.Program;
oldPreview = preview.Entities.ToArray(); oldPreview = preview.Entities.ToArray();
beforeClick = oldPreview; beforeClick = oldPreview;
status.Text = "<stale>";
GetField<ToolStripMenuItem>(control, "menuMoveDown").PerformClick(); GetField<ToolStripMenuItem>(control, "menuMoveDown").PerformClick();
Assert.NotSame(oldProgram, control.Program); Assert.NotSame(oldProgram, control.Program);