Forge
csharpdeeb25a2
1using CascadeIDE.Features.Chat;
2using Xunit;
3
4namespace CascadeIDE.Tests;
5
6public sealed class ChatIntercomChromeStatusPresentationTests
7{
8 [Fact]
9 public void FormatSubtitle_DetailMode_IncludesTopicLineAndCount()
10 {
11 var threadId = Guid.Parse("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee");
12 var snapshot = new ChatSurfaceSnapshot(
13 new ChatSurfaceState([], [], [], [], threadId, "Chat"),
14 new ChatSurfaceLayout(
15 [
16 new ChatThreadOverviewItem(threadId, "Основная тема", "summary", true, true, 0, 4),
17 ],
18 [
19 new ChatSurfaceLane(
20 new ChatThreadNode(threadId, "t1", "Основная тема", true, true, null, null, 0, 0),
21 [
22 new ChatSurfaceEntry(
23 ChatSurfaceEntryKind.Message,
24 "m1",
25 "user",
26 "hi",
27 ChatMessageVisualRole.User,
28 0,
29 0),
30 ]),
31 ]),
32 new ChatProductSpine("Продуктовая линия", "focus", [], false));
33
34 var line = ChatIntercomChromeStatusPresentation.FormatSubtitle(snapshot, overviewMode: false, threadId);
35 Assert.NotNull(line);
36 Assert.Contains("тема: Основная тема", line);
37 Assert.Contains("линия: Продуктовая линия", line);
38 Assert.Contains("сообщений: 1", line);
39 }
40}
41
View only · write via MCP/CIDE