feat: checkpoint account-free client workflows and source-matched UI
Preserve accumulated client implementation since v0.1.4, including local identities, multi-server state, chat, administration, audio and streaming controls. Refine official-source layout, original artwork, responsive composer overflow, settings navigation and chat scroll anchoring. Current verification: Node suite passes; isolated packaged chat and responsive control smokes pass without device capture. Native core is reused, not rebuilt in this pass. Strict whole-screen visual parity remains incomplete; no 1:1 or cross-platform acceptance claim. Local checkpoint only; no release or push.
This commit is contained in:
1 parent
0486ad361f
commit
e6464bc4ed
553 files changed
+92973
-3078
No files matched your search
@@ -0,0 +1,69 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { mkdtempSync, mkdirSync, writeFileSync, rmSync } from 'node:fs';
|
||||
import { tmpdir } from 'node:os';
|
||||
import path from 'node:path';
|
||||
import { launchApp } from './lib/electron-app.mjs';
|
||||
const args = process.argv.slice(2);
|
||||
const option = key => args.includes(`--${key}`) ? args[args.indexOf(`--${key}`) + 1] : undefined;
|
||||
const out = path.resolve(option('out') ?? 'smoke-out/whisper-offscreen');
|
||||
const profile = mkdtempSync(path.join(tmpdir(), 'teamspeach-whisper-qa-'));
|
||||
mkdirSync(out, { recursive: true });
|
||||
const result = { scope: 'Real isolated local whisper/keybind persistence + native disconnected rejection; no global hooks, server, capture, or audible output', checks: [], errors: [] };
|
||||
let app;
|
||||
try {
|
||||
app = await launchApp({ profile, exe: option('exe') });
|
||||
let page = await app.firstWindow();
|
||||
page.on('pageerror', e => result.errors.push(e.message));
|
||||
await page.waitForSelector('#view-onboarding', { state: 'visible' });
|
||||
await page.fill('#onboarding-nick', 'Whisper QA'); await page.click('#onboarding-submit');
|
||||
await page.waitForSelector('#view-app', { state: 'visible' });
|
||||
await page.click('#btn-settings');
|
||||
await page.click('#settings-nav [data-panel="whispers"]');
|
||||
await page.locator('#whisper-settings .form-actions button').click();
|
||||
await page.locator('#whisper-list-editor form input').first().fill('Isolated local list');
|
||||
await page.locator('#whisper-list-editor button[type="submit"]').click();
|
||||
await page.waitForFunction(() => document.querySelector('.whisper-lists')?.textContent.includes('Isolated local list'));
|
||||
const saved = await page.evaluate(() => window.teamspeach.getWhisper());
|
||||
assert.equal(saved.ok, true); assert.equal(saved.lists.length, 1);
|
||||
const uuid = saved.lists[0].list_uuid;
|
||||
const receive = page.locator('#whisper-settings [role="radiogroup"] [role="radio"]');
|
||||
assert.equal(await receive.count(), 2);
|
||||
assert.equal(await receive.nth(0).getAttribute('aria-checked'), 'true');
|
||||
await receive.nth(1).click();
|
||||
await page.waitForFunction(async () => (await window.teamspeach.getWhisper()).receiveMode === 'deny_all');
|
||||
await page.waitForFunction(() => document.querySelectorAll('#whisper-settings [role="radio"]')[1]?.getAttribute('aria-checked') === 'true');
|
||||
result.checks.push('Real UI creates local list and saves deny-all receive mode through the Allow/Deny radio group without sending');
|
||||
await page.click('#settings-nav [data-panel="keys"]');
|
||||
await page.locator('#keybind-settings form select').first().selectOption('whisper_list');
|
||||
await page.locator('#keybind-settings form select').nth(1).selectOption(uuid);
|
||||
await page.locator('#keybind-settings form button[type="button"]').click();
|
||||
await page.keyboard.press('F9');
|
||||
await page.locator('#keybind-settings form button[type="submit"]').click();
|
||||
await page.waitForFunction(async () => (await window.teamspeach.getKeybinds()).bindings.length === 1);
|
||||
const bindings = await page.evaluate(() => window.teamspeach.getKeybinds());
|
||||
assert.equal(bindings.bindings[0].global, false); assert.equal(bindings.bindings[0].code, 'F9');
|
||||
assert.equal(bindings.bindings[0].target, uuid); assert.equal(bindings.status.global, false);
|
||||
await page.screenshot({ path: path.join(out, 'whisper-local-keybind.png') });
|
||||
const rejection = await page.evaluate(() => window.teamspeach.request('c1', 'whisper_start', { epoch: 1, target: { kind: 'ids', clients: [], channel_ids: [] } }));
|
||||
assert.equal(rejection.ok, false);
|
||||
result.nativeDisconnectedRejection = rejection.error;
|
||||
result.checks.push('Real native core rejects whisper without a connected target; no simulated route success');
|
||||
await page.evaluate(() => document.activeElement?.blur());
|
||||
await page.keyboard.down('F9'); await page.keyboard.up('F9');
|
||||
const held = await page.evaluate(async () => (await import('./js/whisper.js')).whisperHold.held);
|
||||
assert.equal(held, false);
|
||||
assert.equal((await page.evaluate(() => window.teamspeachDiagnostics.snapshot())).voice.capturing, false);
|
||||
await app.close(); app = null;
|
||||
app = await launchApp({ profile, exe: option('exe') }); page = await app.firstWindow();
|
||||
page.on('pageerror', e => result.errors.push(e.message));
|
||||
await page.waitForSelector('#view-app', { state: 'visible' });
|
||||
const restored = await page.evaluate(async () => ({ whisper: await window.teamspeach.getWhisper(), keys: await window.teamspeach.getKeybinds() }));
|
||||
assert.equal(restored.whisper.lists[0].list_uuid, uuid); assert.equal(restored.whisper.receiveMode, 'deny_all');
|
||||
assert.deepEqual(restored.keys.bindings, bindings.bindings);
|
||||
assert.equal((await page.evaluate(() => window.teamspeach.setKeybinds([]))).ok, true);
|
||||
assert.equal((await page.evaluate(id => window.teamspeach.deleteWhisperList(id), uuid)).ok, true);
|
||||
assert.equal((await page.evaluate(() => window.teamspeach.getWhisper())).lists.length, 0);
|
||||
result.checks.push('Process restart preserves list/receive/binding; explicit delete removes local state');
|
||||
assert.deepEqual(result.errors, []); result.ok = true;
|
||||
} catch (error) { result.ok = false; result.failure = error.stack; process.exitCode = 1; }
|
||||
finally { if (app) await app.close().catch(() => {}); rmSync(profile, { recursive: true, force: true }); writeFileSync(path.join(out, 'result.json'), JSON.stringify(result, null, 2)); console.log(JSON.stringify(result)); }
|
||||
Reference in new issue
Block a user