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:
@@ -68,6 +68,9 @@ public class ProgramEditorControlTests
|
||||
var oldPreview = preview.Entities.ToArray();
|
||||
|
||||
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();
|
||||
|
||||
Assert.NotSame(oldProgram, control.Program);
|
||||
@@ -84,6 +87,7 @@ public class ProgramEditorControlTests
|
||||
oldProgram = control.Program;
|
||||
oldPreview = preview.Entities.ToArray();
|
||||
beforeClick = oldPreview;
|
||||
status.Text = "<stale>";
|
||||
GetField<ToolStripMenuItem>(control, "menuMoveDown").PerformClick();
|
||||
|
||||
Assert.NotSame(oldProgram, control.Program);
|
||||
|
||||
Reference in New Issue
Block a user