Desktop: stop the status bar's session timer when the shell ends

This commit is contained in:
jaap-jan committed 2026-10-02 13:54:24 +02:00
1 parent 619f49a35a
commit 22b4d82ba8
3 files changed
+29 -3

No files matched your search

@@ -2075,6 +2075,15 @@ public sealed partial class ShellFlowTests : IAsyncLifetime
// Still worth offering, because the tab and the machine are both still there — what it is not is an
// alarm.
shell.CanReconnectSelectedTab.ShouldBeTrue();
// And the timer stopped with it: how long that shell ran, rather than how long ago it started. The
// shell's clock here is the system's, so the second has to actually pass for the two to differ.
await Task.Delay(TimeSpan.FromSeconds(1.2), Token);
var ran = tab.EndedAt.ShouldNotBeNull() - tab.StartedAt.ShouldNotBeNull();
shell.SessionElapsedText.ShouldBe(string.Create(
CultureInfo.InvariantCulture, $"session {(int)ran.TotalHours:00}:{ran.Minutes:00}:{ran.Seconds:00}"));
}
/// <remarks>