test(selftest): pin the top-tab underline invariant

TopTabBar had no observability at all -- no counter, no self-test reaching it.
It now exposes LastRenderedUnderlineCount and MainWindow hands the component
out the same way it already does for the sidebar.

Three cases: one of two tabs active draws exactly one underline, a null active
tab draws zero, and an active tab that is not in the list also draws zero. The
last one matters because the strip skips popped-out tabs, so the active tab
legitimately need not be among the drawn ones.
This commit is contained in:
2026-08-17 23:57:11 +02:00
parent e4659bc597
commit 5696eac55a
3 changed files with 79 additions and 0 deletions
+2
View File
@@ -204,6 +204,8 @@ internal sealed class MainWindow : Window, IFocusableChatWindow
internal Components.MessageList GetMessageListForSelfTest() => _messages;
internal Components.TopTabBar GetTopTabsForSelfTest() => _topTabs;
public override bool DrawConditions() => !_userHidden;
internal void UserHide() => _userHidden = true;