@@ -171,38 +171,6 @@ describe('McpContext', () => {
171171 } ) ;
172172 } ) ;
173173
174- it ( 'skips pages whose DevTools state does not resolve' , async ( ) => {
175- await withMcpContext ( async ( _response , context ) => {
176- const page = context . getSelectedPptrPage ( ) ;
177- const target = context . browser . targets ( ) . find ( target => {
178- return target . type ( ) === 'page' ;
179- } ) ;
180- assert . ok ( target ) ;
181- sinon . stub ( target , 'page' ) . resolves ( page ) ;
182- sinon . stub ( context . browser , 'targets' ) . returns ( [ target ] ) ;
183- const hasDevTools = sinon . stub ( page , 'hasDevTools' ) . returns (
184- new Promise < boolean > ( ( ) => {
185- // Intentionally never resolves to mimic a stalled DevTools probe.
186- } ) ,
187- ) ;
188- const clock = sinon . useFakeTimers ( ) ;
189-
190- const detectionPromise = context . detectOpenDevToolsWindows ( ) ;
191- for ( let attempt = 0 ; attempt < 10 && ! hasDevTools . called ; attempt ++ ) {
192- await clock . tickAsync ( 0 ) ;
193- }
194- assert . ok ( hasDevTools . called ) ;
195- let resolved = false ;
196- void detectionPromise . then ( ( ) => {
197- resolved = true ;
198- } ) ;
199- await clock . tickAsync ( 5_000 ) ;
200- await clock . tickAsync ( 0 ) ;
201-
202- assert . strictEqual ( resolved , true ) ;
203- } ) ;
204- } ) ;
205-
206174 it ( 'resolves uid from a non-selected page snapshot' , async ( ) => {
207175 await withMcpContext ( async ( _response , context ) => {
208176 // Page 1: set content and snapshot
0 commit comments