@simai-studio/chat 0.0.0-stage → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +182 -0
- package/README.md +67 -2
- package/dist/package-receipt.json +1553 -0
- package/dist/set.json +107 -0
- package/dist/smart/chat-composer/aliases.json +67 -0
- package/dist/smart/chat-composer/aliases.json.gz +0 -0
- package/dist/smart/chat-composer/component.json +698 -0
- package/dist/smart/chat-composer/component.json.gz +0 -0
- package/dist/smart/chat-composer/css/chat-composer.css +223 -0
- package/dist/smart/chat-composer/css/chat-composer.css.gz +0 -0
- package/dist/smart/chat-composer/css/chat-composer.min.css +2 -0
- package/dist/smart/chat-composer/css/chat-composer.min.css.gz +0 -0
- package/dist/smart/chat-composer/examples.json +550 -0
- package/dist/smart/chat-composer/examples.json.gz +0 -0
- package/dist/smart/chat-composer/js/chat-composer.js +1028 -0
- package/dist/smart/chat-composer/js/chat-composer.js.gz +0 -0
- package/dist/smart/chat-composer/js/chat-composer.min.js +73 -0
- package/dist/smart/chat-composer/js/chat-composer.min.js.gz +0 -0
- package/dist/smart/chat-composer/lang/en.json +28 -0
- package/dist/smart/chat-composer/lang/en.json.gz +0 -0
- package/dist/smart/chat-composer/lang/ru.json +28 -0
- package/dist/smart/chat-composer/lang/ru.json.gz +0 -0
- package/dist/smart/chat-composer/probe.json +416 -0
- package/dist/smart/chat-composer/probe.json.gz +0 -0
- package/dist/smart/chat-composer/smart.manifest.json +651 -0
- package/dist/smart/chat-composer/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-composer/static/default/busy.html +20 -0
- package/dist/smart/chat-composer/static/default/busy.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/disabled.html +20 -0
- package/dist/smart/chat-composer/static/default/disabled.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/files.html +99 -0
- package/dist/smart/chat-composer/static/default/files.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/near-limit.html +20 -0
- package/dist/smart/chat-composer/static/default/near-limit.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/reference.html +20 -0
- package/dist/smart/chat-composer/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-composer/static/sheets.json +110 -0
- package/dist/smart/chat-composer/static/sheets.json.gz +0 -0
- package/dist/smart/chat-composer/studio.fixture.json +18 -0
- package/dist/smart/chat-composer/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-composer/studio.scenario.json +37 -0
- package/dist/smart/chat-composer/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-composer/template/default.css +198 -0
- package/dist/smart/chat-composer/template/default.css.gz +0 -0
- package/dist/smart/chat-composer/template/default.js +109 -0
- package/dist/smart/chat-composer/template/default.js.gz +0 -0
- package/dist/smart/chat-composer/template/parts.js +89 -0
- package/dist/smart/chat-composer/template/parts.js.gz +0 -0
- package/dist/smart/chat-interlocutor/aliases.json +20 -0
- package/dist/smart/chat-interlocutor/aliases.json.gz +0 -0
- package/dist/smart/chat-interlocutor/component.json +436 -0
- package/dist/smart/chat-interlocutor/component.json.gz +0 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.css +72 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.css.gz +0 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.min.css +2 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.min.css.gz +0 -0
- package/dist/smart/chat-interlocutor/examples.json +379 -0
- package/dist/smart/chat-interlocutor/examples.json.gz +0 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.js +531 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.js.gz +0 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.min.js +22 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.min.js.gz +0 -0
- package/dist/smart/chat-interlocutor/lang/en.json +13 -0
- package/dist/smart/chat-interlocutor/lang/en.json.gz +0 -0
- package/dist/smart/chat-interlocutor/lang/ru.json +13 -0
- package/dist/smart/chat-interlocutor/lang/ru.json.gz +0 -0
- package/dist/smart/chat-interlocutor/probe.json +204 -0
- package/dist/smart/chat-interlocutor/probe.json.gz +0 -0
- package/dist/smart/chat-interlocutor/smart.manifest.json +406 -0
- package/dist/smart/chat-interlocutor/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/former.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/former.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/grouped.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/grouped.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/reference.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/single.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/single.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/sheets.json +110 -0
- package/dist/smart/chat-interlocutor/static/sheets.json.gz +0 -0
- package/dist/smart/chat-interlocutor/studio.fixture.json +25 -0
- package/dist/smart/chat-interlocutor/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-interlocutor/studio.scenario.json +41 -0
- package/dist/smart/chat-interlocutor/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-interlocutor/template/default.css +58 -0
- package/dist/smart/chat-interlocutor/template/default.css.gz +0 -0
- package/dist/smart/chat-interlocutor/template/default.js +43 -0
- package/dist/smart/chat-interlocutor/template/default.js.gz +0 -0
- package/dist/smart/chat-message/aliases.json +125 -0
- package/dist/smart/chat-message/aliases.json.gz +0 -0
- package/dist/smart/chat-message/component.json +850 -0
- package/dist/smart/chat-message/component.json.gz +0 -0
- package/dist/smart/chat-message/css/chat-message.css +2260 -0
- package/dist/smart/chat-message/css/chat-message.css.gz +0 -0
- package/dist/smart/chat-message/css/chat-message.min.css +2 -0
- package/dist/smart/chat-message/css/chat-message.min.css.gz +0 -0
- package/dist/smart/chat-message/examples.json +1626 -0
- package/dist/smart/chat-message/examples.json.gz +0 -0
- package/dist/smart/chat-message/js/chat-message.js +5859 -0
- package/dist/smart/chat-message/js/chat-message.js.gz +0 -0
- package/dist/smart/chat-message/js/chat-message.min.js +15 -0
- package/dist/smart/chat-message/js/chat-message.min.js.gz +0 -0
- package/dist/smart/chat-message/lang/en.json +176 -0
- package/dist/smart/chat-message/lang/en.json.gz +0 -0
- package/dist/smart/chat-message/lang/ru.json +180 -0
- package/dist/smart/chat-message/lang/ru.json.gz +0 -0
- package/dist/smart/chat-message/probe.json +1051 -0
- package/dist/smart/chat-message/probe.json.gz +0 -0
- package/dist/smart/chat-message/smart.manifest.json +824 -0
- package/dist/smart/chat-message/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-message/static/default/brief-card.html +2 -0
- package/dist/smart/chat-message/static/default/brief-card.html.gz +0 -0
- package/dist/smart/chat-message/static/default/brief-questions.html +2 -0
- package/dist/smart/chat-message/static/default/brief-questions.html.gz +0 -0
- package/dist/smart/chat-message/static/default/deliverables.html +2 -0
- package/dist/smart/chat-message/static/default/deliverables.html.gz +0 -0
- package/dist/smart/chat-message/static/default/document.html +13 -0
- package/dist/smart/chat-message/static/default/document.html.gz +0 -0
- package/dist/smart/chat-message/static/default/failed.html +2 -0
- package/dist/smart/chat-message/static/default/failed.html.gz +0 -0
- package/dist/smart/chat-message/static/default/feedback-reason.html +2 -0
- package/dist/smart/chat-message/static/default/feedback-reason.html.gz +0 -0
- package/dist/smart/chat-message/static/default/limit.html +2 -0
- package/dist/smart/chat-message/static/default/limit.html.gz +0 -0
- package/dist/smart/chat-message/static/default/proposal.html +40 -0
- package/dist/smart/chat-message/static/default/proposal.html.gz +0 -0
- package/dist/smart/chat-message/static/default/question.html +22 -0
- package/dist/smart/chat-message/static/default/question.html.gz +0 -0
- package/dist/smart/chat-message/static/default/reference.html +2 -0
- package/dist/smart/chat-message/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-message/static/default/steps.html +2 -0
- package/dist/smart/chat-message/static/default/steps.html.gz +0 -0
- package/dist/smart/chat-message/static/default/stopped.html +2 -0
- package/dist/smart/chat-message/static/default/stopped.html.gz +0 -0
- package/dist/smart/chat-message/static/default/waiting.html +2 -0
- package/dist/smart/chat-message/static/default/waiting.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person-own.html +2 -0
- package/dist/smart/chat-message/static/person/person-own.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person-reply.html +2 -0
- package/dist/smart/chat-message/static/person/person-reply.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person.html +12 -0
- package/dist/smart/chat-message/static/person/person.html.gz +0 -0
- package/dist/smart/chat-message/static/sheets.json +452 -0
- package/dist/smart/chat-message/static/sheets.json.gz +0 -0
- package/dist/smart/chat-message/studio.fixture.json +27 -0
- package/dist/smart/chat-message/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-message/studio.scenario.json +22 -0
- package/dist/smart/chat-message/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-message/template/default.css +1805 -0
- package/dist/smart/chat-message/template/default.css.gz +0 -0
- package/dist/smart/chat-message/template/default.js +27 -0
- package/dist/smart/chat-message/template/default.js.gz +0 -0
- package/dist/smart/chat-message/template/person.js +11 -0
- package/dist/smart/chat-message/template/person.js.gz +0 -0
- package/dist/smart/chat-threads/aliases.json +174 -0
- package/dist/smart/chat-threads/aliases.json.gz +0 -0
- package/dist/smart/chat-threads/component.json +1240 -0
- package/dist/smart/chat-threads/component.json.gz +0 -0
- package/dist/smart/chat-threads/css/chat-threads.css +134 -0
- package/dist/smart/chat-threads/css/chat-threads.css.gz +0 -0
- package/dist/smart/chat-threads/css/chat-threads.min.css +2 -0
- package/dist/smart/chat-threads/css/chat-threads.min.css.gz +0 -0
- package/dist/smart/chat-threads/examples.json +689 -0
- package/dist/smart/chat-threads/examples.json.gz +0 -0
- package/dist/smart/chat-threads/js/chat-threads.js +859 -0
- package/dist/smart/chat-threads/js/chat-threads.js.gz +0 -0
- package/dist/smart/chat-threads/js/chat-threads.min.js +39 -0
- package/dist/smart/chat-threads/js/chat-threads.min.js.gz +0 -0
- package/dist/smart/chat-threads/lang/en.json +18 -0
- package/dist/smart/chat-threads/lang/en.json.gz +0 -0
- package/dist/smart/chat-threads/lang/ru.json +18 -0
- package/dist/smart/chat-threads/lang/ru.json.gz +0 -0
- package/dist/smart/chat-threads/probe.json +406 -0
- package/dist/smart/chat-threads/probe.json.gz +0 -0
- package/dist/smart/chat-threads/smart.manifest.json +1159 -0
- package/dist/smart/chat-threads/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-threads/static/default/activity.html +145 -0
- package/dist/smart/chat-threads/static/default/activity.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/activity.skeleton.html +145 -0
- package/dist/smart/chat-threads/static/default/activity.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/archive.html +58 -0
- package/dist/smart/chat-threads/static/default/archive.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/archive.skeleton.html +58 -0
- package/dist/smart/chat-threads/static/default/archive.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/avatars.html +116 -0
- package/dist/smart/chat-threads/static/default/avatars.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/avatars.skeleton.html +116 -0
- package/dist/smart/chat-threads/static/default/avatars.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/empty.html +50 -0
- package/dist/smart/chat-threads/static/default/empty.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/loading.html +50 -0
- package/dist/smart/chat-threads/static/default/loading.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/people.html +104 -0
- package/dist/smart/chat-threads/static/default/people.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/people.skeleton.html +104 -0
- package/dist/smart/chat-threads/static/default/people.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/reference.html +123 -0
- package/dist/smart/chat-threads/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/reference.skeleton.html +123 -0
- package/dist/smart/chat-threads/static/default/reference.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/ungrouped.html +99 -0
- package/dist/smart/chat-threads/static/default/ungrouped.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/ungrouped.skeleton.html +99 -0
- package/dist/smart/chat-threads/static/default/ungrouped.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/sheets.json +503 -0
- package/dist/smart/chat-threads/static/sheets.json.gz +0 -0
- package/dist/smart/chat-threads/studio.fixture.json +23 -0
- package/dist/smart/chat-threads/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-threads/template/default.css +113 -0
- package/dist/smart/chat-threads/template/default.css.gz +0 -0
- package/dist/smart/chat-threads/template/default.js +62 -0
- package/dist/smart/chat-threads/template/default.js.gz +0 -0
- package/dist/smart/chat-window/aliases.json +395 -0
- package/dist/smart/chat-window/aliases.json.gz +0 -0
- package/dist/smart/chat-window/component.json +2819 -0
- package/dist/smart/chat-window/component.json.gz +0 -0
- package/dist/smart/chat-window/css/chat-window.css +1509 -0
- package/dist/smart/chat-window/css/chat-window.css.gz +0 -0
- package/dist/smart/chat-window/css/chat-window.min.css +2 -0
- package/dist/smart/chat-window/css/chat-window.min.css.gz +0 -0
- package/dist/smart/chat-window/examples.json +2798 -0
- package/dist/smart/chat-window/examples.json.gz +0 -0
- package/dist/smart/chat-window/js/chat-window.js +12780 -0
- package/dist/smart/chat-window/js/chat-window.js.gz +0 -0
- package/dist/smart/chat-window/js/chat-window.min.js +1 -0
- package/dist/smart/chat-window/js/chat-window.min.js.gz +0 -0
- package/dist/smart/chat-window/lang/en.json +212 -0
- package/dist/smart/chat-window/lang/en.json.gz +0 -0
- package/dist/smart/chat-window/lang/ru.json +218 -0
- package/dist/smart/chat-window/lang/ru.json.gz +0 -0
- package/dist/smart/chat-window/probe.json +2023 -0
- package/dist/smart/chat-window/probe.json.gz +0 -0
- package/dist/smart/chat-window/smart.manifest.json +2844 -0
- package/dist/smart/chat-window/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-window/static/default/archived.html +100 -0
- package/dist/smart/chat-window/static/default/archived.html.gz +0 -0
- package/dist/smart/chat-window/static/default/embedded.html +125 -0
- package/dist/smart/chat-window/static/default/embedded.html.gz +0 -0
- package/dist/smart/chat-window/static/default/greeting.html +125 -0
- package/dist/smart/chat-window/static/default/greeting.html.gz +0 -0
- package/dist/smart/chat-window/static/default/people.html +104 -0
- package/dist/smart/chat-window/static/default/people.html.gz +0 -0
- package/dist/smart/chat-window/static/default/proposal.html +161 -0
- package/dist/smart/chat-window/static/default/proposal.html.gz +0 -0
- package/dist/smart/chat-window/static/default/reference.html +123 -0
- package/dist/smart/chat-window/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-window/static/default/waiting.html +123 -0
- package/dist/smart/chat-window/static/default/waiting.html.gz +0 -0
- package/dist/smart/chat-window/static/sheets.json +526 -0
- package/dist/smart/chat-window/static/sheets.json.gz +0 -0
- package/dist/smart/chat-window/studio.fixture.json +13 -0
- package/dist/smart/chat-window/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-window/studio.scenario.json +95 -0
- package/dist/smart/chat-window/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-window/template/default.css +1168 -0
- package/dist/smart/chat-window/template/default.css.gz +0 -0
- package/dist/smart/chat-window/template/default.js +12 -0
- package/dist/smart/chat-window/template/default.js.gz +0 -0
- package/dist/smart/rule.js +193 -0
- package/dist/smart/rule.js.gz +0 -0
- package/package.json +29 -4
|
@@ -0,0 +1,689 @@
|
|
|
1
|
+
{
|
|
2
|
+
"examples": [
|
|
3
|
+
{
|
|
4
|
+
"name": "reference",
|
|
5
|
+
"title": "Разговоры по дням",
|
|
6
|
+
"first-paint": {
|
|
7
|
+
"max-bytes": 10240,
|
|
8
|
+
"why": "The resting list of conversations, printed with the host's rows: since 2.0.0 each row is sf-list's row (sf-list-item with its leading and trailing places and the «⋯»), which prints more markup per row than the 1.x link did; it is the resting list, not an open surface."
|
|
9
|
+
},
|
|
10
|
+
"settings": {
|
|
11
|
+
"threads": [
|
|
12
|
+
{
|
|
13
|
+
"id": "t1",
|
|
14
|
+
"title": "Отпуск в ноябре",
|
|
15
|
+
"caption": "Анна: подпишу завтра",
|
|
16
|
+
"updated-at": "2026-10-27T09:00:00Z",
|
|
17
|
+
"unread": 2
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "t2",
|
|
21
|
+
"title": "Отчёт за квартал",
|
|
22
|
+
"caption": "Вы: отправил",
|
|
23
|
+
"updated-at": "2026-10-26T15:00:00Z"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "t3",
|
|
27
|
+
"title": "Новый сотрудник",
|
|
28
|
+
"updated-at": "2026-10-20T10:00:00Z",
|
|
29
|
+
"avatar": {
|
|
30
|
+
"text": "НС"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"selected": "t1"
|
|
35
|
+
},
|
|
36
|
+
"expect": {
|
|
37
|
+
"name": "Разговоры",
|
|
38
|
+
"values": {
|
|
39
|
+
"selected": "t1"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"studio": {
|
|
43
|
+
"summary": "Deterministic reference fixture for sf-thread-list. Threads arrive from the host through setThreads; the fixture shows the frame and its footer.",
|
|
44
|
+
"props": {
|
|
45
|
+
"label": "Беседы",
|
|
46
|
+
"group-by": "day"
|
|
47
|
+
},
|
|
48
|
+
"children": [
|
|
49
|
+
{
|
|
50
|
+
"element": "p",
|
|
51
|
+
"props": {
|
|
52
|
+
"slot": "footer"
|
|
53
|
+
},
|
|
54
|
+
"text": "Беседы хранятся 30 дней",
|
|
55
|
+
"children": []
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "ungrouped",
|
|
62
|
+
"title": "Без групп",
|
|
63
|
+
"first-paint": {
|
|
64
|
+
"max-bytes": 12288,
|
|
65
|
+
"why": "The resting list of conversations, printed with the host's rows: each row is sf-list's row (sf-list-item with its leading and trailing places and the «⋯»); since 2.0.4 the rows are no-wrap, and each row also prints its whole text as its tooltip (title). It is the resting list, not an open surface."
|
|
66
|
+
},
|
|
67
|
+
"settings": {
|
|
68
|
+
"threads": [
|
|
69
|
+
{
|
|
70
|
+
"id": "t1",
|
|
71
|
+
"title": "Отпуск в ноябре",
|
|
72
|
+
"caption": "Анна: подпишу завтра",
|
|
73
|
+
"updated-at": "2026-10-27T09:00:00Z",
|
|
74
|
+
"unread": 2
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"id": "t2",
|
|
78
|
+
"title": "Отчёт за квартал",
|
|
79
|
+
"caption": "Вы: отправил",
|
|
80
|
+
"updated-at": "2026-10-26T15:00:00Z"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "t3",
|
|
84
|
+
"title": "Новый сотрудник",
|
|
85
|
+
"updated-at": "2026-10-20T10:00:00Z",
|
|
86
|
+
"avatar": {
|
|
87
|
+
"text": "НС"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"group-by": "none",
|
|
92
|
+
"label": "Чаты"
|
|
93
|
+
},
|
|
94
|
+
"expect": {
|
|
95
|
+
"name": "Чаты"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "archive",
|
|
100
|
+
"title": "Архив",
|
|
101
|
+
"settings": {
|
|
102
|
+
"threads": [
|
|
103
|
+
{
|
|
104
|
+
"id": "t9",
|
|
105
|
+
"title": "Старый проект",
|
|
106
|
+
"updated-at": "2026-09-01T10:00:00Z",
|
|
107
|
+
"archived": true
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"archived": true
|
|
111
|
+
},
|
|
112
|
+
"expect": {
|
|
113
|
+
"name": "Архив"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "loading",
|
|
118
|
+
"title": "Загрузка",
|
|
119
|
+
"settings": {
|
|
120
|
+
"loading": true
|
|
121
|
+
},
|
|
122
|
+
"expect": {
|
|
123
|
+
"name": "Разговоры"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"name": "empty",
|
|
128
|
+
"title": "Пусто",
|
|
129
|
+
"settings": {
|
|
130
|
+
"threads": []
|
|
131
|
+
},
|
|
132
|
+
"expect": {
|
|
133
|
+
"name": "Разговоры",
|
|
134
|
+
"texts": {
|
|
135
|
+
".sf-list__empty sf-empty-state": "Разговоров пока нет"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "people",
|
|
141
|
+
"title": "Чаты людей без архива",
|
|
142
|
+
"first-paint": {
|
|
143
|
+
"max-bytes": 12288,
|
|
144
|
+
"why": "The resting list of conversations, printed with the host's rows: each row is sf-list's row (sf-list-item with its leading and trailing places and the «⋯»); since 2.0.4 the rows are no-wrap, and each row also prints its whole text as its tooltip (title). It is the resting list, not an open surface."
|
|
145
|
+
},
|
|
146
|
+
"settings": {
|
|
147
|
+
"threads": [
|
|
148
|
+
{
|
|
149
|
+
"id": "t1",
|
|
150
|
+
"title": "Отпуск в ноябре",
|
|
151
|
+
"caption": "Анна: подпишу завтра",
|
|
152
|
+
"updated-at": "2026-10-27T09:00:00Z",
|
|
153
|
+
"unread": 2
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"id": "t2",
|
|
157
|
+
"title": "Отчёт за квартал",
|
|
158
|
+
"caption": "Вы: отправил",
|
|
159
|
+
"updated-at": "2026-10-26T15:00:00Z"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"id": "t3",
|
|
163
|
+
"title": "Новый сотрудник",
|
|
164
|
+
"updated-at": "2026-10-20T10:00:00Z",
|
|
165
|
+
"avatar": {
|
|
166
|
+
"text": "НС"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"no-archive": true,
|
|
171
|
+
"no-create": true,
|
|
172
|
+
"actions": [
|
|
173
|
+
{
|
|
174
|
+
"id": "pin",
|
|
175
|
+
"text": "Закрепить",
|
|
176
|
+
"icon": "push_pin"
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
"expect": {
|
|
181
|
+
"name": "Разговоры"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"name": "activity",
|
|
186
|
+
"title": "Состояние работы в строке",
|
|
187
|
+
"settings": {
|
|
188
|
+
"threads": [
|
|
189
|
+
{
|
|
190
|
+
"id": "a1",
|
|
191
|
+
"title": "Сводка по договорам",
|
|
192
|
+
"caption": "Собираю источники",
|
|
193
|
+
"updated-at": "2026-10-30T09:00:00Z",
|
|
194
|
+
"activity": "running"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"id": "a2",
|
|
198
|
+
"title": "Ответ клиенту",
|
|
199
|
+
"caption": "Какой тон выбрать?",
|
|
200
|
+
"updated-at": "2026-10-30T08:00:00Z",
|
|
201
|
+
"activity": "waiting"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"id": "a3",
|
|
205
|
+
"title": "Отчёт за квартал",
|
|
206
|
+
"caption": "Файл готов",
|
|
207
|
+
"updated-at": "2026-10-29T15:00:00Z",
|
|
208
|
+
"activity": "done"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"id": "a4",
|
|
212
|
+
"title": "Импорт контактов",
|
|
213
|
+
"caption": "Файл не прочитан",
|
|
214
|
+
"updated-at": "2026-10-29T12:00:00Z",
|
|
215
|
+
"activity": "failed"
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
"group-by": "none",
|
|
219
|
+
"label": "Разговоры"
|
|
220
|
+
},
|
|
221
|
+
"expect": {
|
|
222
|
+
"name": "Разговоры"
|
|
223
|
+
},
|
|
224
|
+
"first-paint": {
|
|
225
|
+
"max-bytes": 14000,
|
|
226
|
+
"why": "Four conversations, each with a compact sf-badge in its row; the running one prints its spinner's SVG, about 4.7 KB."
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"name": "avatars",
|
|
231
|
+
"title": "Аватары: человек, группа и канал",
|
|
232
|
+
"first-paint": {
|
|
233
|
+
"max-bytes": 12288,
|
|
234
|
+
"why": "The resting list of conversations, printed with the host's rows: each row is sf-list's row (sf-list-item with its leading and trailing places and the «⋯»); since 2.0.4 the rows are no-wrap, and each row also prints its whole text as its tooltip (title). It is the resting list, not an open surface."
|
|
235
|
+
},
|
|
236
|
+
"settings": {
|
|
237
|
+
"threads": [
|
|
238
|
+
{
|
|
239
|
+
"id": "t1",
|
|
240
|
+
"title": "Анна Смирнова",
|
|
241
|
+
"updated-at": "2026-10-27T09:00:00Z",
|
|
242
|
+
"avatar": {
|
|
243
|
+
"text": "АС"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"id": "t2",
|
|
248
|
+
"title": "Планёрка отдела",
|
|
249
|
+
"updated-at": "2026-10-26T15:00:00Z",
|
|
250
|
+
"avatar": {
|
|
251
|
+
"text": "ПО",
|
|
252
|
+
"shape": "square"
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"id": "t3",
|
|
257
|
+
"title": "Новости компании",
|
|
258
|
+
"updated-at": "2026-10-20T10:00:00Z",
|
|
259
|
+
"avatar": {
|
|
260
|
+
"icon": "campaign",
|
|
261
|
+
"shape": "square"
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"id": "t4",
|
|
266
|
+
"title": "Сборщик отчётов",
|
|
267
|
+
"updated-at": "2026-10-19T10:00:00Z",
|
|
268
|
+
"avatar": {
|
|
269
|
+
"icon": "bolt"
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
],
|
|
273
|
+
"no-archive": true,
|
|
274
|
+
"no-create": true
|
|
275
|
+
},
|
|
276
|
+
"expect": {
|
|
277
|
+
"name": "Разговоры"
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
],
|
|
281
|
+
"pages": [
|
|
282
|
+
{
|
|
283
|
+
"name": "conformance",
|
|
284
|
+
"title": "sf-thread-list against component.json (standard simai.smart-component 1.3.8 §12, gate 20)",
|
|
285
|
+
"format": "stands/15-scenarios (A4 modal: a page, probes in steps); the runner is ui-source tests/browser/manifest-probes.browser.mjs, run for the package by scripts/run-manifest-probes.mjs",
|
|
286
|
+
"page": {
|
|
287
|
+
"lang": "ru",
|
|
288
|
+
"body": [
|
|
289
|
+
"<main style=\"display: flex; gap: 16px\">",
|
|
290
|
+
" <div style=\"inline-size: 320px; block-size: 420px\"><sf-chat-threads id=\"list\" group-by=\"none\" selected=\"t1\"></sf-chat-threads></div>",
|
|
291
|
+
" <div style=\"inline-size: 320px; block-size: 420px\"><sf-chat-threads id=\"archive\" archived group-by=\"none\"></sf-chat-threads></div>",
|
|
292
|
+
"</main>",
|
|
293
|
+
"<script>customElements.whenDefined('sf-chat-threads').then(() => {const list = document.querySelector('#list'); list.threads = [{\"id\": \"t1\", \"title\": \"Отпуск в ноябре\", \"caption\": \"Анна: подпишу завтра\", \"updated-at\": \"2026-10-27T09:00:00Z\", \"unread\": 2}, {\"id\": \"t2\", \"title\": \"Отчёт за квартал\", \"caption\": \"Вы: отправил\", \"updated-at\": \"2026-10-26T15:00:00Z\"}, {\"id\": \"t3\", \"title\": \"Новый сотрудник\", \"updated-at\": \"2026-10-20T10:00:00Z\", \"avatar\": {\"text\": \"НС\"}}]; list.actions = [{id: 'pin', text: 'Закрепить'}];const archive = document.querySelector('#archive'); archive.threads = [{\"id\": \"t9\", \"title\": \"Старый проект\", \"updated-at\": \"2026-09-01T10:00:00Z\", \"archived\": true}];});</script>"
|
|
294
|
+
]
|
|
295
|
+
},
|
|
296
|
+
"checks": [
|
|
297
|
+
{
|
|
298
|
+
"id": "p1-arrows-enter-open",
|
|
299
|
+
"title": "one Tab stop for the list; ArrowDown and End move between rows; Enter asks open {id}: sf-thread-list-open once and sf-thread-list-select once, noted with its dates",
|
|
300
|
+
"covers": "keyboard.row ArrowDown focus:next, End focus:last, Enter open, events.open, aliases sf-thread-list-select, accessibility.name runtime.label",
|
|
301
|
+
"steps": [
|
|
302
|
+
{
|
|
303
|
+
"script": "(document.querySelector('#list .sf-list__row[data-id=\"t1\"] .sf-list-item[data-sf-list-roving]').focus(), true)",
|
|
304
|
+
"wait": 60,
|
|
305
|
+
"check": "document.querySelectorAll('#list .sf-list-item[data-sf-list-roving][tabindex=\"0\"]').length === 1 && document.querySelector('#list nav').getAttribute('aria-label') === 'Разговоры'"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"user": "keyboard:ArrowDown",
|
|
309
|
+
"wait": 60,
|
|
310
|
+
"check": "document.activeElement === document.querySelector('#list .sf-list__row[data-id=\"t2\"] .sf-list-item[data-sf-list-roving]')"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"user": "keyboard:End",
|
|
314
|
+
"wait": 60,
|
|
315
|
+
"check": "document.activeElement === document.querySelector('#list .sf-list__row[data-id=\"t3\"] .sf-list-item[data-sf-list-roving]')"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"user": "keyboard:Enter",
|
|
319
|
+
"expect": {
|
|
320
|
+
"events": [
|
|
321
|
+
{
|
|
322
|
+
"name": "sf-chat-threads-open",
|
|
323
|
+
"count": 1,
|
|
324
|
+
"detail": {
|
|
325
|
+
"id": "t3"
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"name": "sf-thread-list-select",
|
|
330
|
+
"count": 1,
|
|
331
|
+
"detail": {
|
|
332
|
+
"id": "t3"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
],
|
|
336
|
+
"journal": [
|
|
337
|
+
{
|
|
338
|
+
"from": "sf-thread-list-select",
|
|
339
|
+
"to": "sf-thread-list-open",
|
|
340
|
+
"since": "2026-10-27",
|
|
341
|
+
"remove_after": "2026-12-01"
|
|
342
|
+
}
|
|
343
|
+
]
|
|
344
|
+
},
|
|
345
|
+
"check": "document.querySelector('#list').selected === 't1'"
|
|
346
|
+
}
|
|
347
|
+
]
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"id": "p2-f2-rename",
|
|
351
|
+
"title": "F2 opens the rename field; Escape reverts without an event; F2 again and Enter keep the new title: sf-thread-list-rename {id, title} once",
|
|
352
|
+
"covers": "keyboard.row F2 rename, accessibility.keys Escape revert, Enter commit, events.rename",
|
|
353
|
+
"steps": [
|
|
354
|
+
{
|
|
355
|
+
"script": "(document.querySelector('#list .sf-list__row[data-id=\"t2\"] .sf-list-item[data-sf-list-roving]').focus(), true)",
|
|
356
|
+
"wait": 60
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"user": "keyboard:F2",
|
|
360
|
+
"wait": 120,
|
|
361
|
+
"check": "document.activeElement === document.querySelector('#list .sf-list__rename')"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"user": "keyboard:Escape",
|
|
365
|
+
"expect": {
|
|
366
|
+
"events": [
|
|
367
|
+
{
|
|
368
|
+
"name": "sf-chat-threads-rename",
|
|
369
|
+
"count": 0
|
|
370
|
+
}
|
|
371
|
+
]
|
|
372
|
+
},
|
|
373
|
+
"check": "!document.querySelector('#list .sf-list__rename') && document.activeElement === document.querySelector('#list .sf-list__row[data-id=\"t2\"] .sf-list-item[data-sf-list-roving]')"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"user": "keyboard:F2",
|
|
377
|
+
"wait": 120
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"script": "(document.querySelector('#list .sf-list__rename').value = 'Отчёт за третий квартал', true)",
|
|
381
|
+
"wait": 30
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"user": "keyboard:Enter",
|
|
385
|
+
"expect": {
|
|
386
|
+
"events": [
|
|
387
|
+
{
|
|
388
|
+
"name": "sf-chat-threads-rename",
|
|
389
|
+
"count": 1,
|
|
390
|
+
"detail": {
|
|
391
|
+
"id": "t2",
|
|
392
|
+
"title": "Отчёт за третий квартал"
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
]
|
|
396
|
+
},
|
|
397
|
+
"check": "document.querySelector('#list .sf-list__row[data-id=\"t2\"] sf-list-item').getAttribute('text') === 'Отчёт за третий квартал'"
|
|
398
|
+
}
|
|
399
|
+
]
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"id": "p3-menu-archive-apply",
|
|
403
|
+
"title": "Shift+F10 opens the row's actions; Archive sends archive {ids, id}; the host's own action sends apply {action, scope: entry, ids} and the old -action once, noted",
|
|
404
|
+
"covers": "keyboard.row Shift+F10 open-menu, events.archive, events.apply, aliases sf-thread-list-action",
|
|
405
|
+
"steps": [
|
|
406
|
+
{
|
|
407
|
+
"script": "(document.querySelector('#list .sf-list__row[data-id=\"t1\"] .sf-list-item[data-sf-list-roving]').focus(), true)",
|
|
408
|
+
"wait": 60
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"user": "keyboard:Shift+F10",
|
|
412
|
+
"wait": 300,
|
|
413
|
+
"check": "document.querySelector('#list sf-list').menu.entries.map((one) => one.id).join() === 'rename,action:archive,action:host:pin'"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"script": "(document.querySelector('#list sf-list').onMenu({id: 'action:archive'}), true)",
|
|
417
|
+
"expect": {
|
|
418
|
+
"events": [
|
|
419
|
+
{
|
|
420
|
+
"name": "sf-chat-threads-archive",
|
|
421
|
+
"count": 1,
|
|
422
|
+
"detail": {
|
|
423
|
+
"ids": [
|
|
424
|
+
"t1"
|
|
425
|
+
],
|
|
426
|
+
"id": "t1"
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
]
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"script": "(document.querySelector('#list sf-list').onMenu({id: 'action:host:pin'}), true)",
|
|
434
|
+
"expect": {
|
|
435
|
+
"events": [
|
|
436
|
+
{
|
|
437
|
+
"name": "sf-chat-threads-apply",
|
|
438
|
+
"count": 1,
|
|
439
|
+
"detail": {
|
|
440
|
+
"action": "pin",
|
|
441
|
+
"scope": "entry",
|
|
442
|
+
"ids": [
|
|
443
|
+
"t1"
|
|
444
|
+
]
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"name": "sf-thread-list-action",
|
|
449
|
+
"count": 1,
|
|
450
|
+
"detail": {
|
|
451
|
+
"id": "t1",
|
|
452
|
+
"action": "pin"
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
],
|
|
456
|
+
"journal": [
|
|
457
|
+
{
|
|
458
|
+
"from": "sf-thread-list-action",
|
|
459
|
+
"to": "sf-thread-list-apply"
|
|
460
|
+
}
|
|
461
|
+
]
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
]
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"id": "p4-restore",
|
|
468
|
+
"title": "in the archive the row's action is Restore: restore {ids, id} and the old -unarchive once, noted",
|
|
469
|
+
"covers": "events.restore, aliases sf-thread-list-unarchive",
|
|
470
|
+
"steps": [
|
|
471
|
+
{
|
|
472
|
+
"action": {
|
|
473
|
+
"name": "open-menu",
|
|
474
|
+
"with": {
|
|
475
|
+
"id": "t9"
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
"target": "#archive",
|
|
479
|
+
"wait": 300,
|
|
480
|
+
"expect": {
|
|
481
|
+
"returns": {
|
|
482
|
+
"outcome": "applied"
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
"check": "document.querySelector('#archive sf-list').menu.entries.map((one) => one.id).join() === 'rename,action:restore'"
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"script": "(document.querySelector('#archive sf-list').onMenu({id: 'action:restore'}), true)",
|
|
489
|
+
"expect": {
|
|
490
|
+
"events": [
|
|
491
|
+
{
|
|
492
|
+
"name": "sf-chat-threads-restore",
|
|
493
|
+
"count": 1,
|
|
494
|
+
"detail": {
|
|
495
|
+
"ids": [
|
|
496
|
+
"t9"
|
|
497
|
+
],
|
|
498
|
+
"id": "t9"
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"name": "sf-thread-list-unarchive",
|
|
503
|
+
"count": 1,
|
|
504
|
+
"detail": {
|
|
505
|
+
"id": "t9"
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
],
|
|
509
|
+
"journal": [
|
|
510
|
+
{
|
|
511
|
+
"from": "sf-thread-list-unarchive",
|
|
512
|
+
"to": "sf-thread-list-restore"
|
|
513
|
+
}
|
|
514
|
+
]
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
]
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"id": "p5-archive-view",
|
|
521
|
+
"title": "the way to the archive sends toggle {archived: true} and the old -view once, noted; the way back toggle {archived: false}",
|
|
522
|
+
"covers": "events.toggle, aliases sf-thread-list-view",
|
|
523
|
+
"steps": [
|
|
524
|
+
{
|
|
525
|
+
"user": "click:#list [data-action=\"archive-view\"]",
|
|
526
|
+
"expect": {
|
|
527
|
+
"events": [
|
|
528
|
+
{
|
|
529
|
+
"name": "sf-chat-threads-toggle",
|
|
530
|
+
"count": 1,
|
|
531
|
+
"detail": {
|
|
532
|
+
"archived": true
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"name": "sf-thread-list-view",
|
|
537
|
+
"count": 1,
|
|
538
|
+
"detail": {
|
|
539
|
+
"archived": true
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
],
|
|
543
|
+
"journal": [
|
|
544
|
+
{
|
|
545
|
+
"from": "sf-thread-list-view",
|
|
546
|
+
"to": "sf-thread-list-toggle"
|
|
547
|
+
}
|
|
548
|
+
]
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
"user": "click:#archive [data-action=\"back\"]",
|
|
553
|
+
"expect": {
|
|
554
|
+
"events": [
|
|
555
|
+
{
|
|
556
|
+
"name": "sf-chat-threads-toggle",
|
|
557
|
+
"count": 1,
|
|
558
|
+
"detail": {
|
|
559
|
+
"archived": false
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
]
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
]
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"id": "p6-settings-and-outcomes",
|
|
569
|
+
"title": "loading and status are settings; setLoading, the 1.0 setter, still works and is noted; actions answer outcomes; has-more asks load-more {direction: after} once",
|
|
570
|
+
"covers": "settings.loading, settings.status, actions rename/remove-thread outcomes, events.load-more",
|
|
571
|
+
"steps": [
|
|
572
|
+
{
|
|
573
|
+
"script": "document.querySelector('#list').setLoading(true)",
|
|
574
|
+
"expect": {
|
|
575
|
+
"returns": {
|
|
576
|
+
"outcome": "applied"
|
|
577
|
+
},
|
|
578
|
+
"journal": [
|
|
579
|
+
{
|
|
580
|
+
"from": "setLoading",
|
|
581
|
+
"kind": "action",
|
|
582
|
+
"since": "2026-10-27",
|
|
583
|
+
"remove_after": "2026-12-01"
|
|
584
|
+
}
|
|
585
|
+
]
|
|
586
|
+
},
|
|
587
|
+
"check": "document.querySelector('#list').hasAttribute('loading') && document.querySelector('#list sf-list').hasAttribute('loading')"
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
"script": "(document.querySelector('#list').loading = false, document.querySelector('#list').status = 'Не удалось загрузить', true)",
|
|
591
|
+
"wait": 200,
|
|
592
|
+
"check": "document.querySelector('#list .sf-thread-list__status').textContent === 'Не удалось загрузить'"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"action": {
|
|
596
|
+
"name": "rename",
|
|
597
|
+
"with": {
|
|
598
|
+
"id": "nope"
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
"target": "#list",
|
|
602
|
+
"expect": {
|
|
603
|
+
"returns": {
|
|
604
|
+
"outcome": "refused",
|
|
605
|
+
"reason": "unknown"
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"action": {
|
|
611
|
+
"name": "remove-thread",
|
|
612
|
+
"with": {
|
|
613
|
+
"id": "t3"
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
"target": "#list",
|
|
617
|
+
"expect": {
|
|
618
|
+
"returns": {
|
|
619
|
+
"outcome": "applied"
|
|
620
|
+
}
|
|
621
|
+
},
|
|
622
|
+
"check": "!document.querySelector('#list .sf-list__row[data-id=\"t3\"]')"
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
"script": "(document.querySelector('#list').hasMore = true, await new Promise((done) => setTimeout(done, 300)), [...document.querySelectorAll('#list sf-list button')].find((button) => /Показать ещё/u.test(button.textContent)).click(), true)",
|
|
626
|
+
"wait": 500,
|
|
627
|
+
"expect": {
|
|
628
|
+
"events": [
|
|
629
|
+
{
|
|
630
|
+
"name": "sf-chat-threads-load-more",
|
|
631
|
+
"count": 1,
|
|
632
|
+
"detail": {
|
|
633
|
+
"direction": "after"
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
]
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
]
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
"id": "p-create-commands",
|
|
643
|
+
"title": "create-commands stand in for New conversation; a press says create {kind: id}, the one button says create {}; no-create and the archive take them away",
|
|
644
|
+
"covers": "settings.create-commands, events.create",
|
|
645
|
+
"steps": [
|
|
646
|
+
{
|
|
647
|
+
"check": "document.querySelectorAll('#list .sf-thread-list__head .sf-thread-list__command:not([hidden])').length === 1 && document.querySelector('#list .sf-thread-list__command[data-action=\"create\"]')"
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"user": "click:#list .sf-thread-list__command[data-action=\"create\"]",
|
|
651
|
+
"wait": 100,
|
|
652
|
+
"event": "sf-chat-threads-create"
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
"script": "(document.querySelector('#list').createCommands = [{id: 'private', text: 'Новый диалог', icon: 'person_add'}, {id: 'group', text: 'Новая группа', icon: 'group_add'}], document.querySelector('#archive').createCommands = [{id: 'group', text: 'Новая группа'}], true)",
|
|
656
|
+
"wait": 200,
|
|
657
|
+
"check": "[...document.querySelectorAll('#list .sf-thread-list__head .sf-thread-list__command:not([hidden])')].map((one) => one.querySelector(':scope > span').textContent.trim()).join() === 'Новый диалог,Новая группа' && !document.querySelector('#archive .sf-thread-list__command[data-action=\"create:group\"]:not([hidden])')"
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
"user": "click:#list .sf-thread-list__command[data-action=\"create:group\"]",
|
|
661
|
+
"wait": 100,
|
|
662
|
+
"event": "sf-chat-threads-create",
|
|
663
|
+
"detail": {
|
|
664
|
+
"kind": "group"
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
"script": "(document.querySelector('#list').toggleAttribute('no-create', true), true)",
|
|
669
|
+
"wait": 200,
|
|
670
|
+
"check": "document.querySelector('#list .sf-thread-list__head').hidden"
|
|
671
|
+
}
|
|
672
|
+
]
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
"id": "p-avatar-shape-icon",
|
|
676
|
+
"title": "1.6.0, 2.0.0: avatar.shape and avatar.icon reach sf-list's row; a row without an avatar draws none (sf-list aligns the titles of a list that has some)",
|
|
677
|
+
"covers": "settings.threads, compatibility.1.6.0",
|
|
678
|
+
"steps": [
|
|
679
|
+
{
|
|
680
|
+
"script": "(document.querySelector('#list').threads = [{id: 'a', title: 'Анна', 'updated-at': '2026-10-27T09:00:00Z', avatar: {text: 'АН'}}, {id: 'g', title: 'Группа', 'updated-at': '2026-10-26T09:00:00Z', avatar: {text: 'ГР', shape: 'square'}}, {id: 'c', title: 'Канал', 'updated-at': '2026-10-25T09:00:00Z', avatar: {icon: 'campaign', shape: 'square'}}, {id: 'b', title: 'Бот', 'updated-at': '2026-10-24T09:00:00Z', avatar: {icon: 'bolt'}}, {id: 'n', title: 'ИИ-разговор', 'updated-at': '2026-10-23T09:00:00Z'}], true)",
|
|
681
|
+
"wait": 300,
|
|
682
|
+
"check": "(() => { const row = (id) => document.querySelector('#list .sf-list__row[data-id=\"' + id + '\"]'); const sign = (id) => row(id).querySelector('.sf-list__sign sf-icon'); const left = (id) => row(id).querySelector('.sf-list-item__text, [class*=\"__headline\"], sf-list-item').getBoundingClientRect().left; const picture = (id) => row(id).querySelector('.sf-avatar:not(.sf-list__sign)'); return picture('g').classList.contains('sf-avatar--square') && Boolean(picture('a')) && !picture('a').classList.contains('sf-avatar--square') && sign('c')?.getAttribute('icon') === 'campaign' && row('c').querySelector('.sf-list__sign').classList.contains('sf-avatar--square') && sign('b')?.getAttribute('icon') === 'bolt' && !row('b').querySelector('.sf-list__sign').classList.contains('sf-avatar--square') && !row('n').querySelector('.sf-avatar'); })()"
|
|
683
|
+
}
|
|
684
|
+
]
|
|
685
|
+
}
|
|
686
|
+
]
|
|
687
|
+
}
|
|
688
|
+
]
|
|
689
|
+
}
|