BlueGit

ict rusty-teams

chore(call-e2e): guest clicks exact labels only

- A loose "Share" match sent the guest to the sign-in page mid-call

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

metis Daniel Däschle · pushed by metis

Authored 2026-11-08 · 3 weeks ago

Hash
44f81adc0b921bf90d75a78936db32aad8e5dfb7
Parent
5802d52a
1 file changed +8 −4
scripts/call-e2e.mjs +8 −4
@@ -338,7 +338,11 @@ async function scenario(name, report, tab, workDir, act, check) {
338 338
339 339 async function guestClick(tab, labels) {
340 340 for (const label of labels) {
341 if (await tab.click(label)) return label;
341 const clicked = await tab.click(label.startsWith('=') ? label : '=' + label);
342 if (clicked) {
343 log(`guest clicked "${clicked}"`);
344 return clicked;
345 }
342 346 }
343 347 throw new Error(`guest found none of ${labels.join(', ')}`);
344 348 }
@@ -368,11 +372,11 @@ async function runScenarios(report, tab, workDir) {
368 372 await scenario('app-stop-share', report, tab, workDir, () => runTeams('--call', 'stop-share'),
369 373 (m) => !m.app.localShare && m.appShareOut < 20);
370 374 await scenario('guest-share', report, tab, workDir, async () => {
371 await guestClick(tab, ['=Share', 'Share content', 'Share']);
375 await guestClick(tab, ['Share', 'Share content']);
372 376 await delay(2_000);
373 await guestClick(tab, ['=Screen', 'Share screen', 'Screen', 'Entire screen']).catch(() => null);
377 await guestClick(tab, ['Screen', 'Share screen', 'Entire screen']).catch(() => null);
374 378 }, (m) => m.app.screenSharer && m.appShareIn > 50);
375 await scenario('guest-stop-share', report, tab, workDir, () => guestClick(tab, ['=Stop sharing', 'Stop sharing', 'Stop presenting']),
379 await scenario('guest-stop-share', report, tab, workDir, () => guestClick(tab, ['Stop sharing', 'Stop presenting']),
376 380 (m) => !m.app.screenSharer && m.appShareIn < 20);
377 381 await scenario('app-mute', report, tab, workDir, () => runTeams('--call', 'mute'), (m) => m.app.muted);
378 382 const muted = await sampleWeb(tab, 6);
@@ -338,7 +338,11 @@ async function scenario(name, report, tab, workDir, act, check) {
338
338
339async function guestClick(tab, labels) {
339async function guestClick(tab, labels) {
340 for (const label of labels) {
340 for (const label of labels) {
341 if (await tab.click(label)) return label;
341 const clicked = await tab.click(label.startsWith('=') ? label : '=' + label);
342 if (clicked) {
343 log(`guest clicked "${clicked}"`);
344 return clicked;
345 }
342 }
346 }
343 throw new Error(`guest found none of ${labels.join(', ')}`);
347 throw new Error(`guest found none of ${labels.join(', ')}`);
344}
348}
@@ -368,11 +372,11 @@ async function runScenarios(report, tab, workDir) {
368 await scenario('app-stop-share', report, tab, workDir, () => runTeams('--call', 'stop-share'),
372 await scenario('app-stop-share', report, tab, workDir, () => runTeams('--call', 'stop-share'),
369 (m) => !m.app.localShare && m.appShareOut < 20);
373 (m) => !m.app.localShare && m.appShareOut < 20);
370 await scenario('guest-share', report, tab, workDir, async () => {
374 await scenario('guest-share', report, tab, workDir, async () => {
371 await guestClick(tab, ['=Share', 'Share content', 'Share']);
375 await guestClick(tab, ['Share', 'Share content']);
372 await delay(2_000);
376 await delay(2_000);
373 await guestClick(tab, ['=Screen', 'Share screen', 'Screen', 'Entire screen']).catch(() => null);
377 await guestClick(tab, ['Screen', 'Share screen', 'Entire screen']).catch(() => null);
374 }, (m) => m.app.screenSharer && m.appShareIn > 50);
378 }, (m) => m.app.screenSharer && m.appShareIn > 50);
375 await scenario('guest-stop-share', report, tab, workDir, () => guestClick(tab, ['=Stop sharing', 'Stop sharing', 'Stop presenting']),
379 await scenario('guest-stop-share', report, tab, workDir, () => guestClick(tab, ['Stop sharing', 'Stop presenting']),
376 (m) => !m.app.screenSharer && m.appShareIn < 20);
380 (m) => !m.app.screenSharer && m.appShareIn < 20);
377 await scenario('app-mute', report, tab, workDir, () => runTeams('--call', 'mute'), (m) => m.app.muted);
381 await scenario('app-mute', report, tab, workDir, () => runTeams('--call', 'mute'), (m) => m.app.muted);
378 const muted = await sampleWeb(tab, 6);
382 const muted = await sampleWeb(tab, 6);