Skip to content

armgit / Filee

Public Imported from GitHub
0

Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.

Toolbar page test: a new group joins the groups at the top, wherever they start

SeoJCalive5e390c6101a3
diff --git a/tests/Filee.App.Tests/ToolbarEditorTests.cs b/tests/Filee.App.Tests/ToolbarEditorTests.cs
index b07732ee..92c30703 100644
--- a/tests/Filee.App.Tests/ToolbarEditorTests.cs
+++ b/tests/Filee.App.Tests/ToolbarEditorTests.cs
@@ -251,7 +251,10 @@ public class ToolbarPageTests
});
Assert.Equal("", vm.PaletteSearch);
- Assert.Equal("test-new-group", vm.VisiblePalette.First().PresetId); // right at the top, not below ~80 presets
+ // Up with the groups at the top, above every conversion: not below ~80 presets.
+ var chips = vm.VisiblePalette.Select(c => store.FindPreset(c.PresetId)!).ToList();
+ var at = chips.FindIndex(p => p.Id == "test-new-group");
+ Assert.True(at >= 0 && chips.Take(at).All(p => p.IsGroup), $"at {at}");
Assert.Equal($"{pdf.Profile.PresetIds.Count}", pdf.Count);
Assert.DoesNotContain("test-new-group", vm.SelectedProfile!.Profile.PresetIds); // on no donut until dragged there
}