All checks were successful
Queue Release Build / prepare (push) Successful in 22s
Deploy Web Apps / deploy (push) Successful in 7m32s
Queue Release Build / build-windows (push) Successful in 27m41s
Queue Release Build / build-linux (push) Successful in 44m56s
Queue Release Build / build-android (push) Successful in 18m52s
Queue Release Build / finalize (push) Successful in 21s
Ignore stale P2P self-disconnect voice-state echoes while this client actively owns voice, refresh noise-reduction input on re-join, and repair dual-signal E2E harness expectations. Co-authored-by: Cursor <cursoragent@cursor.com>
50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
import { type Page } from '@playwright/test';
|
|
|
|
/** Wait until the side-panel roster under a voice channel lists the expected user count. */
|
|
export async function waitForVoiceRosterCount(
|
|
page: Page,
|
|
channelName: string,
|
|
expectedCount: number,
|
|
timeout = 45_000
|
|
): Promise<void> {
|
|
await page.waitForFunction(
|
|
({ expected, name }) => {
|
|
const buttons = document.querySelectorAll(
|
|
`app-rooms-side-panel button[data-channel-type="voice"][data-channel-name="${name}"]`
|
|
);
|
|
|
|
for (const button of buttons) {
|
|
const panel = button.closest('app-rooms-side-panel');
|
|
|
|
if (!panel || panel.getBoundingClientRect().width === 0) {
|
|
continue;
|
|
}
|
|
|
|
const rosterDiv = button.nextElementSibling;
|
|
|
|
if (!rosterDiv) {
|
|
continue;
|
|
}
|
|
|
|
const displayNames = new Set<string>();
|
|
|
|
rosterDiv.querySelectorAll('[appThemeNode="roomVoiceUserItem"] span.text-sm').forEach((element) => {
|
|
const label = element.textContent?.trim();
|
|
|
|
if (label) {
|
|
displayNames.add(label);
|
|
}
|
|
});
|
|
|
|
if (displayNames.size === expected) {
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
},
|
|
{ expected: expectedCount, name: channelName },
|
|
{ timeout }
|
|
);
|
|
}
|