fix: Bug - User automatically leaves voice after short period of time
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
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>
This commit is contained in:
49
e2e/helpers/voice-roster.ts
Normal file
49
e2e/helpers/voice-roster.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
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 }
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user