From 720c3d9b7ac4e4799f598cdbc200264543d8c0f5 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Wed, 14 Oct 2026 14:23:52 -0400 Subject: [PATCH] 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. --- OpenNest.WinForms.Tests/CutOffWindowSelectionTests.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenNest.WinForms.Tests/CutOffWindowSelectionTests.cs b/OpenNest.WinForms.Tests/CutOffWindowSelectionTests.cs index e6be503d..7f6a7d89 100644 --- a/OpenNest.WinForms.Tests/CutOffWindowSelectionTests.cs +++ b/OpenNest.WinForms.Tests/CutOffWindowSelectionTests.cs @@ -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