Skip to content

Commit 7c18477

Browse files
davidfowlCopilot
andcommitted
Fix DashboardCommandExecutor test registration to scoped
ConsoleLogsTests registered DashboardCommandExecutor as singleton, causing DI validation failure when it injects scoped DashboardDialogService. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 983e23c commit 7c18477

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/Aspire.Dashboard.Components.Tests/Pages/ConsoleLogsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ private void SetupConsoleLogsServices(TestDashboardClient? dashboardClient = nul
853853
Services.AddSingleton<IToastService, ToastService>();
854854
Services.AddSingleton<IconResolver>();
855855
Services.AddSingleton<IDashboardClient>(dashboardClient ?? new TestDashboardClient());
856-
Services.AddSingleton<DashboardCommandExecutor>();
856+
Services.AddScoped<DashboardCommandExecutor>();
857857
Services.AddSingleton<ConsoleLogsManager>();
858858
}
859859
}

0 commit comments

Comments
 (0)