SHA256
Смерджить свежий main в голосовые сообщения
Подтянуты изменения main до d9a91875 (аудит API, учёт публикации блоков,
звонки и настройки). Конфликт только в VERSION.properties: client 1.21.7,
server 1.17.5 — выше main и PR очереди выплат.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import fs from 'node:fs';
|
||||
|
||||
const read = (relative) => fs.readFileSync(new URL(relative, import.meta.url), 'utf8');
|
||||
|
||||
test('входящий звонок использует зелёную и красную кнопки с иконками трубки', () => {
|
||||
const ui = read('../js/services/call-ui-service.js');
|
||||
const css = read('../styles/components/call-ui.css');
|
||||
assert.match(ui, /setButtonIcon\(acceptBtn, 'answer', t\('remaining\.call_ui\.answer'\)\)/);
|
||||
assert.match(ui, /setButtonIcon\(declineBtn, 'hangup', t\('remaining\.call_ui\.decline'\)\)/);
|
||||
assert.match(css, /\.call-call-action-btn--accept\s*\{\s*background: var\(--success\)/);
|
||||
assert.match(css, /\.call-call-action-btn--decline\s*\{\s*background: var\(--danger\)/);
|
||||
});
|
||||
|
||||
test('выключение камеры не передаёт чёрную видеозаглушку собеседнику', () => {
|
||||
const service = read('../js/services/call-service.js');
|
||||
const disabledSlot = service.slice(service.indexOf(' } else {\n if (hadSlotBefore)'), service.indexOf(' await disableCameraTrack(call);'));
|
||||
assert.match(disabledSlot, /videoTransceiver\.sender\.replaceTrack\(null\)/);
|
||||
assert.doesNotMatch(disabledSlot, /ensureBlackVideoTrack\(call\)/);
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import test from 'node:test';
|
||||
|
||||
const auth = readFileSync(new URL('../js/services/auth-service.js', import.meta.url), 'utf8');
|
||||
|
||||
test('resumeSession загружает материал до вычисления targetSessionId и поддерживает выбранную сессию', () => {
|
||||
const method = auth.match(/async resumeSessionUnlocked\(login, preferredSessionId = ''\) \{[\s\S]*?\n \}/)?.[0] || '';
|
||||
assert.ok(method, 'метод resumeSessionUnlocked должен существовать');
|
||||
assert.match(method, /const requestedSessionId = String\(preferredSessionId \|\| ''\)\.trim\(\);/);
|
||||
assert.match(method, /loadSessionMaterial\(cleanLogin, requestedSessionId\)/);
|
||||
assert.match(method, /const targetSessionId = requestedSessionId \|\| sessionMaterial\.sessionId;/);
|
||||
assert.ok(
|
||||
method.indexOf('loadSessionMaterial(cleanLogin, requestedSessionId)')
|
||||
< method.indexOf('const targetSessionId = requestedSessionId || sessionMaterial.sessionId;'),
|
||||
'session material должен загружаться до вычисления targetSessionId',
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user