From 101f5e16dfe19ba3d8744d3b869653a2258bba07 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Wed, 18 Nov 2026 09:34:29 -0500 Subject: [PATCH] test(windows): fix the two windows-desktop CI failures The cut-off clearance change (cacfdcf5) drops a grid line within the cut clearance of the tail separator. The dialog test's fixture used spacing 40 with parts occupying exactly 80, so the second line (80, beside the 80.5 separator) was dropped and the lone remaining line could not shift, which is what the test asserts. Spacing 38 keeps two lines, so the shift and the "less than the fixed grid" report are still exercised. The overlap-menu test was renamed when Check Active Plate and Cancel Check left the menu (c10abfe9), but the acceptance manifest still required the old name, so the coverage check found zero cases. Co-Authored-By: Claude Opus 5.5 --- OpenNest.WinForms.Tests/Forms/AutomaticCutOffFormTests.cs | 8 +++++--- scripts/windows-acceptance.json | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/OpenNest.WinForms.Tests/Forms/AutomaticCutOffFormTests.cs b/OpenNest.WinForms.Tests/Forms/AutomaticCutOffFormTests.cs index ba18b632..7b2b2d4e 100644 --- a/OpenNest.WinForms.Tests/Forms/AutomaticCutOffFormTests.cs +++ b/OpenNest.WinForms.Tests/Forms/AutomaticCutOffFormTests.cs @@ -48,13 +48,15 @@ public class AutomaticCutOffFormTests spacing.Text = "30"; Assert.Equal(15, double.Parse(minimum.Text)); minimum.Text = "20"; - spacing.Text = "40"; + // Not 40: the grid's second line (80) would fall within the cut clearance of the + // tail separator (80.5) and be dropped, leaving one line with no room to shift. + spacing.Text = "38"; Assert.Equal("20", minimum.Text); Invoke(form, "PreviewButton_Click", null, EventArgs.Empty); var expected = AutomaticCutOffPlanner.Create(view.Plate, - new AutomaticCutOffOptions { Spacing = 40, MinimumStripLength = 20, MinimumTailLength = 12 }, + new AutomaticCutOffOptions { Spacing = 38, MinimumStripLength = 20, MinimumTailLength = 12 }, view.CutOffSettings); - Assert.NotEqual(40, expected.Definitions.First(c => c.Axis == CutOffAxis.Vertical).Position.X); + Assert.NotEqual(38, expected.Definitions.First(c => c.Axis == CutOffAxis.Vertical).Position.X); Assert.Equal(expected.Definitions.Select(c => c.Position.X), PreviewParts(view).Select(p => ((RapidMove)p.BasePart.Program.Codes[0]).EndPoint.X)); Assert.Contains("Strip cuts:", Control