SHA256
Слить ветку docs/api-contract-audit (Айдар) в ui/dm-voice
Подтянуты 10 коммитов Айдара от 29–30.11: сверка контрактов API с обработчиками, проверка звука в браузере, подпись сигналов звонка, ширина чата, меню настроек, скрытие тестовых версий связей. Автоматически слиты app.js, словари ru/en и chat.css; конфликт только в VERSION.properties — у Айдара продолжается откатившаяся линия (1.20.82 / 1.16.51), взяты значения выше обеих сторон: client 1.21.4, server 1.17.2 (ветка меняет и UI, и сервер). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,11 +30,11 @@ test('V4: края рёбер касаются сферы, маленькая с
|
||||
const parent = { id: 'a', x: 0, y: 0, visualSmall: false };
|
||||
const child = { id: 'b', x: 100, y: 0, visualSmall: true };
|
||||
const g = geometryFor(parent, child, 1, origin, origin);
|
||||
assert.equal(g.x1, 29);
|
||||
assert.equal(g.x2, 100 - 14.5);
|
||||
assert.equal(g.x1, 21.75);
|
||||
assert.equal(g.x2, 100 - 10.875);
|
||||
const doubled = geometryFor(parent, child, 2, origin, origin);
|
||||
assert.equal(doubled.x1, 58);
|
||||
assert.equal(doubled.x2, 200 - 29);
|
||||
assert.equal(doubled.x1, 43.5);
|
||||
assert.equal(doubled.x2, 200 - 21.75);
|
||||
});
|
||||
|
||||
test('V4: данные V3 с обратным отношением поступают в визуальную модель без потерь', () => {
|
||||
@@ -98,7 +98,7 @@ test('V4: подписи используют плашки V2, а не конт
|
||||
assert.doesNotMatch(js, /ctx\.strokeText\(/);
|
||||
});
|
||||
|
||||
test('V3/V4: вход через нижнюю кнопку очищает исследование; переключатель версий не очищает', () => {
|
||||
test('V3/V4: вход через нижнюю кнопку очищает исследование, но сохраняет личную раскладку; переключатель версий не очищает', () => {
|
||||
const toolbar = readFileSync(new URL('../js/components/toolbar.js', import.meta.url), 'utf8');
|
||||
const switcher = readFileSync(new URL('../js/pages/network-version-switcher.js', import.meta.url), 'utf8');
|
||||
const view = readFileSync(new URL('../js/pages/network-explorer/network-view.js', import.meta.url), 'utf8');
|
||||
@@ -106,17 +106,41 @@ test('V3/V4: вход через нижнюю кнопку очищает исс
|
||||
assert.match(switcher, /addEventListener\('shine:network-tab-enter', explorerNetworkView\.resetExplorerOnTabEntry\)/);
|
||||
assert.match(view, /export function resetExplorerOnTabEntry\(\)/);
|
||||
assert.match(view, /retained = null;/);
|
||||
assert.match(view, /PERSONAL_LAYOUT_PREFIX = 'shine-network-explorer-layout-v1:'/);
|
||||
assert.match(view, /positions: readPersonalLayout\(state\.session\.login\)/);
|
||||
assert.match(view, /function persistPersonalLayout\(\)/);
|
||||
assert.match(view, /writePersonalLayout\(state\.session\.login, session\.positions\)/);
|
||||
assert.match(view, /resetBarrier = resetBarrier\.catch\(\(\) => \{\}\)\.then\(\(\) => clearExplorerGraphCache\(\)\)/);
|
||||
assert.match(view, /void resetBarrier\.then\(async \(\) =>/);
|
||||
assert.doesNotMatch(switcher, /select\.addEventListener\('change',[\s\S]*resetExplorerOnTabEntry/);
|
||||
});
|
||||
|
||||
test('V4: основные аватары компактнее на 25%, а размещение новых крупных узлов разрежено на 30%', () => {
|
||||
const style = readFileSync(new URL('../js/pages/network-canvas-v4/graph-style.js', import.meta.url), 'utf8');
|
||||
const view = readFileSync(new URL('../js/pages/network-explorer/network-view.js', import.meta.url), 'utf8');
|
||||
assert.match(style, /export const ORB_DIAMETER = 43\.5;/);
|
||||
assert.match(view, /const spacing = 109\.2;/);
|
||||
assert.match(view, /const minNodeGap = 85\.8;/);
|
||||
});
|
||||
|
||||
test('V4 Canvas открывается по умолчанию, но ранее выбранная версия сохраняется', () => {
|
||||
const switcher = readFileSync(new URL('../js/pages/network-version-switcher.js', import.meta.url), 'utf8');
|
||||
assert.match(switcher, /const DEFAULT_MODE = 'explorer-canvas';/);
|
||||
assert.match(switcher, /if \(!isDeveloperToolsEnabled\(\)\) return DEFAULT_MODE;/);
|
||||
assert.match(switcher, /if \(isDeveloperToolsEnabled\(\)\) attachSwitcher\(\);/);
|
||||
assert.match(switcher, /MODES\.has\(saved\) \? saved : DEFAULT_MODE/);
|
||||
});
|
||||
|
||||
test('Настройка тестовых функций находится у разработчика и по умолчанию выключена', () => {
|
||||
const developer = readFileSync(new URL('../js/pages/developer-settings-view.js', import.meta.url), 'utf8');
|
||||
const advanced = readFileSync(new URL('../js/pages/advanced-settings-view.js', import.meta.url), 'utf8');
|
||||
assert.match(developer, /isDeveloperToolsEnabled\(\)/);
|
||||
assert.match(developer, /setDeveloperToolsEnabled\(input\.checked\)/);
|
||||
assert.match(developer, /developer-show-test-functions/);
|
||||
assert.match(developer, /text_024/);
|
||||
assert.doesNotMatch(advanced, /advanced-developer-tools/);
|
||||
});
|
||||
|
||||
test('V3/V4: defaults, dynamic menu, active-only chips and self-centering contract', () => {
|
||||
const view = readFileSync(new URL('../js/pages/network-explorer/network-view.js', import.meta.url), 'utf8');
|
||||
const dropdown = readFileSync(new URL('../js/components/dropdown-menu.js', import.meta.url), 'utf8');
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFileSync } from 'node:fs';
|
||||
|
||||
const auth = readFileSync(new URL('../js/services/auth-service.js', import.meta.url), 'utf8');
|
||||
const vault = readFileSync(new URL('../js/services/key-vault.js', import.meta.url), 'utf8');
|
||||
const handler = readFileSync(new URL('../../SHiNE-server/shine-server-net-protocol/src/main/java/server/logic/ws_protocol/JSON/messages/Net_SendSignal_Handler.java', import.meta.url), 'utf8');
|
||||
|
||||
test('SendSignal берёт ключ только с текущим sessionId и подписывает канонический login адресата', () => {
|
||||
assert.match(auth, /loadSessionMaterial\(cleanLogin, cleanSessionId\)/);
|
||||
assert.match(auth, /resolveCanonicalDisplayLogin\(requestedToLogin\)/);
|
||||
assert.match(auth, /ключ активной сессии не найден/);
|
||||
});
|
||||
|
||||
test('key vault хранит независимый материал для каждой сессии одного login', () => {
|
||||
assert.match(vault, /session-keys-by-id/);
|
||||
assert.match(vault, /normalizeSessionStorageKey\(login, sessionId\)/);
|
||||
assert.match(vault, /loadSessionMaterial\(login, sessionId = ''\)/);
|
||||
assert.match(vault, /String\(legacyRow\?\.sessionId \|\| ''\)\.trim\(\) === cleanSessionId/);
|
||||
});
|
||||
|
||||
test('для call_invite без онлайн-сессии сервер возвращает NO_TARGET_SESSIONS', () => {
|
||||
assert.match(handler, /if \(targets\.isEmpty\(\)\) \{/);
|
||||
assert.doesNotMatch(handler, /sendIncomingCallPushToOfflineSessions/);
|
||||
});
|
||||
Reference in New Issue
Block a user