From d5636e318ff45bc7233c5e117831db5b21e39afe Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Sun, 16 Aug 2026 09:52:45 +0200 Subject: [PATCH] Assert the search pane's DataContext before checking the progress binding ProgressBar.IsIndeterminate defaults to false, so the "nothing is running yet" assertion would also pass against a pane whose DataContext is not the resolved SearchPaneModel, and the failure would only surface one line later, blamed on the binding direction rather than on the missing DataContext. Assisted-by: Claude:claude-fable-5:Claude Code --- ILSpy.Tests/Search/SearchProgressTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ILSpy.Tests/Search/SearchProgressTests.cs b/ILSpy.Tests/Search/SearchProgressTests.cs index 7a775e2a6..71c69ff68 100644 --- a/ILSpy.Tests/Search/SearchProgressTests.cs +++ b/ILSpy.Tests/Search/SearchProgressTests.cs @@ -121,6 +121,7 @@ public class SearchProgressTests // is an infinite animation, and one that ran while idle would keep the render clock // busy for as long as the pane exists. var search = AppComposition.Current.GetExport(); + pane.DataContext.Should().BeSameAs(search, "the indicator binds to the pane's own model; anything else makes the assertions below meaningless"); progress!.IsIndeterminate.Should().BeFalse("nothing is running yet"); search.IsSearching = true; Dispatcher.UIThread.RunJobs();