@@ -46,7 +46,6 @@ export class ToolbarControls {
4646
4747 async toggleCamera ( ) {
4848 await this . dismissBlockingToasts ( ) ;
49- await this . debugToolbarState ( ) ; // Add this
5049 await this . revealToolbar ( ) ;
5150 await this . cameraButton . click ( { force : true } ) ;
5251 await this . page . waitForTimeout ( 300 ) ;
@@ -115,11 +114,9 @@ export class ToolbarControls {
115114
116115 // Move mouse to bottom center to trigger activity and reveal toolbar
117116 await this . page . mouse . move ( viewport . width / 2 , viewport . height - 50 ) ;
117+ await this . page . waitForTimeout ( 500 ) ;
118118
119- // Wait for the toolbar container itself to be visible first
120- await this . toolbar . waitFor ( { state : "visible" , timeout : 5000 } ) ;
121-
122- // Then wait for camera button to be attached and visible
119+ // Then wait for camera button to be visible (confirms all toolbar buttons are ready)
123120 await this . cameraButton . waitFor ( { state : "visible" , timeout : 5000 } ) ;
124121
125122 // Hover directly over the toolbar to keep it visible (triggers onMouseEnter)
@@ -130,6 +127,8 @@ export class ToolbarControls {
130127 toolbarBox . y + toolbarBox . height / 2 ,
131128 ) ;
132129 }
130+
131+ await this . page . waitForTimeout ( 200 ) ;
133132 }
134133
135134 async dismissBlockingToasts ( ) {
@@ -160,30 +159,4 @@ export class ToolbarControls {
160159 }
161160 } catch { }
162161 }
163-
164- async debugToolbarState ( ) {
165- console . log ( "🔍 Debugging toolbar state..." ) ;
166-
167- // Check if meeting component exists
168- const meetingComponent = await this . page . locator ( '[data-meeting-component]' ) . count ( ) ;
169- console . log ( "Meeting component count:" , meetingComponent ) ;
170-
171- // Check all buttons with "End Call" title
172- const endCallButtons = await this . page . locator ( 'button[title="End Call"]' ) . count ( ) ;
173- console . log ( "End Call buttons count:" , endCallButtons ) ;
174-
175- // Check toolbar matches
176- const toolbarMatches = await this . toolbar . count ( ) ;
177- console . log ( "Toolbar matches:" , toolbarMatches ) ;
178-
179- // Dump toolbar HTML
180- if ( toolbarMatches > 0 ) {
181- const html = await this . toolbar . innerHTML ( ) ;
182- console . log ( "Toolbar HTML:" , html . substring ( 0 , 500 ) ) ;
183- }
184-
185- // Check camera button
186- const cameraButtons = await this . cameraButton . count ( ) ;
187- console . log ( "Camera button matches:" , cameraButtons ) ;
188- }
189162}
0 commit comments