mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-22 08:31:36 -04:00
fix(desktop): allow pixel rounding in cutoff drag test
The Windows run 38614147947 failed ActiveCutOffDragNeedsLeftMotionAndEndsAfterSelectionClears because a screen-space drag to world X=11 rounded to X=10.96. Assert bounded movement, then verify the released coordinate stays unchanged.
This commit is contained in:
1 parent
e8c0eea0b0
commit
720c3d9b7a
1 file changed
+3
-2
@@ -189,12 +189,13 @@ public class CutOffWindowSelectionTests
|
||||
Assert.True(view.CutOffs.IsDragging);
|
||||
|
||||
view.MoveTo(new Vector(11, 2), MouseButtons.Left);
|
||||
Assert.Equal(11, cutoff.Position.X);
|
||||
Assert.InRange(cutoff.Position.X, 10.5, 11.5);
|
||||
view.Selection.DeselectCutOffs();
|
||||
view.Up(new Vector(11, 2));
|
||||
Assert.False(view.CutOffs.IsDragging);
|
||||
var releasedX = cutoff.Position.X;
|
||||
view.MoveTo(new Vector(13, 2), MouseButtons.None);
|
||||
Assert.Equal(11, cutoff.Position.X);
|
||||
Assert.Equal(releasedX, cutoff.Position.X);
|
||||
});
|
||||
|
||||
private sealed class EventView : PlateView
|
||||
|
||||
Reference in new issue
Block a user