softphone: People panel with presence, click-to-call
ci / images (push) Canceled after 0s
ci / check (push) Canceled after 4s

People lists every extension with its status dot and a search box: a
right-hand column on wide screens, /me/people on small ones. Call uses the
browser softphone when it's on, else POST /api/me/click-to-call, which
originates to the user's desk phone first (409 if none is registered).
During a call: Transfer (blind), Talk first (consult), or drag the call
card onto a person; a held call card offers Complete transfer whenever
another call is active. useSoftphone moved to its own module.

e2e m5-t3: the dot changes ~30 ms after Asterisk's hint; click-to-call
rings 174 before 172. cdp click() takes a scope (People also has
Call/Transfer buttons). trunk-test ignores the RTCP-at-teardown EPERM
error seen once.

Task: M5-T3
This commit is contained in:
iamdoubz committed 2026-10-18 10:06:28 -05:00
1 parent c7fd4df77c
commit 609965bba5
16 files changed
+452 -33

No files matched your search

+5 -2
View File
@@ -115,10 +115,13 @@ async function attach(wsUrl, { width, height, shotsDir }) {
return true;
})()`),
/** Clicks the first visible button/link whose text or aria-label matches. */
click: (text) =>
/** `within`: a CSS selector to search inside, when the same label appears elsewhere. */
click: (text, within = 'body') =>
evaluate(`(() => {
const t = ${JSON.stringify(text)};
const el = [...document.querySelectorAll('button, a')].reverse().find(e => (e.textContent.trim() === t || e.getAttribute('aria-label') === t) && e.getClientRects().length);
const root = document.querySelector(${JSON.stringify(within)});
if (!root) throw new Error('no ' + ${JSON.stringify(within)});
const el = [...root.querySelectorAll('button, a')].reverse().find(e => (e.textContent.trim() === t || e.getAttribute('aria-label') === t) && e.getClientRects().length);
if (!el) throw new Error('no visible button ' + t);
el.click();
return true;