Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ILSpy.Tests/AssemblyList/SwitchListAndDeleteAllTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ public async Task Ctrl_A_Then_Delete_Drops_The_Selection_History_And_Tab()
// Arrange - boot, decompile something so there is a tab and history to lose, then give
// the tree keyboard focus.
var (window, vm) = await TestHarness.BootAsync(3);
// Decompiling the sample would otherwise add the test assembly's whole reference closure
// to the list as rows of their own, and Ctrl+A would select every one of them.
AppComposition.Current.GetExport<SettingsService>().DecompilerSettings.AutoLoadAssemblyReferences = false;
await GiveTheHistorySomethingToHoldAsync(vm);
// Collapse again: Ctrl+A selects every visible row, and the tree is normally collapsed
// to its assemblies when a user reaches for it.
Expand All @@ -100,6 +103,8 @@ public async Task Ctrl_A_Then_Delete_Drops_The_Selection_History_And_Tab()
await Waiters.WaitForIdleAsync();
var pane = await window.WaitForComponent<AssemblyListPane>();
var tree = await pane.WaitForComponent<ICSharpCode.ILSpy.Controls.TreeView.SharpTreeView>();
((System.Collections.IList)tree.ItemsSource!).Count.Should().Be(4,
"Ctrl+A is meant to select the three seeded assemblies and the test assembly, nothing else");
tree.Focus();
Dispatcher.UIThread.RunJobs();

Expand Down
Loading