fix(teamsbot): add debug screenshots to anonymous join flow

Made-with: Cursor
This commit is contained in:
ValueOn AG 2026-03-01 09:31:29 +01:00
parent 49d0c26f00
commit 51a2320ddb

View file

@ -199,19 +199,24 @@ export class BotOrchestrator {
this._setState('navigating');
// STEP 1: Navigate to meeting URL and click "Continue on this browser"
await this._takeScreenshot('anon-step1-before-launcher', this._isDebugMode);
await this._joinProcedure!.startMeetingLauncherFlow(this._meetingUrl);
await this._takeScreenshot('anon-step1-after-launcher', this._isDebugMode);
// Ensure microphone is ON (required for voice playback)
await this._ensureMicOn();
// STEP 2: Enter bot name and click "Join now"
await this._takeScreenshot('anon-step2-before-join', this._isDebugMode);
await this._joinProcedure!.joinMeetingLobbyFlow();
await this._takeScreenshot('anon-step2-after-join', this._isDebugMode);
// Check if we're in lobby
const inLobby = await this._joinProcedure!.isInMeetingLobby({ waitForSeconds: 10 });
if (inLobby) {
this._setState('in_lobby');
this._logger.info('Bot is in lobby, waiting to be admitted...');
await this._takeScreenshot('anon-step3-in-lobby', this._isDebugMode);
}
// Wait to be admitted to the meeting
@ -219,6 +224,7 @@ export class BotOrchestrator {
this._setState('in_meeting');
this._logger.info(`Bot joined the meeting as "${this._botName}"`);
await this._takeScreenshot('anon-step4-in-meeting', this._isDebugMode);
// Start keepalive to prevent idle disconnect
this._startKeepAlive();
@ -234,6 +240,7 @@ export class BotOrchestrator {
// Enable chat monitoring
await this._enableChat();
await this._takeScreenshot('anon-step5-ready', this._isDebugMode);
// Send greeting in meeting chat
await this._sendJoinGreeting();