Adds ShowWorkerConnectionModal hook, DecideShowConnectionPrompt one-shot gate, OpenWorkerConnectionHelp relay command, and a 12 s _connectTimer to IslandsShellViewModel; covered by two new unit tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
23 lines
589 B
C#
23 lines
589 B
C#
using ClaudeDo.Ui.ViewModels;
|
|
using Xunit;
|
|
|
|
namespace ClaudeDo.Ui.Tests;
|
|
|
|
public class ConnectionPromptGateTests
|
|
{
|
|
[Fact]
|
|
public void Shows_once_when_offline()
|
|
{
|
|
var vm = new IslandsShellViewModel();
|
|
Assert.True(vm.DecideShowConnectionPrompt(isOffline: true));
|
|
Assert.False(vm.DecideShowConnectionPrompt(isOffline: true)); // not a second time
|
|
}
|
|
|
|
[Fact]
|
|
public void Does_not_show_when_connected_before_grace()
|
|
{
|
|
var vm = new IslandsShellViewModel();
|
|
Assert.False(vm.DecideShowConnectionPrompt(isOffline: false));
|
|
}
|
|
}
|