Files
ClaudeDo/tests/ClaudeDo.Ui.Tests/MainWindowCloseConfirmDecisionTests.cs
T
mika kuns 0892883a82 feat(ui): confirm main-window close when Mission Control sessions are open
Closing the main window used to silently kill every open Mission Control
ConPTY session (App's ShutdownMode.OnMainWindowClose tears the process down
without warning). Intercept Window.Closing, and when at least one pane is
open, ask via the existing ConfirmAsync pattern before proceeding; cancelling
leaves the window and sessions alive, confirming force-closes as before.
2026-08-21 18:14:48 +02:00

26 lines
628 B
C#

using ClaudeDo.Ui.ViewModels;
using Xunit;
namespace ClaudeDo.Ui.Tests;
public class MainWindowCloseConfirmDecisionTests
{
[Fact]
public void True_when_at_least_one_mission_control_session_is_open()
{
Assert.True(IslandsShellViewModel.RequiresCloseConfirmation(1));
}
[Fact]
public void True_when_multiple_mission_control_sessions_are_open()
{
Assert.True(IslandsShellViewModel.RequiresCloseConfirmation(3));
}
[Fact]
public void False_when_no_mission_control_sessions_are_open()
{
Assert.False(IslandsShellViewModel.RequiresCloseConfirmation(0));
}
}